Wix HeatFile Task Locks Dll

二次信任 提交于 2019-12-22 05:17:30

问题


I'm using the Wix HeatFile task in a post build step

<HeatFile OutputFile="Interop.dll.wxs" File="..\Interop\bin\x86\$(Configuration)\Interop.dll" DirectoryRefId="INSTALLDIR" ComponentGroupName="Interop_Dll" AutogenerateGuids="true" SuppressFragments="true" SuppressRootDirectory="true" ToolPath="$(WixToolPath)" PreprocessorVariable="var.InteropBinDir" />

Once I do a build, it locks my dll and subsequent builds fail with:

Error   6   Unable to copy file "obj\x86\Debug\Interop.dll" to "bin\x86\Debug\dll". The process cannot access the file 'bin\x86\Debug\Interop.dll' because it is being used by another process. Interop

until I restart Visual Studio.

How can I stop the Wix task from causing this problem?


回答1:


It seems that this property for the heat task solves your problem:

RunAsSeparateProcess="true"

I had the same problem with HeatDirectory tasks, and it worked for me. Solution was taken from http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Locked-DLL-files-when-using-WiX-HeatDirectory-MSBuild-tasks-td6015042.html



来源:https://stackoverflow.com/questions/9471849/wix-heatfile-task-locks-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!