An error occurred while validating. HRESULT = '8000000A'
Asked Answered
S

20

119

I have been receiving this error for a while when using devenv on an automatic build. I have gone through every website I can find, and the usual answers mention refreshing dependencies (Which I believe fixes it for manual deployment, but not for automatic) and removing the source control coding from the projects, which hasn't helped me.

The error does not occur every time I build, but it seems random on different deployment projects each time.

Does anyone have any advice on why exactly this error occurs and how to go about fixing it?

Shyster answered 27/12, 2011 at 19:25 Comment(2)
did you get more elegant solution finally ? you have just been re-triggering the build when it fails, Maybe useful put script (elegant solution) in gist, IMHO.Benilda
@Benilda set an environment variable before running devenv in ci as described hereEure
N
55

This is a known issue in Visual Studio 2010 (a race condition). See this connect item.

We've run into this as well, and had a very unsatisfying support call on this issue with Microsoft. Long story short: it's a known issue, it won't be solved, and Microsoft advises to move away from Visual Studio Setup projects (.vdproj).

We've worked around this issue by triggering the MSI build a second time when it fails a first time. Not nice, but it works most of the time (error rate is down from ~ 10% to ~ 1%).

Nonmaterial answered 2/1, 2012 at 23:13 Comment(4)
Thank you very much. I had been scouring the internet to find why exactly it was happening, and ran across numerous Microsoft replies that were vague and unhelpful, to say the least. I have just been re-triggering the build when it fails, but was hoping for a more elegant solution. Thanks again.Shyster
@ChrisC. https://mcmap.net/q/181781/-an-error-occurred-while-validating-hresult-39-8000000a-39 answer has more votes, did you tried like that ?Benilda
@Nonmaterial could you explane what you mean by saing triggering the MSI build a second time?, have the same issue..Melee
This happens with VS 2019. And I still resolve it by running "DisableOutOfProcBuild.exe" from "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild"Todtoday
H
125

Update for those who got this issue for VS2013 or VS2015 after upgrading a VS200X setup project using the Microsoft Visual Studio Installer Projects extension.

Following the recipe for v1.0.0.0 from MS finally made it work for me:

Microsoft Visual Studio Installer Projects

Unfortunately we couldn't address all cases of the command line issue for this release as we're still investigating the appropriate way to address them. What we do have is a workaround that we believe will work for almost all of them. If you are still suffering this issue then you can try to change the DWORD value for the following registry value to 0: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\MSBuild\EnableOutOfProcBuild (VS2013)
or
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config\MSBuild\EnableOutOfProcBuild (VS2015)
If this doesn't exist you can create it as a DWORD.

Hindustan answered 31/7, 2014 at 8:49 Comment(11)
Note that Visual Studio 2013 updates will wipe this variable out from your registry - You will need to re-add it.Pterosaur
This just happened on VS2015, and the registry fix worked for me too. Is there a connect issue we can upvote? I've logged one already to request turning off auto-detect dependencies, which has caused me no end of pain - and which may actually help if that's the root cause. connect issueFinzer
Fixed my issue too:#37846205Ladybug
Just a note, when working with Jenkins, the registry key need to be added for the user running Jenkins slaves.Ladybug
Tried this, copied and pasted the registry name into regedit from here - didn't work. Looking at it for hours, when I finally realised that I'd pasted a space in at the end of the name! Schoolboy error I know, but worked when I removed the space!Sixteenmo
KEEP IN MIND the registry hive is HKEY_CURRENT_USER so if this is being called by a different account than you (e.g. tfs build account) you will need to login as THAT account and add the setting.Concertgoer
To add to @DerekW comments, this can also be wiped out by automatic updates.Moore
I am running devenv command line and i am still getting this error changing the registry didn't helpRancourt
This solution doesn't seem to work with VS 2017. I think they may have changed some of where they store some things in the registry as the 15.0_Config key doesn't exist (earlier versions had tons of stuff under it). After trying several things (including using VS2015) without success, I finally resigned and spent my afternoon moving my installer to WIX. Works great now.Amaranth
@MikeCheel you can set HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\14.0_Config\MSBuild\EnableOutOfProcBuild to fix it for all users :)Edwyna
There's a much easier workaround for VS2019 detailed at developercommunity.visualstudio.com/t/…. Short version, go to C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild and run DisableOutOfProcBuild.exe.Adept
F
76

Update as of 6/14/2017

the Microsoft Visual Studio 2017 Installer Projects extension now includes a command line helper tool for making the registry setting much easier to apply Microsoft Visual Studio 2017 Installer Projects

Example paths of the tool (based on the version of Visual Studio installed)

Professional Edition: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\DisableOutOfProcBuild.exe


Community Edition: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\DisableOutOfProcBuild.exe

From the README


This simple tool is meant to help users set the registry key needed to get around this error that can appear when building installer projects using command line builds:

ERROR: An error occurred while validating. HRESULT = '8000000A'

The tool is meant for Visual Studio 2017+ and sets this reg key for a particular installed Visual Studio instance for the current user. So if you're setting this on a build agent make sure to use the user account that the build will use.

Run "DisableOutOfProcBuild.exe help" for usage details.


Federico answered 9/8, 2017 at 2:35 Comment(5)
This is the best solution for VS2017Geriatric
I think this is the third time where I had this problem, spent hours trying to fix and, and then finally re-discovering this answer. Thanks!Moneywort
You have to change dir to that location for it to work properly. See github.com/it3xl/MSBuild-DevEnv-Build-Server-Workarounds/issues/… and github.com/it3xl/MSBuild-DevEnv-Build-Server-Workarounds/blob/…Finzer
Perfect for me using Visual Studio 2019 Community Edition on my build machine.Sharpset
This worked for me too. I got the same exact error while e building a solution via the Azure pipeline task. I just called this exe once, in the CommandLine task, and it worked!Todtoday
N
55

This is a known issue in Visual Studio 2010 (a race condition). See this connect item.

We've run into this as well, and had a very unsatisfying support call on this issue with Microsoft. Long story short: it's a known issue, it won't be solved, and Microsoft advises to move away from Visual Studio Setup projects (.vdproj).

We've worked around this issue by triggering the MSI build a second time when it fails a first time. Not nice, but it works most of the time (error rate is down from ~ 10% to ~ 1%).

Nonmaterial answered 2/1, 2012 at 23:13 Comment(4)
Thank you very much. I had been scouring the internet to find why exactly it was happening, and ran across numerous Microsoft replies that were vague and unhelpful, to say the least. I have just been re-triggering the build when it fails, but was hoping for a more elegant solution. Thanks again.Shyster
@ChrisC. https://mcmap.net/q/181781/-an-error-occurred-while-validating-hresult-39-8000000a-39 answer has more votes, did you tried like that ?Benilda
@Nonmaterial could you explane what you mean by saing triggering the MSI build a second time?, have the same issue..Melee
This happens with VS 2019. And I still resolve it by running "DisableOutOfProcBuild.exe" from "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild"Todtoday
T
53

Permanent solution (+ for build-machines)

Visual Studio 2017

For VS 2017, call the following CMD scripts under your target Windows account:

Community edition
Professional edition
Enterprise edition

TL;DR. Notes for poor DisableOutOfProcBuild.exe, the Microsoft's offered solution that I use for VS 2017.

  1. DisableOutOfProcBuild.exe doesn't assume you will call it out of its installation folder. So, you can't copy this .exe file. (By the way, if you want to build .vdproj, you must install VS.)
  2. DisableOutOfProcBuild.exe will only work if the current CMD directory is set to the installation location of DisableOutOfProcBuild.exe.

As an example, for VS Professional edition we must call

CD "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild"
CALL DisableOutOfProcBuild.exe

Visual Studio 2015 and earlier

by CMD for the current Windows user

For many people the creation/correction under HKEY_CURRENT_USER\.. doesn't always work or work permanently.
Trying to solve this, I found that in fact I have to create/change some weird key under HKEY_USERS HKEY_USERS\S-1-5-xx-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxxxx-xxxxx\...\MSBuild

But I also found that if I will be using a CMD console for HKCU with the proposed fix
REG ADD HKCU\SOFTWARE\Microsoft\VisualStudio\14.0_Config\MSBuild /t REG_DWORD /v EnableOutOfProcBuild /d 0 /f
this will write the value exactly into that weird key HKEY_USERS\S-1-5-xx-xxxxxxxxxx-xx..., not to the HKEY_CURRENT_USER.

So, this works from a first shot and forever. Just use the CMD console.

REG ADD HKCU\SOFTWARE\Microsoft\VisualStudio\14.0_Config\MSBuild /t REG_DWORD /v EnableOutOfProcBuild /d 0 /f
@REM (use 12.0_Config for VS2013)

Solver for Build Servers

On the other hand this code always works for a current user account which launches it (because of HKEY_CURRENT_USER). But build-servers often use dedicated accounts or Local System, etc.

I fixed it on my build-machines by adding the following simple batch file to my build tasks (Jenkins, TeamCity, CruiseControl)

VS-2015, VS-2013, VS-2017-Community, VS-2017-Professional, VS-2017-Enterprise

Tetherball answered 22/1, 2017 at 8:21 Comment(8)
after patching the reg evrey few month for 2 years now, and the CMD file not working finely some solutionBracket
Had same issue pop up out of nowhere when building an MSI from setup project on a build server. Build process always worked before and hadn't changed, but started failing consistently. Added this to the build script just before the call to devenv.exe and it worked for me in VS 2013. Thanks a ton.Sn
In VS 15.8.x I get this error even after running the EXE, however by closing VS, then running the EXE and then restarting VS, the error is resolved. So something in VS is resetting the reg setting, and the solution is to close VS, rerun DisableOutOfProcBuild.exe and then start VS.Swetiana
This fix worked for VS2015 TFS vNext builds. We use the local NT Authority\Network Service account for auto builds, so manually adding the reg key from RDPing into the build VM didn't fix the auto build error. I added the step to create the reg key right before the step to call Devenv.com for the VDPROJ file. After struggling so long to find a fix for this, I want to thank it3xl very much for posting it!!!Polyphyletic
Works for me, thanks a lot! We are using Bamboo build server, so I just call your script before the build.Stinkhorn
The problem has come back for me on Visual Studio 2022, after not having to worry about it on 2019. This was the solution that fixed it in vs 2022. The path was : C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuildSwetiana
As an update to my comment above on visual studio 2022 - the problem keeps coming back even when I re-run DisableOutOfProcBuild, but a reboot after running DisableOutOfProcBuild seems to resolve it every time, which is very frustrating but at least worksSwetiana
Works for VS 2022. As you wrote, DisableOutOfProcBuild.exe MUST BE CALLED from its folder. You'll get "Failed to find Visual Studio instance for path <current path>" Otherwise. Many thanks!Indispose
O
49

I read somewhere online about this, and I have fixed it like this (it was suggested by someone):

  • open your setup project file (.vdproj) in notepad (or any other text editor)
  • delete these lines at a beginning of the .vdproj file:

    "SccProjectName" = "8:"
    "SccLocalPath" = "8:"
    "SccAuxPath" = "8:"
    "SccProvider" = "8:"
    
  • build again - error is gone

That error didn't stop me from deploying, building, debugging (or anyting) my project it just annoyed me. And it came on even if I set all projects to be build in a current configuration and the setup project not to.

Oud answered 12/6, 2012 at 12:25 Comment(2)
The problem with the issue is that it is a race condition. Making a (random) adjustment and rebuilding will make it seem like it is fixed. Just rebuildng would have make the problem disapear as well. I would like to know if it remains 'fixed' after 100 builds.Blacken
Might be a race condition, but the above fix works and allows me to get on with my life (until the next issue that has me scouring stack overflow:))Aviary
D
6

As pointed out in the comments here, for VS2017 you will need to create the DWORD HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0_[IDKey]_Config\MSBuild\EnableOutOfProcBuild Replace [IDKey] with the ID suffix of the existing 15.0 subkey of VisualStudio.

For example, if under VisualStudio you see the key "15.0_abcd1234" it would be "15.0_abcd1234_Config".

regedit example

Dichlorodiphenyltrichloroethane answered 19/4, 2017 at 19:47 Comment(0)
R
5

The hotfix is now uploaded on here:

http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=33186

you can read about it here:

http://connect.microsoft.com/VisualStudio/feedback/details/595632/inconsistent-hanging-with-devenv-2010

Ratha answered 14/6, 2012 at 14:53 Comment(1)
As you can read in th connect item i linked in my answer, the hotfix doesn't work.Blacken
H
4

I have faced with this issue after I moved my project to another PC(VS 2010, multiple projects in a solution).

It was already built my project in the source computer but after I copied to target, I wasn't be able to build my Setup Project and having this error.

I opened the /Debug folder under my Setup Project root path, there were MyProject.msi and setup.exe files, I deleted them and built my project again, it worked. Hope it works for some fellas, too.

Hurt answered 13/9, 2012 at 6:6 Comment(4)
one more +1, just deleting the .msi and setup.exe files and rebuilding the setup project made the error message go awayAlissaalistair
and a -1, it appears to only solve this issue temporarily, after reopening the solution the problem reappearedAlissaalistair
@ChrisSchiffhauer for solve it, only you delete msi and exe files?Benilda
Well said by @kubilay, many thanks for your solution!! This issue may cause while porting projects from older to newer framework, as we set newer framework version in project properties. Possibly, setup project may contains .msi and .exe files in its target location. With new framework version, it can generate error while overwriting exiting files. So, right click on setup project -> goto 'Output file name' (Under Configuration Properties\Build) -> click on '...' (browse) button -> get target location, and delete .msi as well .exe files. Now build the project and it should work.Moncton
O
3

Okay I looked into this issue until I was blue in the face, red in the face, losing my hair, and losing my mind, and tried every step I could find. :-D

My solution for Visual Studio 2017 / TeamCity was a combination of the two solutions from @it3xl and some assistance from @Night94.

The issue seemed to be that the registry key for the TeamCity user was missing.

  • Running DisableOutOfProcBuild.exe as mentioned by @AussieAsh therefore didn't work as it added the registry key for my user only.
  • using the script mentioned by @it3xl also failed when run from TeamCity

The solution was therefore to add the following as a command line build step from TeamCity before MSBuild:

REG ADD HKCU\SOFTWARE\Microsoft\VisualStudio\15.0_2c79e3fe_Config\MSBuild /t REG_DWORD /v EnableOutOfProcBuild /d 0 /f

Once this step ran, it could then be removed if required.

Solution summary

Either:

  • run DisableOutOfProcBuild.exe as the TeamCity user, or
  • navigate to the registry key HKCU\SOFTWARE\Microsoft\VisualStudio and check the version listed, then amend the above REG ADD to match the versions (remember to add _Config) as a step in the TeamCity build.

Again the above should only have to be done once. You could then disable this step in TeamCity leaving it for reference should you run into the issue again.

Otherworld answered 27/9, 2019 at 10:34 Comment(0)
E
3

Ended up in the same issue this blog helped me https://spin.atomicobject.com/2022/05/17/visual-studio-installer-azure/

here is the YML which helped

trigger:
- '*'

pool:
  vmImage: 'windows-2022'

variables:
  solution: '**/MySolution.sln'
  buildPlatform: 'Any CPU'
  devCmd: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.com'
  disableToolPath: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild'
  
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
  displayName: Restore NuGet packages
  inputs:
    restoreSolution: '$(solution)'

# https://github.com/it3xl/MSBuild-DevEnv-Build-Server-Workarounds/issues/1#issuecomment-525435637
- task: BatchScript@1
  displayName: Enable .vdproj Builds
  inputs:
    filename: '"$(disableToolPath)\DisableOutOfProcBuild.exe"'
    workingFolder: '"$(disableToolPath)"'

- script: '"$(devCmd)" $(System.DefaultWorkingDirectory)\MySolution.sln /Build "Release" /Project $(System.DefaultWorkingDirectory)\Installer\MyInstaller.vdproj'
  displayName: Build Installer
Eyeglass answered 9/11, 2022 at 9:27 Comment(0)
R
1

Checking the project dependencies may help.

In VS 2010 right click in your solution explorer then click Detected Dependencies and Refresh Dependencies, it sometime resolves the problem.

Revealment answered 10/12, 2012 at 15:25 Comment(0)
B
1

Visual Studio 2017 stores the information previously stored in the public registry within a new private registry: C:\Users\\AppData\Local\Microsoft\VisualStudio\15.0_6de65198\privateregistry.bin

This is where you need to add the EnableOutOfProcBuild as per the instructions for VS2013/VS2015.

To update the private registry you can use Regedit.

Click to select the HKEY_USERS node.

Select File > Load Hive and navigate to the privateregistry.bin file. When you select it Regedit will ask for a name - it doesn't matter what you call it as we will soon be done.

Now the registry structure will appear and you can navigate down to the Microsoft\VisualStudio\15.0_Config\MSBuild

Create a new DWORD EnableOutOfProcBuild with a value of 0.

Once done select the hive's root (whatever you named it earlier) and use File > Unload Hive to detach from it.

Now it should work :o)

Bentinck answered 13/5, 2017 at 15:45 Comment(2)
No need to mess with the private registry file, you can just create the 15.0_<x>_Config key in the regular registry yourself (see above)Dichlorodiphenyltrichloroethane
This was the only solution that worked for me in VS 2022Unwisdom
E
1

Just run this exe

(Visual Studio 2017 Community edition)

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\DisableOutOfProcBuild.exe

(Visual Studio 2017 Enterprise edition)

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\DisableOutOfProcBuild.exe

Ewe answered 21/12, 2018 at 19:20 Comment(0)
W
1

I am using VS 2017 but none of above solution work. So, upgraded latest version of VS 2017 and apply @AussieAsh solution and its work fine...

I hope this solution may someone will work.

Wergild answered 8/1, 2019 at 10:0 Comment(0)
F
0

with me it was caused by a wrong .suo file. ( caused by skydrive ) deleting this file solved the problem.

Falster answered 11/6, 2013 at 7:50 Comment(1)
DisableOutOfProcBuild.exe worked for a while until it didn't. Deleting the .suo file fixed the issue.Mealymouthed
H
0

My Visual Studio 2013 somehow became Experimental so it started using another registry key for EnableOutOfProcBuild

enter image description here

To be sure I just added another line in my batch file for setting the registry value and it started working:

REG ADD HKCU\SOFTWARE\Microsoft\VisualStudio\12.0_Config\MSBuild /t REG_DWORD /v EnableOutOfProcBuild /d 0 /f
REG ADD HKCU\SOFTWARE\Microsoft\VisualStudio\12.0Exp_Config\MSBuild /t REG_DWORD /v EnableOutOfProcBuild /d 0 /f
Hanako answered 9/1, 2018 at 15:12 Comment(0)
B
0

Step-1 I have "created a DWORD key with the name “EnableOutOfProcBuild” and set it’s value to “0” on the below path

“HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0_Config\MSBuild”

Note: Make sure you have log-in with the same user that you are trying to build the project

It is working fine for me.

Balcony answered 15/6, 2020 at 10:43 Comment(0)
E
0

Recently we rant into this again after an update to VS2019 on our build server and neither DisableOutOfProcBuild.exe nor setting the registry key manually did us any favor this thime.

So instead of fixing this error with for the umpteenth time with another weird yet to find registry key, we choose to set EnableOutOfProcBuild as environment variable instead:

'$Env:EnableOutOfProcBuild=0 ; & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.com" TheSetupProject.vdproj /build "Debug|AnyCpu"'

So far that approach still works after a few VS updates.

Eure answered 21/3 at 8:55 Comment(0)
O
-1

Had this problem today, try restarting Visual Studio, if that doesn't do it create a new project, save it and then copy the files from the problem project over. both methods worked for me.

Osis answered 14/8, 2013 at 20:14 Comment(0)
S
-3

Please clean the solution first, build the solution and than try to build the installer. It will remove the error.

Satem answered 28/7, 2015 at 12:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.