c# - 如何使用 MSBuild 注册一个 dll

标签 c# visual-studio msbuild

我正在尝试在使用 MS build 的机器上注册一个 DLL,以避免每次都必须手动注册。谁能指出我正确的方向? 谢谢,

最佳答案

使用 MSBuild Community Tasks您可以使用 InstallAssembly 任务

例子:

<InstallAssembly AssemblyFiles="Engine.dll;Presenter.dll" />

或者:

<MSBuild Projects="Project1.csproj;Project2.csproj">
 <Output TaskParameter="TargetOutputs" ItemName="ProjectBinaries" />
</MSBuild>
<InstallAssembly AssemblyFiles="@(ProjectBinaries)" />

关于c# - 如何使用 MSBuild 注册一个 dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7499762/

相关文章:

c# - 帮助创建递归函数 C#

.net - Visual Studio 2005 和 .Net 框架 1.1

TFS 2015 内部版本 : Test results not being published

c# - 使用预留IP Azure 构建失败

c# - C# 中库存系统的数据库

c# - 是否可以限制 EventWaitHandle 的设置/重置?

c# - 自动封装字段重构, 'Use field' 和 'Use Property' 之间的区别?

c++ - 如何使用winapi更改标题栏图标

msbuild - 如何解决 : Custom MSBuild task requires assembly outside of AppBase

C# : overloading constructors with optional parameters & named arguments?