I've installed the Ninject.MVC3 -Version 3.0.0.6 package but get the following error.
An exception of type 'System.IO.FileNotFoundException' occurred in Ninject.dll
but was not handled in user code
Additional information: Could not load file or assembly 'System.Web.Mvc, Version=5.2.2.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
The system cannot find the file specified.
I presume that this means that the version of the ninject.MVC3 package i've installed requires MVC5 which strikes me as rather odd.
I ended up resolving this by manually installing Ninject MVC using the Global.asax way of registering services as laid out here.
Related
In my Blazor Server project I have been using blazorise controls. I started this project 3 months before. Now I wanted to use Blazorise.Snackbar component. So I ran nuget package command to install the component. Now my project is not running. It shows exception in the below lines of code in the Program.cs file
builder.Services.AddBlazorise(options => { options.Immediate = false; })
.AddBootstrap5Providers()
.AddFontAwesomeIcons()
.AddBlazoriseRichTextEdit();
The error message is:
System.TypeLoadException: 'Method 'FocusTrap' in type
'Blazorise.Bootstrap5.Bootstrap5ClassProvider' from assembly
'Blazorise.Bootstrap5, Version=1.0.4.0, Culture=neutral,
PublicKeyToken=null' does not have an implementation.'
My Current Packages version:
Can anyone help me to solve the problem?
You should use the same version on all Blazorise packages to ensure that they are compatible with each other. Changing Blazorise.Snackbar version to 1.0.4 will fix your problem.
I inherited some old legacy code which I'm trying to build, but I'm missing some specific dlls. In particular, I need version 4.0.0.0 of System.ComponentModel.Composition, but the Nuget Package Manager options only go down to 4.5.0. Why is this, and how can I get the version I need?
Here is the line specified by the Web.config file I inherited.
<add assembly="System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
__
Edit: I tried Jingmiao Xu-MSFT's solution but I'm getting an error saying I'm already referencing these packages. Then I noticed that I'd commented out these assembly lines in my Web.config, so where are these packages being referenced from?
According to your description, you can refer to the following steps to find the dlls you need:
Right-click on the References under your project in Solution Explorer.
Choose Assemblies and search System.ComponentModel.Composition, System.Net.Http.WebRequest
Check them and add them to the project.
For this error, I have tried multiple solutions which is provided by Github. But, none of them worked. Please help to check whether this issue reopen on new environment like below.
Environment:
VS 2017 Version 15.4.1
Dotnet Version 2.0.2
Reproduce Steps:
Create an Asp.Net Core Web Application->.NET Core and Asp.net Core 2.0-> Web Application(Model-View-Controller)
Create an xUnit Test Project(.NET Core)
Follow this link Integration testing in ASP.NET Core
Add true to Test.csproj which is pointed at above link.
Run test method will return below error.
Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationFailedException : One or more compilation failures occurred:
ewiqttdv.z4g(4,62): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
Update:
After following this suggestion , this error gone, but, it produce below new error.
Message: System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.VisualStudio.Web.CodeGeneration, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
What is the possible way to resolve "Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationFailedException"?
Any help would be appreciated.
A bit late, but I ran in to the same problem today and managed to fix the "Could not load file or assembly 'Microsoft.VisualStudio.Web.CodeGeneration ..." error by adding the following reference to my integration test project:
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.1" PrivateAssets="All" />
I have a model with 2 animations, created in Blender and exported to fbx.
Referencing the XNAnimation.dll works, however when I reference the XNAnimationPipline.dll in the Content project I get a build error.
The "BuildContent" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'XNAnimationPipeline, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0c21691816f8c6d0' or one of its dependencies.
The system cannot find the file specified.
File name: 'XNAnimationPipeline, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0c21691816f8c6d0'
I have recently upgraded to XNA3.1 and am using the latest XNAnimation library.
Any ideas?
Thanks
Rebuilding the source code sorts it out
This explains
Has anyone seen this error before?
An error occurred creating the configuration section handler for cachingConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (C:\WorkingDir\Projects\ReportCentral\ReportCentral\bin\Debug\ReportCentral.vshost.exe.config line 5)
I am using Ent Lib 4.0. I changed my App Traget Framework from 2.0 to 3.5.
Edit ~
I have the following in the bin
Caching.dll
Common.dll
ObjectBuilder2.dll
Edit ~ "Solution"
This was the deal, when referencing dlls in the C:\EntLib4Src\bin, they are signed and could only be configured by the EntLibConfig.exe found in that same folder and not the one from "Start>Programs>Microsoft Patterns...>Ent Wasn't that tricky?
That means it can't find the file. So you either need to put it into the GAC or the bin folder so that the assembly can be loaded.
This was the deal, when referencing dlls in the C:\EntLib4Src\bin, they are signed and could only be configured by the EntLibConfig.exe found in that same folder and not the one from "Start>Programs>Microsoft Patterns...>Ent Wasn't that tricky?