简体   繁体   中英

VSIX package installation with registering custom library

I made a Visual Studio extension using Roslyn to analyze and refactor source code. I work on a custom attribute that is declared in another project in the solution, and in my analyzer, I search for that attribute. My project structure is like below:

  • CustomAnalyzer.Base (Class library)
    • CustomAnalyzer.Base.MyCustomAttribute.cs (My attribute class)
  • CustomAnalyzer (Analyzing and Refactoring methods)
  • CustomAnalyzer.Vsix (VSIX package project)

CustomAnalyzer project has a reference to CustomAnalyzer.Base . I want that programmers be able to add CustomAnalyzer.Base.MyCustomAttribute annotation in top of their methods after installing extension on their Visual Studio . But when I install the extension, I cannot add a reference to CustomAnalyzer.Base since this library is not in assemblies list.

How can I register my Class Library as an Extension or Framework Assembly when the extension has been installed?

please sign your class library project with package project key.snk.

right click project -> Properties -> signing -> enable sign the assembly -> click the dropdownlist below -> Browser... -> select key.snk file in the project named HelloWorld2Parter -> Open -> rebuild your project.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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