问题
I am using WiX 3.5 and making an installer. I have used heat.exe to bundle all the files. It produced a WiX file. I referred in main wxs files as componentgroup ref. When I build my installer, it throws the following exception.
light.exe : error LGHT0103 : The system cannot find the file '..........\target\tmp-release\jboss-eap-5.0\jboss-as\server\all\deploy\httpha-invoker.sar\invoker.war\WEB-INF\classes\org\jboss\invocation\http\servlet\ReadOnlyAccessFilter.class' with type ''.
It is able load many files from this location, except the above file, even though the file is present.
回答1:
Looks like you've hit the linker bug. As far as I can see, it was already reported to the WiX team, and was scheduled for v4.0. The comment to the issue states the path is more than 255 characters, so a possible workaround for you is to re-work the files/folders layout to avoid the paths of that length.
Hope this helps.
回答2:
The answer of Ravz1234 works ! I used it with a environment variable e.g. env.SourcePath
.
1) Set an environment variable to show on your Source Dir e.g. C:\SourceDir
2) On heat.exe
add the argument -var env.SourcePath
along with the other arguments
回答3:
I used the variable for the directory, sys.SOURCEFILEDIR
, and it worked well.
来源:https://stackoverflow.com/questions/11921637/wix-canf-find-my-file-unable-to-load-file-error-lght0103