views:

504

answers:

3

I was using the Visual Studio Profiler on my web application when at some point while it was running Visual Studio crashed. Now everytime I try to run my web application I get this exception in the web browser:

Could not load file or assembly 'Microsoft.VisualStudio.Enterprise.ASPNetHelper

Here is what I have tried so far, but did not correct the error:

  • restored the original web.config (removing all the profiler additions that were automatically added)
  • deleted all binaries and source, pulled all code fresh, and rebuilt the entire web application
  • deleted the web application entry in iis
  • deleted all files in \WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

I must be missing something small somewhere. It is as if there is still a binary that is still instrumented somewhere or something and is referencing ASPNetHelper. I don't know.

I'm using: Microsoft Visual Studio 2008 Version 9.0.30729.1 SP

Any thoughts on what else I could try? Thanks!

A: 

I googled and I found this:

http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/56dd11d1-d920-4fd1-939b-2c65d264b250

It says: ' When we build with code coverage enabled, VS makes some changes to the config file and the same will be restored back once the build is over. If its MSBuild(IDE), VS will tell you that the config file got modified outside VS two times. I observed that the above error occures when there is only one such notification - means when VS fails to restore the config file. I restored the config file using the backup copy and its started working fine. :) '

Time Machine
I found that too. It mentions web.config changes and copying Microsoft.VisualStudio.Enterprise.AspNetHelper.dll to the correct location (via a link). Both I have looked at and tried, but it still didn't correct my problem.
Jon
A: 

If this is an error that is shown in web broweser window, this means that assembly Microsoft.VisualStudio.Enterprise.ASPNetHelper is not being copied to output directory.

Go to solution explorer, find References, and click on Microsoft.VisualStudio.Enterprise.ASPNetHelper, Properties, and set Copy option (do not remeber exact name of this option) to copy an assembly.

smok1
That is what it sounds like, but none of my projects (I search just to make sure) do not reference ASPNetHelper. From what I understand that reference is added when the assemblies are instrumented for profiling. I'm trying to remove all profiling references. I must have missed one somewhere, but don't know where to look.
Jon
Check if you do not refer something, that is refering ASPNetHelper...
smok1
Did that. I checked all the files I could think of (*.config;*.vbproj;*.sln;*.csproj). Those are the only places I know to check.
Jon
A: 

Found it! There was a reference to Microsoft.VisualStudio.Enterprise.ASPNetHelper in C:\Inetpub\wwwroot\web.config. As soon as I removed that, it worked! Since I never work out of that folder, I never thought to look there.

Jon