简体   繁体   中英

Visual Studio 2010 - vsix wizard extension cannot load referenced assembly

I use VSIX wizard extension.

Everything is functioning for one assembly. But when I want to have WizardAssemblyDetail (for DetailForm) and WizardAssemblyView (for ViewForm) and one assembly referenced from the other two (for ex. WizardAssemblyBase).

When I export it with a wizard, I cannot run the wizard because of "Could not load file or assembly 'WizardAssemblyBase' or one of its dependencies." I tells that the WizardAssemblyBase.dll is not copied.

Is there a way how to solve it? Or some workaround? Thanks in advance

You should add your Assemblies References in the Assets elements of your .vsixmanifest file.

In PackageManifest add :

<Assets>
    <Asset Type="Microsoft.VisualStudio.ProjectTemplate" Path="ProjectTemplates" />
    <Asset Type="Microsoft.VisualStudio.Assembly" Path="TemplateWizard\YourTemplateWizard.dll" AssemblyName="YourTemplateWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4dbd4c10d49bc550" />
    <Asset Type="Microsoft.VisualStudio.Assembly" Path="TemplateWizard\NuGet.Core.dll" AssemblyName="NuGet.Core, Version=2.8.50506.491, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <Asset Type="Microsoft.VisualStudio.Assembly" Path="TemplateWizard\Microsoft.Web.XmlTransform.dll" AssemblyName="Microsoft.Web.XmlTransform, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </Assets>

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