在 Visual Studio 2017 (VS 2017) 的 DLL \\’PkgdefMgmt.dll\\’ 中找不到名为 \\’?\\’ 的入口点

Unable to find an entry point named '?' in DLL 'PkgdefMgmt.dll' on Visual Studio 2017 (VS 2017)

我收到错误消息:

Unable to find an entry point named '?' in DLL 'PkgdefMgmt.dll'

为 VS 2017 安装 Visual Studio 扩展 (vsix) 时。

这个扩展是在 VS2015 中开发的,所以我想我会升级、重新编译并重新安装它,但我得到了同样的错误。

这是一台装有 Windows 10 和 VS 2017 的新笔记本电脑。

有什么想法可以解决吗?

这是完整的安装日志:

5/9/2017 10:23:21 AM - Microsoft VSIX Installer 5/9/2017 10:23:21 AM -
------------------------------------------- 5/9/2017 10:23:21 AM - vsixinstaller.exe version: 5/9/2017 10:23:21 AM - 15.0.26403.7 built
by: D15SVC 5/9/2017 10:23:21 AM -
------------------------------------------- 5/9/2017 10:23:21 AM - Command line parameters: 5/9/2017 10:23:21 AM - C:\\Program Files
(x86)\\Microsoft Visual
Studio\\2017\\Professional\\Common7\\IDE\\VSIXInstaller.exe,C:\\xxxxxxx\\bin\
elease\\xxxxxx.vsix
5/9/2017 10:23:21 AM - -------------------------------------------
5/9/2017 10:23:21 AM - Microsoft VSIX Installer 5/9/2017 10:23:21 AM -
------------------------------------------- 5/9/2017 10:23:21 AM - Failed to initialize settings for Isolated Shell C:\\Program Files
(x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio\\ssms.exe:
Unable to find an entry point named '?' in DLL 'PkgdefMgmt.dll'.
5/9/2017 10:23:22 AM - Initializing Install... 5/9/2017 10:23:22 AM -
Extension Details... 5/9/2017 10:23:22 AM - Identifier :
XXXXX.XXXXXXX.XXXXXXXXXXXXXXXX.Company.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX7acae2
5/9/2017 10:23:22 AM - Name : YYYYYYYYYY YYYYYYYY YYYY
5/9/2017 10:23:22 AM - Author : OOOOOOOOOO 5/9/2017
10:23:22 AM - Version : 5.0 5/9/2017 10:23:22 AM -
Description : Empty VSIX Project. 5/9/2017 10:23:22 AM -
Locale : en-US 5/9/2017 10:23:22 AM - MoreInfoURL
: 5/9/2017 10:23:22 AM - InstalledByMSI : False 5/9/2017
10:23:22 AM - SupportedFrameworkVersionRange : [4.5,) 5/9/2017
10:23:22 AM - 5/9/2017 10:23:22 AM - SignatureState : Unsigned
5/9/2017 10:23:22 AM - Supported Products : 5/9/2017 10:23:22 AM -
Microsoft.VisualStudio.Community 5/9/2017 10:23:22 AM - Version :
[14.0] 5/9/2017 10:23:22 AM - 5/9/2017 10:23:22 AM - References
: 5/9/2017 10:23:22 AM -
------------------------------------------------------- 5/9/2017
10:23:22 AM - Identifier : Microsoft.VisualStudio.MPF.14.0
5/9/2017 10:23:22 AM - Name : Visual Studio MPF 14.0
5/9/2017 10:23:22 AM - Version : [14.0] 5/9/2017 10:23:22 AM -
MoreInfoURL : 5/9/2017 10:23:22 AM - Nested : No 5/9/2017
10:23:22 AM - 5/9/2017 10:23:22 AM - Signature Details... 5/9/2017
10:23:22 AM - Extension is not signed. 5/9/2017 10:23:22 AM -
5/9/2017 10:23:22 AM - Searching for applicable products... 5/9/2017
10:23:22 AM - Found installed product - Microsoft Visual Studio 2015
Shell (Integrated) 5/9/2017 10:23:22 AM - Found installed product -
Global Location 5/9/2017 10:23:22 AM - Found installed product -
Visual Studio Professional 2017 5/9/2017 10:23:22 AM -
VSIXInstaller.NoApplicableSKUsException: This extension is not
installable on any currently installed products. at
VSIXInstaller.App.GetInstallableData(String vsixPath, Boolean
isRepairSupported, IEnumerable1& skuData) at
VSIXInstaller.App.Initialize(Boolean isRepairSupported) at
VSIXInstaller.App.Initialize() at
System.Threading.Tasks.Task
1.InnerInvoke() at
System.Threading.Tasks.Task.Execute()


Any ideas to fix?

如果您想在 Visual Studio 2017 上运行您的扩展,请将您的扩展清单版本 2 (VSIX v2) 升级到新的版本 3 VSIX 清单格式 (VSIX v3)。更多信息请参考:

https://docs.microsoft.com/en-us/visualstudio/extensibility/how-to-migrate-extensibility-projects-to-visual-studio-2017

如果您想使用 Visual Studio 2015 构建 VSIX v3,您还需要将指定 v3 的 VsixType 元素添加到您的项目文件中:

1
<VsixType>v3</VsixType>

更多信息请参考:

https://github.com/Microsoft/visualstudio-docs/blob/master/docs/extensibility/faq-2017.md#can-i-build-a-vsix-v3-with-visual-studio-2015

https://social.msdn.microsoft.com/Forums/vstudio/en-US/743061f9-98ea-4c22-881a-b144b0412cb8/can-i-build-a-vsix-v3-with-visual-studio -2015?forum=vsx