locked
VS2010 Properties - Services - Error RRS feed

  • Question

  • I have a Windows Forms project in VS2010, however when I right click on the project, select Properties and then click the Services tab on the left I get the following error:

    An error occurred trying to load the page.
    Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)).

    Does anyone have idea as to what may cause this? Is there a log file somewhere that might give me a hint as to what is causing this? Any ideas on how to fix this?

    The solution also has two class libs with one using the DotNetZip library here:
    Dotnetzip

    Otherwise it is all C# targeting the 4.0 framework, nothing unusual other than this confusing error.

    Thanks.


    • Edited by dgrm44 Thursday, December 6, 2012 12:44 AM
    Thursday, December 6, 2012 12:44 AM

Answers

  • There is a disconnect between the framework you're using, what the project settings say it is and your config file.  If you don't see System.Web.Extensions at all then the framework versioning isn't correct because it is part of v4.0 Full Profile and should show up.  By default when you switch to the v4 Full framework in VS2010 you'll get the <supportedRuntime> entry in your app.config as well.  My gut instinct is that your project was only partially updated and it is causing a failure.  Normally if you open the Services tab and that functionality isn't available (i.e. you're using the Client Profile) then the button is disabled.  I would recommend switching the project to the .NET 3.5 framework, saving the changes and then switching back to v4.0 to get everything to regen correctly and see if System.Web.Extensions shows up in the available references list.  If that works then try the Services tab again.

    As far as a log goes you can start VS with a logging option (/log I think).  The log is generated in your C:\Users\<username>\AppData\Roaming\Microsoft\VisualStudio\10.0 directory as ActivityLog.xml.  It might or might not generate the error message in the log.

    Michael Taylor - 12/13/2012
    http://msmvps.com/blogs/p3net

    Thursday, December 13, 2012 6:06 PM
    Moderator

All replies

  • Sounds like a corrupt installation.  Repair the VS installation and ensure that you've applied SP1.  If that doesn't resolve the issue then start VS in safemode (/safemode) to eliminate any addins.  Alternatively if you have configured services in the past for the project then consider opening the project file in an XML editor and removing the service settings to see if one of the settings was somehow corrupted.

    Michael Taylor - 12/6/2012
    http://msmvps.com/blogs/p3net

    Thursday, December 6, 2012 3:54 PM
    Moderator
  • Thanks for the reply but so far nothing is working. Any other ideas on how to troubleshoot this issue?
    Sunday, December 9, 2012 12:32 AM
  • Create a brand new console application project.  Try going to the Services tab.  Does it crash?  If so then it is corrupt installation and you'll need to repair it.  Alternatively you could try running in safemode (/safemode) to see if an extension is getting in the way.

    If the new project works then it is most likely an issue with your project's settings.  I'd recommend opening the project file in an XML editor and removing the service settings.  Then open the project in VS and add the settings back in to see if the problem goes away.

    Michael Taylor - 12/9/2012
    http://msmvps.com/blogs/p3net

    Sunday, December 9, 2012 10:20 PM
    Moderator
  • Services tab works for other projects so it is something about this one. When I edit the project file in Notepad++ I do not see a Services Settings section so I can't remove it per your suggestion.
    Sunday, December 9, 2012 10:22 PM
  • Sorry.  The Services tab stores its info in the app.config file.  You'll see a set of appSettings entries for the various properties and the <system.web> node for the provider information.  Note that this would mandate that you had a reference to System.Web.Extensions.  So if you cleaned up your references, make sure you didn't remove this one.  Also ensure that the version in the config matches the version of your project (4.0.0.0 in general).

    Michael Taylor - 12/10/2012
    http://msmvps.com/blogs/p3net

    Monday, December 10, 2012 4:15 PM
    Moderator
  • I don't have anything like <system.web> in my app.config file, I also can't find a dll in the .net list to add as a windows forms project reference called System.Web.Extensions. I don't recall ever seeing anything like this added to app.config in past VS2010 projects.

    Note that I haven't been using the Services tab for this windows forms application, but I did notice this error and I am trying to figure out what could cause it.


    • Edited by dgrm44 Monday, December 10, 2012 9:02 PM
    Monday, December 10, 2012 9:01 PM
  • Do you have any appSettings entries around client settings?
    Monday, December 10, 2012 9:23 PM
    Moderator
  • In the app.config file I have one appSettings entry that I added...other than that it is empty.
    Monday, December 10, 2012 10:15 PM
  • For the project's framework version, what does VS show as the full framework version information?  In your app.config do you have an entry for <supportedRuntime>?  If so what does it display?

    Michael Taylor - 12/10/2012
    http://msmvps.com/blogs/p3net

    Monday, December 10, 2012 10:45 PM
    Moderator
  • Framework version is 4.0.

    <supportedRuntime> is not in appConfig file, only my <appSettings>.

    Thursday, December 13, 2012 5:10 PM
  • There is a disconnect between the framework you're using, what the project settings say it is and your config file.  If you don't see System.Web.Extensions at all then the framework versioning isn't correct because it is part of v4.0 Full Profile and should show up.  By default when you switch to the v4 Full framework in VS2010 you'll get the <supportedRuntime> entry in your app.config as well.  My gut instinct is that your project was only partially updated and it is causing a failure.  Normally if you open the Services tab and that functionality isn't available (i.e. you're using the Client Profile) then the button is disabled.  I would recommend switching the project to the .NET 3.5 framework, saving the changes and then switching back to v4.0 to get everything to regen correctly and see if System.Web.Extensions shows up in the available references list.  If that works then try the Services tab again.

    As far as a log goes you can start VS with a logging option (/log I think).  The log is generated in your C:\Users\<username>\AppData\Roaming\Microsoft\VisualStudio\10.0 directory as ActivityLog.xml.  It might or might not generate the error message in the log.

    Michael Taylor - 12/13/2012
    http://msmvps.com/blogs/p3net

    Thursday, December 13, 2012 6:06 PM
    Moderator