简体   繁体   中英

Reference WPF custom control library to a VSIX project

I have a WPF Custom control project and a VSIX project in my solution. THe WPF holds the UI windows and controls that are required both by the VSIX and another WPF app that can be used separately from the VS extension.

I have added the project as a dependency in source.extension.vsixmanifest like so:

<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="StringsRefactor.UI" Path="|StringsRefactor.UI|" AssemblyName="|StringsRefactor.UI;AssemblyName|" />

the code compiles but during runtime when i consturct the required object from thr StringsRefactor.UI assembly i get the following error:

Could not load file or assembly 'StringsRefactor.UI, Version=1.0.0.0, Culture=neutral, PublikKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

How should i create a strongly-named assembly ? Or should i do something else ?

只需签署您的WPF程序集,Visual Studio就会要求它

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