开发者

MSBUILDEMITSOLUTION not working with .NET 4?

开发者 https://www.devze.com 2023-01-19 17:21 出处:网络
In prior vers开发者_如何学Pythonions of MSBuild, you could set an environment variable named MSBUILDEMITSOLUTION to 1 to get an XML version of a solution (.sln) file that could be parsed. According to

In prior vers开发者_如何学Pythonions of MSBuild, you could set an environment variable named MSBUILDEMITSOLUTION to 1 to get an XML version of a solution (.sln) file that could be parsed. According to the MSBuild Team Blog, that's still in the version that ships with Visual Studio 2010, but it does not seem to be working.

Has anyone managed to get this working with MSBuild 4.0? If so, what is required?

(We use this to find and run convention-based unit tests with an NAnt script.)


Set MSBuildEmitSolution=1 and then build from the command line. You should then see a MySolution.sln.metaproj file near MySolution.sln.

Notes:

  • If you open a command prompt window, then set the env var via System Settings, you will have to open a new command prompt.
  • You'd think you could also use msbuild /p:MSBuildEmitSolution=1, but you can't.
0

精彩评论

暂无评论...
验证码 换一张
取 消