MSBUILDEMITSOLUTION 不适用于 .NET 4? [英] MSBUILDEMITSOLUTION not working with .NET 4?

查看:33
本文介绍了MSBUILDEMITSOLUTION 不适用于 .NET 4?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在以前版本的 MSBuild 中,您可以将名为 MSBUILDEMITSOLUTION 的环境变量设置为 1,以获取可解析的解决方案 (.sln) 文件的 XML 版本.根据 MSBuild 团队博客,该版本仍在 Visual Studio 2010 随附的版本中,但似乎不起作用.

In prior versions 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.

有没有人设法在 MSBuild 4.0 中使用它?如果是,需要什么?

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

(我们使用它来使用 NAnt 脚本查找和运行基于约定的单元测试.)

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

推荐答案

设置 MSBuildEmitSolution=1 然后从命令行构建.然后,您应该会在 MySolution.sln 附近看到一个 MySolution.sln.metaproj 文件.

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

注意事项:

  • 如果您打开命令提示符窗口,然后通过系统设置设置环境变量,则必须打开一个新的命令提示符.
  • 您可能认为您还可以使用 msbuild/p:MSBuildEmitSolution=1,但您不能.
  • 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.

这篇关于MSBUILDEMITSOLUTION 不适用于 .NET 4?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆