Prebuild event in Visual Studio replacing $(SolutionDir) with *Undefined*

前端 未结 5 1967
猫巷女王i
猫巷女王i 2020-12-17 08:31

I believe the problem is documented here moved here and looks like it might be a bug in visual studio, but I\'m wondering if anyone knows of a workaround.

5条回答
  •  一整个雨季
    2020-12-17 09:06

    You don't specify if this happens for many projects or just one or two.

    If it is only in one or two projects, a temporary workaround might be to replace $(SolutionDir) with the explicit path that Folder2 is located in. For example, something like:

    "C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe" /p:configuration=Release;platform=x86 /t:rebuild "C:\AllSolutions\ExampleSolutions\Folder2\Folder3\Project2.csproj"
    

    but with the correct path for your project.

提交回复
热议问题