Visual Studio 2010: Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0'

前端 未结 21 2852
谎友^
谎友^ 2020-12-14 14:31

We are currently migrating all our solutions from 2005 to 2010 (that\'s right, we\'re skipping 2008!). We are also changing our file structure to make some more sense (some

相关标签:
21条回答
  • 2020-12-14 15:02

    I had the same issue with a (web) service reference in my project. Both "Update service Reference" and "Configure Service Reference" did not work anymore.

    Well lets just throw the (web) service reference away and create it again. No go! Same error message.

    Solution: Edit the project file and remove everything which has to do with service references.

    Instructions:

    • Go to the Solution Explorer and right click on the project name and select "Unload project".
    • Go to the Solution Explorer and right click on the project name and select "Edit YourProjectName.proj"
    • Remove every element with has something to do with your (web) service references. (Typically it contains text "service references")
    • Go to the Solution Explorer and right click on the project name and select "Reload project".
    • Now add your (web) service references again.

    Problem solved (Well it was in my case).

    My guess of what could have happened: I changed a class somewhere in my web service. The interface was not changed and Visual Studio somehow does not see the change(s). The (cached?) configuration does not match anymore and configuring/rebuilding/deleting the (web) service fails.

    0 讨论(0)
  • 2020-12-14 15:02

    Ran into this today.

    Deleted bin & obj folders.

    Reopened Visual Studio and it suddenly worked.

    0 讨论(0)
  • 2020-12-14 15:04

    What happened to me was that all my references on my project were lost, so I had to insert them again.

    0 讨论(0)
提交回复
热议问题