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

前端 未结 21 2914
谎友^
谎友^ 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 14:59

    I got this error too. ("Could not resolve mscorlib for target framework '.NetFramework 4.5.1'. This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted.").

    This happened when I changed the framework from 3.5 to 4.5.1 on a VB 2013 project. The solution was to remove all the references on the .vbproj file: all the references labeled Reference and COMReference groups.

    Of course just after doing this all kind of other errors appeared on the project.

    Then I started to copy them back, one by one in the same place, copying from a back-up in order to identify which between them were the problematic ones (I copied the ones related with the new errors I got in order to fix them), refreshing the project each time until the affected window visualized properly.

    It resulted they were some customized libraries references which created this problem. I hope this could help someone. Cheers!

    A Developer.

提交回复
热议问题