none
Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0'. RRS feed

  • Question

  • Hi

    It apperes that I 'm facing a major problem. I took a large dev app. from .net 3.5 to .net 4.0 due to upgrade vs 2008 to vs 2010 pro

    Now my settings.settings cant be found - my services, roles etc. cant be found and I'm not able to use Class View

    the error is :

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

    What is there to do ? I reinstalled vs2010 I reinstalled .net 4 i run the framework setup verifier.

    I have the old vs2008 .net 3.5 version of the app, but using that I will loose 3 month work, so

    please help


    danish Freddy

    Tuesday, March 27, 2012 12:54 PM

Answers

  • danish Freddy

    I am trying to grok this post, and I believe I will need quite a bit more context in order to understand what is going on. I understand you have an app that you upgraded from 2008 to 2010.

    When you installed 2010, did you also install Visual Studio 2010 SP1? If you are starting fresh, I highly recommend you start with the latest fresh.

    After installing, have you tried creating a simple C# Console app and running it with the debugger? This is a good test just to make sure everything is installed and working correctly.

    What type of project did you attempt to convert?

    Is your project under source control, or do you have a copy of the Setting.Settings file? If so, simply adding it back to the project should do the trick for the file. However, I don't think that the error you showed has anything to do with what you have described so far. Normally this error is caused by not having the version of the .NET framework installed that you are targeting. However, it can also be that the target framework moniker has gotten messed up in your project file.

    A simple way of changing this in Visual Studio 2010 is to right-click on the project in Solution Explorer, and choose Properties. On the Application tab, look at the "Target framework" dropdown. What is the value? Even if it shows ".NET Framework 4 Client Profile" or ".NET Framework 4", change it and then change it back. Then attempt to re-build.

    Note that only the Frameworks that are available on the box should show up in the dropdown.

    Please reply with the results, and any other information that you can provide.

    Chuck

    • Marked as answer by danish_freddy Monday, April 2, 2012 6:23 AM
    Tuesday, March 27, 2012 6:17 PM

All replies

  • danish Freddy

    I am trying to grok this post, and I believe I will need quite a bit more context in order to understand what is going on. I understand you have an app that you upgraded from 2008 to 2010.

    When you installed 2010, did you also install Visual Studio 2010 SP1? If you are starting fresh, I highly recommend you start with the latest fresh.

    After installing, have you tried creating a simple C# Console app and running it with the debugger? This is a good test just to make sure everything is installed and working correctly.

    What type of project did you attempt to convert?

    Is your project under source control, or do you have a copy of the Setting.Settings file? If so, simply adding it back to the project should do the trick for the file. However, I don't think that the error you showed has anything to do with what you have described so far. Normally this error is caused by not having the version of the .NET framework installed that you are targeting. However, it can also be that the target framework moniker has gotten messed up in your project file.

    A simple way of changing this in Visual Studio 2010 is to right-click on the project in Solution Explorer, and choose Properties. On the Application tab, look at the "Target framework" dropdown. What is the value? Even if it shows ".NET Framework 4 Client Profile" or ".NET Framework 4", change it and then change it back. Then attempt to re-build.

    Note that only the Frameworks that are available on the box should show up in the dropdown.

    Please reply with the results, and any other information that you can provide.

    Chuck

    • Marked as answer by danish_freddy Monday, April 2, 2012 6:23 AM
    Tuesday, March 27, 2012 6:17 PM
  • Hi Chuck

    Thanks for your time.

    It seem that I have solved the problem. I tried to reinstall vs2010 and .Framework4 from the disc, but that did't help.

    Then I installed .Framework4 from here: http://msdn.microsoft.com/en-us/netframework/aa569263.aspx and now it working just fine.

    So thank you again


    danish Freddy

    Monday, April 2, 2012 6:23 AM