I'm deploying an application on a production server (so no visual studio installed locally).
I have a EntityFramework.dll in my bin folder.
But I keep getting a 500 error.
Cannot load file or assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of his dependencies
The nuget page says it has no dependency.
I have .net framework 3.5 and 4.7
Any idea on what to look for ?
Related
I inherited a project that was written in .NetCore 2.0 initially. The version of ServiceStack.OrmLite.SqlServer.Core that we were using was 1.0.43. I upgraded everything in NuGet, so ServiceStack is now 5.4.0.
The problem now is that when I try to run my code:
var dbFactory = new OrmLiteConnectionFactory(dbConnection.ConnectionString, SqlServerDialect.Provider);
using (var db = dbFactory.Open())
I get an error
System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I see in the drilldown for the dependencies that ServiceStack is referencing version 4.5 of the Code Pages.
I'm unsure of what I need to do to fix this...
If it's a .NET Core project then it should not be using any *.Core packages which after v5, are only meant for running ASP.NET Core Apps on the .NET Framework.
Since v5, the main packages, e.g: ServiceStack.OrmLite.SqlServer contain both .NET Standard 2.0 and .NET 4.5 Framework builds.
Given it's referencing the wrong packages I would uninstall all ServiceStack packages and only install the non .Core ServiceStack packages.
I am running Visual Studio 2017 (15.8.0) with .NET Framework 4.6.01055 on Windows 10 Enterprise 2015 LTSB 64-bit (10.0, Build 10240).
Upon creating a new NodeJS project, for example: New->Javascript->Node.js->Blank Node.js Console Application
When the .njsproj file opens, I get this error:
Microsoft Visual Studio
Could not load file or assembly 'System.ValueTuple, Version=4.0.2.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
I've uninstalled and reinstalled .NET Core and Visual Studio, yet I'm getting the same error. How can I resolve this error?
Installing .NET Framework 4.7.2 fixed this issue for me
I upgraded my site from Kentico 10.0 to 11.0. When I load site then I am getting the following error
Reference.svcmap: Could not load file or assembly
'Microsoft.SharePoint.Client.Runtime.Portable, Version=16.1.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its
dependencies. The system cannot find the file specified.
I installed an SDK package and also tried Install-Package Microsoft.SharePointOnline.CSOM -Version 16.1.7414.1200 but not getting 'Microsoft.SharePoint.Client.Runtime.Portable' dll.
Could you please suggest a solution for me?
Open the NuGet package manager in VS and make sure all projects reference the same version of the Microsoft.SharePointOnline.CSOM package, which should be 16.1.6621.1200 according to the documentation.
I'm attempting to load a pre-existing Umbraco CMS site into a Visual Studio project and am caught up in a bit of DLL hell.
Here is the error message I get when attempting to compile the site:
Could not load types from assembly Umbraco.Core, Version=1.0.5462.37503, Culture=neutral, PublicKeyToken=null, errors:
Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
File name: 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
I've attempted to re-install Newtonsoft from NuGet, re-install Umbraco from NuGet, delete all DLLs and re-install, removed the Newtonsoft dependentAssembly, every possible solution I've been able to find and this error continues to come up.
Any suggestions?
I'm guessing the binding redirect isn't set up correctly in the web.config file. Try running this in the nuget package manager console:
PM> Get-Project –All | Add-BindingRedirect
This ended up being a bit of a misunderstanding on my part from following the Umbraco videos. I was attempting to set up a new Visual Studio project, import all the DLLs needed, and then move the site content into the project.
All I really needed to do was create a blank project, then move the site content, with all of its DLLs, into the project. This let me immediately start editing the project.
The best solution was to install an earlier version of the package and then upgrade.
My crystal report page gives an error "Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference."
Do I have to have ddl for 1.2.10 or 1.2.11 in bin folder? Or what can be wrong?
If you have a x86 development machine and your web server is a 64-bit machine, you may be running into the problem discussed in this thread.
Visual Studio is automatically deploying a 32-bit log4net.dll into the 64-bit web server, even if you don't have it referenced in your project. Just delete the log4net.dll from your bin directory once deployment has finished because it's not actually required by the CR runtime to work.