Why can't Jenkins find this .NET AssemblyFoldersEx registry key?

不羁的心 提交于 2019-12-02 19:24:16

问题


So I have a project that builds fine on my development machine, but not on my CI server (Jenkins).

Jenkins can't find my Primary Interop Assemblies even after I've copied over various folders from my machine to make them available to it.

On my machine, where everything works, I can turn on my Visual Studio's option for "diagnostic"-level output, and I can see how it figures out where these PIA's are at...

Primary reference "Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
  Resolved file path is "C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll".
  Reference found at search path location "{Registry:Software\Microsoft\.NETFramework,v4.6.1,AssemblyFoldersEx}".

See that registry key referenced above? When I go into my registry.. I can find hives for:

  • Software\Microsoft\.NETFramework
  • Software\Wow6432Node\Microsoft\.NETFramework

Each hive has several keys, like

  • v4.5.50709
  • v3.5
  • etc...

But nowhere do I see the v4.6.1 key that seems to be indicated in the build output snippet I've pasted above. If there's some way to discover this and/or, better way to configure Jenkins so it can properly reference Microsoft.mshtml.dll I'd be much obliged.


回答1:


After a long and laborious search, I found that I have some "PIA" redist.exe's on my developer box, at the following location:

C:/Program Files (x86)/Common Files/Merge Modules

I have several of these, due to multiple versions of Visual Studio being installed on my machine. I'm sure I probably only needed to run one of them.. Regardless, I double-clicked each .exe (I had a window on my CI server that was peaking through to my dev workstation) and installed each onto my Jenkins server.

Problem solved!



来源:https://stackoverflow.com/questions/39599358/why-cant-jenkins-find-this-net-assemblyfoldersex-registry-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!