I'm trying to install the 3.10.2 version of the Wix Toolset Installer but when I launch the installer nothing happens. Pulling up the log file reveals the following errors:
[15A4:1580][2016-03-04T07:54:57]e000: Error 0x80070005: Failed to launch clean room process: C:\Users\MALLAR~1\AppData\Local\Temp\1\{BA709DF5-6D54-418B-9760-DD363E3FE5DD}\.cr\wix310.exe
[15A4:1580][2016-03-04T07:54:57]e000: Error 0x80070005: Failed to run untrusted mode.
I am unable to find anything related to this error.
3.10.2 introduced the clean room concept to mitigate dll hijacking attacks. This involves copying itself to a clean folder in the user's temp directory and then doing most of the work from that new process. Aggressive AV products might interfere with this. For more information about clean room see http://wixtoolset.org/development/wips/5184-burn-clean-room/ and https://www.firegiant.com/blog/2016/1/20/wix-v3.10.2-released/.
Related
While building the Windows environment for OsQuery (on my Windows 10 VM) from their website(link: https://osquery.readthedocs.io/en/stable/development/windows-provisioning/), I am getting the msb1009 error during the phase where I have to run the tools\make-win64-binaries.bat command. I get the following result after running that command:
CMake Error at CMakeLists.txt:402 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: VCTargetsPath.vcxproj
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Windows/System32/osquery/build/windows10/CMakeFiles/CMakeOutput.log".
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: osquery.sln
[-] osquery build failed.
I have been trying to make the osquery.sln file using that command and have looked online for solutions but without any success. Any help would be much appreciated!
Thanks in advance
Edit: Here is the output of running tools\make-win64-dev-env.bat and tools\make-win64-binaries.bat
tools\make-win64-dev-env.bat
tools\make-win64-dev-env.bat (contd..)
tools\make-win64-binaries.bat
Could you paste the full output of running the tools\make-win64-dev-env.bat and tools\make-win64-binaries.bat? Also have you tried closing out your shell and re-opening, or even worse -- reboot the system?
I ask because, as you note, it seems like the solution file never gets generated, which usually means there was either a missing dependency during provision, or some other issue when the script first ran. On first provision it's typically the case that a system reboot is needed, as Visual Studio community typically requires one. Further, we set a few shell environment variables that are leveraged during the build process, however those are supposed to be set at the end of the provisioning script.
Also feel free to hit us up in our Slack and check out the #windows channel :)
After a lot of code reading, researching online and trial and error, I found out that after a clean OS install, one would need to install git and then immediately clone the osquery repository on the user desktop rather than System32. This worked fine, at least for me. Just make sure to switch directories when opening command line with administrator mode.
I am trying to get TeamCity up and running for a CI / CD server. So far I have it connected to my Git repo, it pulls the repo and builds. Great.
Now I am trying to publish it. (My web server is also the CI server and agent).
I keep getting this error:
C:\TeamCity\buildAgent\work\f56e1490ff15a5c4\P4P.Web\P4P.Web.csproj(1373, 5): warning MSB3026: Could not copy "\pagefile.sys" to "C:\inetpub\wwwroot\P4P\build\pagefile.sys". Beginning retry 8 in 1000ms. The process cannot access the file '\pagefile.sys' because it is being used by another process.
It ultimately fails and fails the entire publish process.
C:\TeamCity\buildAgent\work\f56e1490ff15a5c4\P4P.Web\P4P.Web.csproj(1373, 5): error MSB3027: Could not copy "\pagefile.sys" to "C:\inetpub\wwwroot\P4P\build\pagefile.sys". Exceeded retry count of 10. Failed.
C:\TeamCity\buildAgent\work\f56e1490ff15a5c4\P4P.Web\P4P.Web.csproj(1373, 5): error MSB3021: Unable to copy file "\pagefile.sys" to "C:\inetpub\wwwroot\P4P\build\pagefile.sys". The process cannot access the file '\pagefile.sys' because it is being used by another process.
I found this ow SO. I tried downgrading the Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers packages to 1.0.0. I have even tried removing them entirely.
I have looked at all csproj files for references to these packages (including the package.config). Nothing.
I have no idea where to even begin to fix this.
My server is running Windows Server 2012 R2. I installed VS professional.
Any ideas?
I encountered the same issue.
The problem starts when you upgrade the DotNetCompilerPlatform to version 1.0.1.
To work around this issue you can downgrade to version 1.0.0 using the NuGet package manager.
EDIT: If you uninstall Microsoft.CodeDom.Providers.DotNetCompilerPlatform AND Microsoft.Net.Compilers, and then install the DotNetCompilerPlatform (has a dependency on the Microsoft.Net.Compilers package so it will automatically install that) package again the error disappears for good so it seems.
Also check this issue link - error MSB3027: Could not copy "C:\pagefile.sys" to "bin\roslyn\pagefile.sys". Exceeded retry count of 10. Failed
I have a WIX installer that acts as a content installer for users. It's supposed to install these files in a specific directory. Unfortunately when I run it I get the following error: "The system cannot open the device or specified file." This then gives me error code 2755 after canceling the install (retry does not work).
I've looked through other questions with similar issues, and it does not appear to be an encryption problem on temp, the install folder, or the MSI installer itself - these all appear fine. This also isn't a problem with the C:\Windows\Installer folder being read-only.
I've never had a problem with a WIX installer before. What other things can I try to get this working?
For me the problem solved when the installer run as administrator.
I was seeing all of the following errors when installing my 3.5 GB .msi generated by WiX:
DEBUG: Error 2709: The specified Component name ('cmpF7216C180B7A7119CC61FDB3BD209D5D') not found in Component Table.
DEBUG: Error 2755: Server returned unexpected error 110 attempting to install package D:\...\setup.msi.
The system cannot open the device or specified file
Turning off EmbedCab made them all go away:
<Wix>...
<Product>...
<MediaTemplate EmbedCab="no" />
I unfortunately now have 30 cab files to deal with, but at least the install succeeds.
I'm having some strange issues with WiX on my local machine. The problem is intermittent, but after a few rebuilds of the solution, the WiX project starts throwing ICE validation errors.
If I go into my AppData\Local\Temp folder and delete all the temporary folders that contain the MSI, the solution compiles again. A short while later, the problem starts happening again. Having to keep clearing down the temp folders isn't a sustainable or satisfactory solution.
Has anyone else encountered this issue? The validation error codes seem to always be a combination of ICE30, ICE38, ICE64 and ICE91
Update:
As requested, here are the entries from the most recent failure:
error LGHT0204: ICE38: ICE Internal Error 1002. API Returned:
1615. error LGHT0204: ICE38: Error 2235: /OU.AppFramework.Includes.msi, _Profile, UPDATE Directory SET
_Profile=0 error LGHT0204: ICE64: ICE Internal Error 1001. API
Returned: 1615. error LGHT0204: ICE64: Error 2242:
OU.AppFramework.Includes.msi, _Profile, ALTER TABLE Directory ADD
_Profile SHORT TEMPORARY HOLD error LGHT0204: ICE91: ICE
Internal Error 1001. API Returned: 1615. error LGHT0204: ICE91:
Error 2242: OU.AppFramework.Includes.msi, _Profile, ALTER TABLE
Directory ADD _Profile SHORT TEMPORARY HOLD
Interestingly, this failure occurred before I left the office last night, and the solution compiled OK when I came in this morning. As it seems to centre on the temp directory where the MSI is build by WiX, could it be the build process locking the file?
Update 2:
And now we're back to over 600 errors, mostly repetition of this error:
error LGHT0204: ICE30: ICE Internal Error 100. API Returned: 1615.
error LGHT0204: ICE30: Error 2235: AppFramework.Includes.msi,
_ICE30SFN, SELECT Directory_Parent, Directory, DefaultDir, _ICE30SFN, _ICE30LFN FROM Directory WHERE
Directory.Directory=? AND Directory_Parent<>?
Update 3:
The problem still exists even after trying the suggestion by #limpan. There are a couple of warning given by light that are caused by the MSI output folder being locked when light tries to access the MSI:
Warning 549 The directory '\AppData\Local\Temp\2opu3hxf' is in use and cannot be deleted. light.exe
Try adding <RunWixToolsOutOfProc>true</RunWixToolsOutOfProc> to your WiX project file.
We've had the same issue for a while, and tried various workarounds including deleting the temporary files and setting the msbuild environment variable. These all appeared to work for a while, but eventually (sometimes after a few days) the problem would come back again.
I noticed that on my machine devenv.exe was the process that was locking the files that light.exe was trying to delete. I also stumbled across an unrelated thread which mentioned this project setting to make the WiX tools run out of process. I thought it could be worth a try and it appears to have cured the problem for us (so far...)
I had this issue as well and solved it in my environment.
Short answer:
Add the environment variable MSBUILDDISABLENODEREUSE=1 and restart Visual Studio
Long answer:
There was a warning during build that I first didn't see since I was too focused on the error:
Failed to delete temporary directory: C:\Users[username]\AppData\Local\Temp\5[uniqueFolderName] light.exe
I tried to remove the folder manually, but it was in use by another process.
It turns out that a lot of MSBuild.exe processes are started during build and then not closed again.
You can read more about the reason for that and what you can do to change that behavior in Stack Overflow question msbuild.exe staying open, locking files.
This thread: it and the solution in this thread:
I hope this answer can help someone else.
For ICE30: ICE Internal Error 100. API Returned: 1615, please try this and see if it works:
Close all instances of Visual Studio (may be just the one that matters but just in case)
Go to C:\Documents and Settings\\****user id****\\Local Settings\Temp\.
Clear all the folders that look like this .. 's12qgaks'. Basically it contains the MSI files
Open the solution and recompile.
Good luck!
I too had faced same the issue. In project properties, go to Tool Settings and click Suppress ICE validation.
For me MSBUILDDISABLENODEREUSE=1 (or /nr:false on command line) did not solve the problem.
But <RunWixToolsOutOfProc>true</RunWixToolsOutOfProc> did its job done.
I had the same issue. It turned out to be my Anti Virus software (OfficeScan) It had the intermediate files created by Light.exe locked and the validation process failed. Excluding the temp folder from virus scan or turning off ICE validation is not an acceptable solution.
If anyone has a better solution. I would like to know.
I'm using WiX 3.5. Recently, the following WiX error started occurring frequently on the build server:
light.exe (,): error LGHT0301: Failed to open the database. During validation, this most commonly happens when attempting to open a database using an unsupported code page or a file that is not a valid Windows Installer database. Please use a different code page in Module/#Codepage, Package/#SummaryCodepage, Product/#Codepage, or WixLocalization/#Codepage; or make sure you provide the path to a valid Windows Installer database.
Which "database" does the error refer to? (None of the WiX source files have changed in a long time, so I doubt it's a code page problem.)
Other people have reported that this error may be caused by Trend Micro Office Scan, which is indeed installed on the build server. I asked the system administrator to exclude the build directories from the scan, but this error still occurs. How can I determine whether the virus scanner is the culprit? (The error doesn't always occur, so if I disable the virus scanner and the next build succeeds, I still don't know whether the error has gone away permanently.)
The "Disable the ICE validation" worked for me - just a setting through Visual Studio 2012 in the .Setup.
After studying the WiX source code and running Process Monitor, I found that excluding the build directories from the virus scan is insufficient.
Explanation: When light.exe runs, it creates the target MSI file in a temporary directory. (This file is the database that the LGHT0301 error message refers to.) After light.exe closes the MSI file, ntrtscan.exe opens the MSI file for read access and read-only sharing. Later, in the database validation step, light.exe tries to reopen the MSI file for read/write access, and a sharing violation occurs.
Solution: Exclude the temporary directory from the real-time virus scan. On Windows Server 2008, for example, this directory is C:\Users\«username»\AppData\Local\Temp.
This is a common problem with build processes and antivirus. The scanner will detect the new MSI package and try to scan it. Meanwhile the build process also tries to validate it by running the Internal Consistency Evaluators (ICE) suite and you get a failure because the database has a mutex on it.
You should just remove the virus scan from your build output folders. Alternatively decouple the validation from the Light command so that the antivirus scan relinquishes the MSI handle before you run the ICE validation.
I had the same problem which was actually really related to codepages and language settings of my system.
Adding English input language in Windows' regional settings solved the problem on my German Windows installation.
The real cause was Trend Micro real time scanning!
(The following is only for historical reference)
I followed #Michael Liu answer and solved the problem
I had the same problem.
I am not referring to Codepage (or SummaryCodepage) in any of those tags, or in fact anywhere in the WXS. Putting Codepage="1252" didn't change anything.
Finally, I tried adding
encoding="utf-8"
to the XML tag which previously only had a version='1.0' attribute. This fixed the problem, as described in "Failed to open the database" error. - SOLVED
It was also the antivirus program for me.
An easy way to check if the problem is related to the anti-virus program is to disable the ICE validation in the WiX project setting (using version 3.7). This worked for me, and is a permanent setting now, since in our company you can't change the setting of the antivirus software.
This is the most common error I found while using WiX. The easiest solution for this is go to Properties of your project → Tool Settings → (Check) Suppress ICE Validation.