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!
Related
I have an asp.net mvc application that I needed to make a change on. I made the change and now when I build it I get the message that says
Could not load file or assembly 'Rotativa.MVC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
The change had nothing to do with the Rotativa and I did not touch anything on the code that used the Rotativa nor did I do any updates to the nuget packages.
This has been working for months so why now does it say the assembly is not signed? and more importantly how do I correct this ?
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\
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.
I'm trying to debug a web application that I inherited from a previous developer, it was written using Visual Studio 2008 with the .Net 3.5 framework (hence using asp.net 2.0). I can see temporary asp.net files show up in the 2.0 folder (C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files)
Unfortunately every time I try browse to the login page on my local IIS server I get the following error:
"Could not load file or assembly 'System.Web.Mobile, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)"
The assembly is not referenced anywhere in the application, I have no idea why it's trying to load it when I browse to the page. I tried explicitly referencing the the 3.5 version as follows in the web.config using the 2.0 framework dll:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Mobile.dll
No matter what I do however it seems to try to bind to the 4.0.0.0 version and fails to load the page.
I've upgraded EntityFramework from 4.1 to 5 and Upgraded .NET Framework to 4.5 on local machine everything works perfectly, but when I published my changes on Azure I receive this error:
Server Error in '/' Application.
Could not load file or assembly 'Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Check your project references for that assembly. Ensure that you have copy local set to true on the properties of that reference. Also, upgrading your Azure SDK and EF may have impacted the versions of the assemblies referenced by the project. Ensure that you have the correct versions referenced in your project as well.
Found what would potentially be the source of your issue -> especially if you are upgrading your project: http://ivarunsingh.blogspot.com/2011/12/microsoftbuildutilitiesv35-report.html
Are you deploying to a Windows Server 2012 image (I see that you are using .NET 4.5)? If you use the Azure SDK 1.8 and OSVersion = 3 (default for new cloud service projects on the new SDK)...
Windows Server 2012 does not have .NET 3.5 libraries enabled, you have to enable that feature (and I believe install it). You may have to automate the enabling of the .NET 3.5.