简体   繁体   English

从同一个MSBuild项目构建库和Exe?

[英]Build library and Exe from the same MSBuild project?

My F# project consists of a .dll containing most of my program, a .dll of tests for NUnit, and a small .exe that loads the main library and runs the program. 我的F#项目由一个包含我的大多数程序的.dll,一个针对NUnit的测试的.dll和一个加载主库并运行程序的小.exe组成。

How do I write a single MSBuild .fsproj file that can build all of these? 如何编写可以构建所有这些文件的单个MSBuild .fsproj文件? MonoDevelop generates a project that produces a single output, and I can't find any documentation for MonoDevelop or the MSBuild format for producing multiple outputs for a single project. MonoDevelop生成一个产生单个输出的项目,而我找不到任何有关MonoDevelop或MSBuild格式的文档来为单个项目产生多个输出。

.fsproj, .csproj, etc MSBuild files use Imports that are designed to produce a single Console Application, Windows Application or Class Library. .fsproj,.csproj等MSBuild文件使用旨在生成单个控制台应用程序,Windows应用程序或类库的导入。

Use a solution file that references any number of separate MSBuild projects. 使用引用任何数量的独立MSBuild项目的解决方案文件。 A solution file is not an MSBuild file but MSBuild does translate a solution file into a temporary MSBuild file and builds it instead. 解决方案文件不是MSBuild文件,但MSBuild确实将解决方案文件转换为临时MSBuild文件并进行了构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM