none
Can not resolve mscorlib for .NET version 4

    Question

  • I recently upgraded from VS2010 Express Beta to VS2010 Express.   The .NET framework also went from 3.5 to 4.0 during this install.   

     When I tried to run a project created with the Beta version, it gives me the following error message (typically when I try to open the "Design" pages.

    "Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0,Profile=Client'. This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted. "

    I assume there is some reference to the .NET Framework, but it is the wrong reference.     What do I need to do get past this error?

    Thanks in advance.

     

     

    Friday, June 25, 2010 4:41 PM

Answers

  • Different versions of visual studio should never interfere, so it's ok to leave 2008 there. Neither the problem should be 3.5 missing because 2008 would stop responding, but 2010 starts targeting to 4.0 and 3.5 choice is just a plus.

    If you completely uninstalled the beta, then give a look at the control panel -> programs to see if some companion application of 2010 (beta) is still in place. Then, I anyway would like to suggest a complete uninstall of all the 2010 visual studio and related programs (that appear in programs panel), and reinstall after a good windows restart.

    Anyway, just as a test, try to change the solution target compilation from profile "Client 4.0" to "4.0" to see if the same message is present.

    Giuseppe

    • Proposed as answer by Harry Zhu Friday, July 02, 2010 8:14 AM
    • Marked as answer by Harry Zhu Wednesday, July 07, 2010 9:02 AM
    Friday, June 25, 2010 7:08 PM

All replies

  • I strongly suggest to remove visual studio completely before installing the express version again. The beta and the express are not fully environment-compatible. The differences between target frameworks are just a first epiphenomenon.

    Giuseppe

    Friday, June 25, 2010 6:49 PM
  • Thanks for the response.

    I did uninstall the Express Beta before installing the final express version.   I would assume that the 3.5 framework would need to remain in place?

    I still have the 2008 express version on my machine, but that did not cause any problems co-existing with the 2010 express beta version.    Should this be removed as well?    They exist in different directories.

    Thanks

     

     

    Friday, June 25, 2010 6:58 PM
  • Different versions of visual studio should never interfere, so it's ok to leave 2008 there. Neither the problem should be 3.5 missing because 2008 would stop responding, but 2010 starts targeting to 4.0 and 3.5 choice is just a plus.

    If you completely uninstalled the beta, then give a look at the control panel -> programs to see if some companion application of 2010 (beta) is still in place. Then, I anyway would like to suggest a complete uninstall of all the 2010 visual studio and related programs (that appear in programs panel), and reinstall after a good windows restart.

    Anyway, just as a test, try to change the solution target compilation from profile "Client 4.0" to "4.0" to see if the same message is present.

    Giuseppe

    • Proposed as answer by Harry Zhu Friday, July 02, 2010 8:14 AM
    • Marked as answer by Harry Zhu Wednesday, July 07, 2010 9:02 AM
    Friday, June 25, 2010 7:08 PM