验证时发生错误。 HRESULT =“8000000A”
在自动构建中使用 devenv 时,我已经收到此错误一段时间了。我浏览了我能找到的每个网站,通常的答案提到刷新依赖项(我相信它可以修复手动部署,但不能修复自动部署)并从项目中删除源代码控制编码,这对我没有帮助。
该错误并不是每次构建时都会发生,但每次在不同的部署项目上似乎都是随机的。
有谁对为什么会发生此错误以及如何修复它有任何建议?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(20)
针对使用 Microsoft Visual Studio 安装程序项目扩展升级 VS200X 安装项目后遇到 VS2013 或 VS2015 问题的用户进行更新。
遵循 MS 的 v1.0.0.0 配方最终使它对我有用:
Microsoft Visual Studio Installer项目
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
自 2017 年 6 月 14 日起更新,
Microsoft Visual Studio 2017 安装程序项目扩展现在包含一个命令行帮助工具,使注册表设置更容易应用
Microsoft Visual Studio 2017 安装程序项目
工具的示例路径(基于版本)安装了 Visual Studio)
来自自述文件
这个简单的工具旨在帮助用户设置解决此错误所需的注册表项,该错误可能在使用命令行构建构建安装程序项目时出现:
错误:验证时发生错误。 HRESULT = '8000000A'
该工具适用于 Visual Studio 2017+,并为当前用户的特定安装的 Visual Studio 实例设置此注册表项。因此,如果您在构建代理上进行此设置,请确保使用构建将使用的用户帐户。
运行“DisableOutOfProcBuild.exe help”以获取使用详细信息。
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)
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.
这是 Visual Studio 2010 中的一个已知问题(竞争条件)。请参阅此连接项。
我们也遇到过这个问题,并且就这个问题与 Microsoft 进行了一次非常不满意的支持电话。长话短说:这是一个已知问题,无法解决,Microsoft 建议放弃 Visual Studio 安装项目 (.vdproj)。
我们通过在第一次失败时再次触发 MSI 构建来解决此问题。不太好,但它在大多数情况下都有效(错误率从 ~ 10% 下降到 ~ 1%)。
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%).
永久解决方案(+ 用于构建机器)
Visual Studio 2017
对于 VS 2017,在目标 Windows 帐户下调用以下 CMD 脚本:
社区 版本
专业版
企业
版
TL;DR. 可怜的
DisableOutOfProcBuild.exe
的注释,微软提供的解决方案,我用于 VS 2017。DisableOutOfProcBuild.exe
不假设你将其称为超出其安装文件夹。因此,您无法复制此 .exe 文件。 (顺便说一句,如果要构建 .vdproj,则必须安装 VS。)DisableOutOfProcBuild.exe
才会起作用。例如,对于 VS Professional 版本,我们必须
调用Visual Studio 2015 及更早版本
通过 CMD 为当前 Windows 用户
对于许多人来说,
HKEY_CURRENT_USER\..
下的创建/更正并不适用并不总是工作或永久工作。试图解决这个问题,我发现实际上我必须在 HKEY_USERS
HKEY_USERS\S-1-5-xx-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxxxx-xxxxx\ 下创建/更改一些奇怪的键。 ..\MSBuild
但我还发现,如果我将使用 CMD 控制台进行
HKCU
以及建议的修复REG ADD HKCU\SOFTWARE\Microsoft\VisualStudio\14.0_Config\MSBuild /t REG_DWORD /v EnableOutOfProcBuild /d 0 /f
这会将值精确写入那个奇怪的键 HKEY_USERS\S-1-5-xx-xxxxxxxxxx-xx...,而不是 HKEY_CURRENT_USER。
所以,这从第一次拍摄开始一直有效。只需使用 CMD 控制台即可。
构建服务器的求解器
另一方面,此代码始终适用于启动它的当前用户帐户(因为 HKEY_CURRENT_USER)。但构建服务器通常使用专用帐户或本地系统等。
我通过将以下简单的批处理文件添加到我的构建任务(Jenkins、TeamCity、CruiseControl)中,将其修复在我的构建机器上
VS -2015年,
VS-2013,
VS-2017-社区,
VS-2017-专业版,
VS-2017-企业
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.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.)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
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 fixREG 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.
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
我在网上的某个地方读到了有关此问题的信息,并且我已经像这样修复了它(这是由某人建议的):
删除 .vdproj 文件开头的这些行:
该错误并没有阻止我部署、构建、调试(或任何其他)我的项目,它只是让我烦恼。即使我将所有项目设置为在当前配置中构建并且设置项目不这样做,它也会出现。
I read somewhere online about this, and I have fixed it like this (it was suggested by someone):
delete these lines at a beginning of the .vdproj file:
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.
正如评论此处中指出的,对于VS2017,您需要创建 DWORD HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0_[IDKey]_Config\MSBuild\EnableOutOfProcBuild
将 [IDKey] 替换为 VisualStudio 现有 15.0 子项的 ID 后缀。
例如,如果在 VisualStudio 下您看到键“15.0_abcd1234”,则它将是“15.0_abcd1234_Config”。
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".
该修补程序现已上传到此处:
http://connect.microsoft.com /VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=33186
您可以在此处阅读相关内容:
http://connect.microsoft.com/VisualStudio/feedback /details/595632/inconsistency-hanging-with-devenv-2010
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
在我将项目转移到另一台电脑(VS 2010,一个解决方案中的多个项目)后,我遇到了这个问题。
它已经在源计算机中构建了我的项目,但在复制到目标后,我无法构建我的安装项目并出现此错误。
我打开安装项目根路径下的
/Debug
文件夹,里面有MyProject.msi
和setup.exe
文件,我删除了它们并构建我的项目再次成功了。希望它也适用于一些人。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 wereMyProject.msi
andsetup.exe
files, I deleted them and built my project again, it worked. Hope it works for some fellas, too.好吧,我研究这个问题,直到我脸色发青、脸红、头发掉光、失去理智,并尝试了我能找到的每一个步骤。 :-D
我的 Visual Studio 2017 / TeamCity 解决方案是 @it3xl 以及来自 @Night94。
问题似乎是 TeamCity 用户 的注册表项丢失。
DisableOutOfProcBuild.exe
如所述因此,@AussieAsh 不起作用,因为它仅为我的用户添加了注册表项。因此,解决方案是在 MSBuild 之前添加以下内容作为 TeamCity 的命令行构建步骤:
此步骤运行后,如果需要,可以将其删除。
解决方案
摘要:
DisableOutOfProcBuild.exe
,或者HKCU\SOFTWARE\Microsoft\VisualStudio
并检查列出的版本,然后修改上面的REG ADD
以匹配版本(记住添加_Config
)作为 TeamCity 构建中的一个步骤。同样,上述操作只需执行一次。然后,您可以在 TeamCity 中禁用此步骤,以供再次遇到问题时参考。
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.
DisableOutOfProcBuild.exe
as mentioned by @AussieAsh therefore didn't work as it added the registry key for my user only.The solution was therefore to add the following as a command line build step from TeamCity before MSBuild:
Once this step ran, it could then be removed if required.
Solution summary
Either:
DisableOutOfProcBuild.exe
as the TeamCity user, orHKCU\SOFTWARE\Microsoft\VisualStudio
and check the version listed, then amend the aboveREG 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.
最终遇到了这个博客帮助我的同一问题 https:/ /spin.atomicobject.com/2022/05/17/visual-studio-installer-azure/
这是帮助的 YML
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
检查项目依赖关系可能会有所帮助。
在 VS 2010 中,右键单击解决方案资源管理器,然后单击“检测到的依赖项”并刷新“依赖项”,有时可以解决问题。
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.
Visual Studio 2017 将之前存储在公共注册表中的信息存储在新的私有注册表中:
C:\Users\\AppData\Local\Microsoft\VisualStudio\15.0_6de65198\privateregistry.bin
这是您需要按照 VS2013/VS2015 说明添加 EnableOutOfProcBuild 的位置。
要更新私有注册表,您可以使用 Regedit。
单击以选择 HKEY_USERS 节点。
选择文件>加载 Hive 并导航到 privateregistry.bin 文件。当您选择它时,Regedit 会要求输入一个名称 - 无论您如何称呼它,因为我们很快就会完成。
现在将出现注册表结构,您可以导航到 Microsoft\VisualStudio\15.0_Config\MSBuild
创建一个值为 0 的新 DWORD EnableOutOfProcBuild
。完成后,选择配置单元的根目录(无论您之前命名它)并使用 File > 。卸载 Hive 以与其分离。
现在应该可以了:o)
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)
只需运行此exe
(Visual Studio 2017社区版)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\DisableOutOfProcBuild.exe
(Visual Studio 2017 企业版)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\DisableOutOfProcBuild.exe
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
我正在使用 VS 2017,但上述解决方案均不起作用。
因此,升级了 VS 2017 的最新版本并应用 @AussieAsh 解决方案并且它工作正常......
我希望这个解决方案可能有人会工作。
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.
对我来说,这是由错误的 .suo 文件引起的。 (由网盘引起)
删除该文件解决了问题。
with me it was caused by a wrong .suo file. ( caused by skydrive )
deleting this file solved the problem.
我的 Visual Studio 2013 不知何故变成了实验,因此它开始使用另一个注册表项EnableOutOfProcBuild
为了确保我刚刚添加了另一行在我的批处理文件中设置注册表值,它开始工作:
My Visual Studio 2013 somehow became Experimental so it started using another registry key for EnableOutOfProcBuild
To be sure I just added another line in my batch file for setting the registry value and it started working:
步骤 1 我已在以下路径上“创建了一个名为“EnableOutOfProcBuild”的 DWORD 密钥,并将其值设置为“0”
< strong>注意:确保您使用与尝试构建项目相同的用户登录
它对我来说工作正常。
Step-1 I have "created a DWORD key with the name “EnableOutOfProcBuild” and set it’s value to “0” on the below path
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.
最近,在我们的构建服务器上更新到 VS2019 后,我们再次抱怨这个问题,而
DisableOutOfProcBuild.exe
和手动设置注册表项都没有给我们带来任何好处。因此,我们没有无数次用另一个奇怪的尚未找到的注册表项来修复此错误,而是选择将
EnableOutOfProcBuild
设置为环境变量:到目前为止,该方法在几次 VS 更新后仍然有效。
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:So far that approach still works after a few VS updates.
今天遇到这个问题,尝试重新启动 Visual Studio,如果这不起作用,则创建一个新项目,保存它,然后从问题项目中复制文件。两种方法都对我有用。
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.
请先清理解决方案,构建解决方案,然后尝试构建安装程序。它将消除该错误。
Please clean the solution first, build the solution and than try to build the installer. It will remove the error.