Bagikan melalui


VS2008 SP1 Website Profiling Bug And Workaround

out-of-range Visual Studio 2008 Service Pack 1, while fixing many profiling bugs, has also unfortunately introduced an issue with website profiling.  If you have a website project created with a pre-SP1 version of Visual Studio and then try to profile it using instrumentation with VS2008 SP1, you might run into a rather vague error: “Value does not fall within the expected range.”

Thankfully, there is a simple workaround: open the Configuration Manager from the Build menu, and for each of your website projects listed there, change its Platform to “Any CPU”.  Be sure to make these changes for each configuration type defined for your solution (e.g. Debug, Release).  You should now be able to successfully profile your website using instrumentation.

build-menu

configuration-manager

Comments

  • Anonymous
    January 15, 2009
    I received this same error message but only I got it in Visual Studio 2005 Team Edition (I think I updated it to latest SP1 including the .Net Framework to 2.0).I got this error when I go to Solution Explorer -> Right Click, Solution (SolutionName) -> Choose Existing Item -> Add the .sdf database -> then this error came out.However, this error won't appear when I do a Right Click on the namespace name -> Choose Existing Item -> Add the .sdf database.There must be a reason why this happens as it doesn't seem like a bug to me?
  • Anonymous
    January 15, 2009
    The comment has been removed