Downgrade from EF6 to EF5 - asp.net

Does EF6 not work with ASP.NET MVC 4? I've tried to downgrade to EF5. But when I run my web app. I'm getting this error:
Could not load file or assembly 'System.Data.SqlServerCe.Entity,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or
one of its dependencies. The system cannot find the file specified.
And when I was using EF6 I was getting a NULL value on LINQ operations. For more info.
How do I fix this please?

Related

Could not load type 'System.Data.Common.DbProviderFactories' from assembly 'System.Data'

First of all some context: my project exists out of a common project that contains all the DAL stuff and a web project. Now the common project is written in .NET framework 4.5 while the web project is written in .NET Core 2.0.
When trying to acces the repositories of the DAL project I get following error:
Could not load type 'System.Data.Common.DbProviderFactories' from assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Now I'm not sure what to do now. I have added the System.Data.Common nuGet package to my web project, but without succes. How can I slove this problem preferably without altering the common DAL project? Thanks in advance.

Warning ASP.NET runtime error: Could not load file or assembly 'EntityFramework, Version=6.0.0.0

I'm developing using ASP.NET in Microsoft Visual Studio Express 2012 for Web. Everything works great but suddenly when changing some code in one of my controllers Visual Studio crashed and now I got this weird runtime error:
Warning 1 \Views_Create.cshtml: ASP.NET runtime error: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
My project still works fine though only a bit slower than before but every aspect of code, views, models, controller works just fine. Only in my studio the lines using EF are being underlined and marked as warning which is kinda annoying!
I already tried to uninstall and install EF or upgrade to EF 6.1 but no results...
Anybody an idea how to resolve this problem?
The answer posted in a similar question solved the problem for me:
Delete all files from the following folders and try again:
C:\Users\[username]\AppData\Local\Temp\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\

Microsoft chart controls 3.5 compatibility issues with .net 4.0+

I made an .net application using VB with a target framework of 3.5. I also use Microsoft's chart control for .net 3.5. The problem is the chart control has compatibility issues with 4.0 and above. Micrsoft listed a fix for it on their website, but when I attempt to launch the application it gives me an error due to their "fix"
Here is the link to the Microsoft fix on their website: http://msdn.microsoft.com/en-us/library/dd990785(v=vs.110).aspx and here's the error I get upon trying to launch the application after applying their fix: An unhandled exception of type 'System.InvalidOperationException' occurred in test.exe
Additional information: An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'System.Windows.Forms.DataVisualization, 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)
I understand that it can not seem to find the assembly file, but I have no clue how to fix it. I need help, thanks!

Error building empty website in VS2012

I am using Visual Studio 2012 Update 3 and whenever I create a new ASP.NET empty website and build it for the first time compilation is successful but I get a server error when accessing the site of "Could not load file or assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The module was expected to contain an assembly manifest."
If I then go back and build the website again I get a single error of "Object reference not set to an instance of an object" but no line number.
This error occurs whichever framework I am targeting and whether I am using C# or VB.
Can anyone point me in the right direction please?
Thanks,
Richard.
Possibly AjaxControl Toolkit is the issue.
Depending on your Framework version( 4.5, 4.0, 3.5 ),, install the correct version of AjaxControl Toolkit from here: http://ajaxcontroltoolkit.codeplex.com/releases/view/94873.
Another solution I found is to place System.Web.Extensions.dll and System.Web.Extensions.Design.dll directly in the Bin folder of your web application.

Why can't I reference the project I created earlier from my wcf service class library?

Warning 1 The referenced assembly "C:\Users\rzv\Desktop\CompanyAnalyse1.0\AnalyserModel\bin\AnalyserModel.dll" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
Why do I get this? AnalyserModel is a class library that uses Entity framework code first 5 to save data in a database. I tryed to create a new WCF service application that uses the methods in AnalyserModel. What is wrong?
You need to change the target framework from 4.0 client profile to 4.0.
you can do this on the projects properties page.

Resources