New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Light throws an exception if access to the msi is denied #4097
Comments
What's the version of light.exe?
|
We are using light 3.7.1224.0
|
Can you post a screen shot of the error dialog so we can see what it's throwing?
|
Sorry, what did you need a screenshot of? On our build server we usually get a standard windows crash dialog, and the stack trace we get in Jenkins is posted above. The exception that is thrown is System.UnauthorizedAccessException. If you really need a screenshot of the dialog, I will try get one next time it crashes.
|
Okay, so dropbox links dont work with your image tag: https://www.dropbox.com/s/3wax7g6w44m5klv/wix1.png
|
I have narrowed the exception down to the following code:
I tried to fix this like so:
But I cant seem to compile the WiX project properly with Visual Studio 2010. It does appear to be a trivial fix though. Note that the file that this exception is thrown for, is never actually there after stopping the build process, so it is getting deleted regardless of this error.
|
This issue is still present in wix 3.8. Are there any plans to fix this?
|
|
The most common cause of errors like this is things like anti-virus scanners that lock WiX's intermediate files. However, WiX should always gracefully handle exceptions, so this is open to be fixed in the WiX v3.x series.
|
|
I've submitted a pull request that fixes this issue. I would like to see this make it into the 3.9 release. My hunch on why the issue occurs intermittently is that Directory.Delete is non-blocking and Windows merely marks the files for deletion. So there is a chance that RecursiveFileAttributes will enumerate the file in the for loop, but by the time it gets to the File.SetAttributes the file may no longer exist.
|
|
|
During the Light stage of our build we have gotten these errors sporadically. We have had these issues within a XP virtual machine and now a Windows Server 2012.
Not only does this affect our builds success, it also pops up a error box that waits to be dismissed. This holds up the entire build queue.
It appears that the file is missing from this location.
We are using Light version 3.8.1128.0
The text was updated successfully, but these errors were encountered: