Visual Studio 2017 扩展开发 [英] Visual Studio 2017 Extension Development

查看:29
本文介绍了Visual Studio 2017 扩展开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的扩展升级到 Visual Studio 2017,但出现 Microsoft.VisualStudio.Shell.RegistrationAttribute 错误,但我已经添加了此引用?我在编译时遇到了此错误.是否有任何参考要添加或其他?对此有何评论?

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. 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

我的错误是

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

推荐答案

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

Finaly I found the solution,I remove all references of Microsoft.VisualStudio.****,after than I add my project a new vsix in visual studio 2017 that time I download all packages from nuget and my project is compile now.

这篇关于Visual Studio 2017 扩展开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆