简体   繁体   English

Visual Studio 2017扩展开发

[英]Visual Studio 2017 Extension Development

Hi I want to upgrade my extension to visual studio 2017 but I got Microsoft.VisualStudio.Shell.RegistrationAttribute error, but I have been already added this reference?I got this error in compile time. 嗨我想将我的扩展升级到Visual Studio 2017,但我得到了Microsoft.VisualStudio.Shell.RegistrationAttribute错误,但我已经添加了这个引用?我在编译时遇到了这个错误。 Is there any reference to be added or else? 是否有任何参考要添加? Any comment about that? 对此有何评论?

D:\Visual Studio 2017\VSSDK\VisualStudioIntegration\Common\Assemblies\v4.0\Microsoft.VisualStudio.Shell.Immutable.10.0.dll ,version :10.0.0.0

My Error is 我的错误是

Severity    Code    Description Project File    Line    Suppression State
Error       CreatePkgDef : error : ArgumentException: No Visual Studio registration attribute found in this assembly.           
Severity    Code    Description Project File    Line    Suppression State
Error       The assembly should contain an instance of the attribute 'Microsoft.VisualStudio.Shell.RegistrationAttribute' defined in assembly 'Microsoft.VisualStudio.Shell.Immutable.10.0' version '10.0.0.0'  
Severity    Code    Description Project File    Line    Suppression State
Error       at Microsoft.VisualStudio.Tools.CreatePkgDef.ProcessAssembly(String fileName, Hive hive, PkgDefContext context, Boolean register, RegistrationMode mode) in f:\dd\src\vssdk\VSIntegration\Tools\src\CreatePkgDef\CreatePkgDef.cs:line 303

在csproj文件中将GeneratePkgDefFile添加为false,如下所示

<GeneratePkgDefFile>false</GeneratePkgDefFile>

最后我找到了解决方案,我删除了Microsoft.VisualStudio的所有引用。****,之后我在Visual Studio 2017中添加了我的项目新的vsix,那时我从nuget下载所有包,我的项目现在正在编译。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM