VS2012 $(exists) only accepts scalar values

后端 未结 7 1593
南笙
南笙 2021-02-05 04:18

Okay, this is more of a build error than a programming error. I have never had much reason to get my hands dirty with builds, so this error is baffling me.

I have tried

相关标签:
7条回答
  • 2021-02-05 05:01

    I got the same error in VS2013, but only when I try to rebuild the project. Below how I solve the problem in my conditions, I hope that is also useful to other people.

    Configuration:

    • I have my typescript files in separate projects in the solution.
    • Those projects were migrate for VS 2012.

    Cause: when I click on the error in Microsoft.Web.Publishing.targets files I discovered that the project was using the VS2012 version of those files. That is the projects where only partially migrated form VS2012 to VS2013.

    Solution: Open the typescript project (first unload project) Search for:

          <PropertyGroup>
            <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">12.0</VisualStudioVersion>
            <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
          </PropertyGroup>
    
    • Comment the line VSToolsPath
    • Save and close the file
    • Reload the project You can see a migration screen from visual studio notifying you that the project was upgrade.

      rebuild the project, now should work

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