v11.0\WebApplications\Microsoft.WebApplication.targets was not found when file actually references v10

后端 未结 11 1285
花落未央
花落未央 2020-12-01 01:26

First some background. At the end of 2012 we migrated our vs2008 solution to vs2010 but we still target .NET 3.5. (I know nothing but the latest and greatest here!)

11条回答
  •  无人及你
    2020-12-01 01:49

    If you have a build server that does not have VS2012 installed, you can fix this by

    a) installing the MSBuild.Microsoft.VisualStudio.Web.targets package to your solution, and

    b) replacing this line in the .csproj file:

    
    

    With this line pointing to the nuget package

    
    

    EDIT

    As @joedragons points out the version in the updated line should match the nuget package version, i.e. replace targets.11.0.2.1 with targets.x.x.x.x for the current version.

提交回复
热议问题