c# - Could not load file or assembly Temporary ASP.NET Files

ID : 274528

viewed : 24

Tags : c#asp.net.net-assemblyc#





Top 5 Answer for c# - Could not load file or assembly Temporary ASP.NET Files

vote vote

99

I had simmilar problem after i tried to start performance tests. I removed assemblyPostProcessorType attribute in system.web > compilation element in web.config and it worked again.

 <system.web> <compilation debug="false" targetFramework="4.5.1"               assemblyPostProcessorType="Microsoft.VisualStudio.Enterprise.Common.AspPerformanceInstrumenter, Microsoft.VisualStudio.Enterprise.AspNetHelper, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </system.web> 
vote vote

88

If you use Visual Studio Performance Tools then it is possible that Visual Studio left a key in your web.config appsettings section. It causes a 32 bit library to load, which won't work if your application is loading in 64 bit mode.

Check for the following and remove it:

<add key="Microsoft.VisualStudio.Enterprise.AspNetHelper.VsInstrLocation" value="C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools\vsinstr.exe"/> 
vote vote

77

One of the solution is to delete those files from temporary asp.net folder that always works for me.

vote vote

62

Remove the following lines from web.config will resolve your error.

<compilers>       <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />       <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />     </compilers>   </system.codedom> 
vote vote

58

Here you have similar problem I think: Could not load file or assembly 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ asp.net vs2010

accepted answer was:

Try performing a full solution build. If that doesn't work, click Build -> Clean Solution. If the error persists, delete everything in the C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\parktms folder and repeat.

Top 3 video Explaining c# - Could not load file or assembly Temporary ASP.NET Files







Related QUESTION?