开发者

how to register a dll using MSBuild

开发者 https://www.devze.com 2023-04-06 04:49 出处:网络
I\'m trying to register a DLL o开发者_如何转开发n a machine using MS build to avoid having to manually register it every time.Can anyone point me in the right direction please?

I'm trying to register a DLL o开发者_如何转开发n a machine using MS build to avoid having to manually register it every time. Can anyone point me in the right direction please? Thanks,


using the MSBuild Community Tasks you can use the InstallAssembly task

Example:

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

Or:

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


Another approach is using the Exec task and call gacutil.exe which is shipped with .NET FX SDK.

So you don't need any additional software.

0

精彩评论

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

关注公众号