.net 验证时出错。HRESULT = '8000000A'
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8648428/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
An error occurred while validating. HRESULT = '8000000A'
提问by Chris C.
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.
在自动构建中使用 devenv 时,我收到此错误已有一段时间了。我浏览了我能找到的每个网站,通常的答案都提到了刷新依赖项(我相信修复它是为了手动部署,而不是自动部署)并从项目中删除源代码控制编码,这对我没有帮助。
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?
有没有人对为什么会发生此错误以及如何修复它有任何建议?
采纳答案by o????
This is a known issue in Visual Studio 2010 (a race condition). See this connect item.
这是 Visual Studio 2010 中的一个已知问题(竞争条件)。请参阅此连接项。
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).
我们也遇到了这个问题,并且与 Microsoft 就这个问题进行了非常不满意的支持电话。长话短说:这是一个已知问题,无法解决,Microsoft 建议放弃 Visual Studio 安装项目 (.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%).
我们通过在第一次失败时第二次触发 MSI 构建来解决此问题。不太好,但它大部分时间都有效(错误率从 ~ 10% 下降到 ~ 1%)。
回答by kristian mo
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.
使用 Microsoft Visual Studio 安装程序项目扩展升级 VS200X 安装项目后,针对 VS2013 或 VS2015 遇到此问题的用户进行更新。
Following the recipe for v1.0.0.0 from MS finally made it work for me:
遵循 MS 的 v1.0.0.0 配方最终使它对我有用:
Microsoft Visual Studio Installer Projects
Microsoft Visual Studio 安装程序项目
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)
orHKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config\MSBuild\EnableOutOfProcBuild(VS2015)
If this doesn't exist you can create it as a DWORD.
不幸的是,我们无法解决此版本的所有命令行问题,因为我们仍在研究解决这些问题的适当方法。我们所拥有的是一种解决方法,我们相信它几乎适用于所有人。如果您仍然遇到此问题,那么您可以尝试将以下注册表值的 DWORD 值更改为 0:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\MSBuild\EnableOutOfProcBuild(VS2013)
或HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config\MSBuild\EnableOutOfProcBuild(VS2015)
如果这不存在,您可以将其创建为 DWORD。
回答by Aussie Ash
Update as of 6/14/2017
2017 年 6 月 14 日更新
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
Microsoft Visual Studio 2017 安装程序项目扩展现在包含一个命令行帮助工具,用于使注册表设置更易于应用 Microsoft Visual Studio 2017 安装程序项目
Example paths of the tool (based on the version of Visual Studio installed)
工具的示例路径(基于安装的 Visual Studio 版本)
Professional Edition:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\DisableOutOfProcBuild.exe
专业版:
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
社区版:
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'
错误:验证时出错。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.
该工具适用于 Visual Studio 2017+,并为当前用户的特定安装的 Visual Studio 实例设置此注册表项。因此,如果您在构建代理上设置此项,请确保使用构建将使用的用户帐户。
Run "DisableOutOfProcBuild.exe help" for usage details.
运行“DisableOutOfProcBuild.exe 帮助”了解使用详情。
回答by Cipi
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
- 在记事本(或任何其他文本编辑器)中打开您的安装项目文件 (.vdproj)
删除 .vdproj 文件开头的这些行:
"SccProjectName" = "8:" "SccLocalPath" = "8:" "SccAuxPath" = "8:" "SccProvider" = "8:"- 再次构建 - 错误消失了
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.
这个错误并没有阻止我部署、构建、调试(或任何)我的项目,它只是让我很恼火。即使我将所有项目设置为在当前配置中构建而安装项目不这样做,它也会出现。
回答by it3xl
Permanent solution (+ for build-machines)
永久解决方案(+ 用于构建机器)
Visual Studio 2017
视觉工作室 2017
For VS 2017, call the following CMD scripts under your target Windows account:
对于 VS 2017,在您的目标 Windows 帐户下调用以下 CMD 脚本:
Communityedition
Professionaledition
Enterpriseedition
TL;DR.Notes for poor DisableOutOfProcBuild.exe, the Microsoft's offered solution that I use for VS 2017.
TL;博士。DisableOutOfProcBuild.exe微软提供的针对 VS 2017 的解决方案的注释。
DisableOutOfProcBuild.exedoesn'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.exewill only work if the current CMD directory is set to the installation location of DisableOutOfProcBuild.exe.
DisableOutOfProcBuild.exe不假设您会从其安装文件夹中调用它。因此,您无法复制此 .exe 文件。(顺便说一句,如果你想构建.vdproj,你必须安装VS。)DisableOutOfProcBuild.exe仅当当前 CMD 目录设置为 DisableOutOfProcBuild.exe 的安装位置时才有效。
As an example, for VS Professional edition we must call
例如,对于 VS 专业版,我们必须调用
CD "C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild"
CALL DisableOutOfProcBuild.exe
Visual Studio 2015 and earlier
Visual Studio 2015 及更早版本
by CMD for the current Windows user
通过 CMD 为当前 Windows 用户
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_USERSHKEY_USERS\S-1-5-xx-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxxxx-xxxxx\...\MSBuild
对于许多人来说,下面的创建/更正HKEY_CURRENT_USER\..并不总是有效或永久有效。
试图解决这个问题,我发现实际上我必须在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 HKCUwith 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.
但我也发现,如果我将使用 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。
So, this works from a first shot and forever. Just use the CMD console.
所以,这从第一次拍摄开始就一直有效。只需使用 CMD 控制台。
REG ADD HKCU\SOFTWARE\Microsoft\VisualStudio.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.
另一方面,此代码始终适用于启动它的当前用户帐户(因为 HKEY_CURRENT_USER)。但是构建服务器通常使用专用帐户或本地系统等。
I fixed it on my build-machines by adding the following simple batch file to my build tasks (Jenkins, TeamCity, CruiseControl)
我通过将以下简单的批处理文件添加到我的构建任务(Jenkins、TeamCity、CruiseControl)中来在我的构建机器上修复它
VS-2015, VS-2013, VS-2017-Community, VS-2017-Professional, VS-2017-Enterprise
回答by Night94
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.
正如这里的评论中指出的那样,对于 VS2017,您需要创建 DWORD HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0_[IDKey]_Config\MSBuild\EnableOutOfProcBuild 将 [IDKey] 替换为 VisualStudio 现有 15.0 子项的 ID 后缀.
For example, if under VisualStudio you see the key "15.0_abcd1234" it would be "15.0_abcd1234_Config".
例如,如果在 VisualStudio 下您看到键“15.0_abcd1234”,它将是“15.0_abcd1234_Config”。
回答by Robert
The hotfix is now uploaded on here:
修补程序现已上传到此处:
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=33186
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=33186
you can read about it here:
你可以在这里读到它:
回答by kubilay
I have faced with this issue after I moved my project to another PC(VS 2010, multiple projects in a solution).
将项目移至另一台 PC(VS 2010,解决方案中有多个项目)后,我遇到了这个问题。
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 /Debugfolder under my Setup Project root path, there were MyProject.msiand setup.exefiles, I deleted them and built my project again, it worked. Hope it works for some fellas, too.
我打开/Debug文件夹,我的安装项目的根路径下,有MyProject.msi和setup.exe文件,我删除了他们,并重新建造我的项目,它的工作。希望它也适用于一些小伙伴。
回答by Jla
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.
在 VS 2010 中右键单击您的解决方案资源管理器,然后单击检测到的依赖项和刷新依赖项,它有时会解决问题。
回答by Rikin Patel
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...
我正在使用 VS 2017,但上述解决方案均无效。因此,升级最新版本的 VS 2017 并应用 @AussieAsh 解决方案及其工作正常...
I hope this solution may someone will work.
我希望这个解决方案可能有人会工作。


