Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Permanent solution for GACless Wizard Project

$
0
0

I have a VSIX project which is a project template project and in this project I have added a Wizard project. If you have developped such stuff, you know what I mean.

As on the internet a lot of tutorials suggest, I signed the wizards assebmly with strong name key.

Project builds no errors, and I have the VSIX file. I installed it. But when I create a new project from my template, an error pops up which says wizard assebmly cannot be found.

---------------------------
Microsoft Visual Studio
---------------------------
A problem was encountered creating the sub project 'MVPTemplate6.Web'.  Error: this template attempted to load component assembly 'MVPMulti.Wizards, Version=0.6.0.26150, Culture=neutral, PublicKeyToken=4b581e1f8bd61e3c'. For more information on this problem and how to enable this template, please see documentation on Customizing Project Templates.
---------------------------
OK   
---------------------------

If I use gacutil and write wizard dll to assembly cache, it works. But this is a VSIX project, people will download it. They cannot write this dll to GAC. What should be the solution to this problem?

This is .csproj file of the wizard project.

<?xml version="1.0" encoding="utf-8"?><Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /><PropertyGroup><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform><ProjectGuid>{B73B1B9A-D7B8-4310-8998-21D3B1E665B9}</ProjectGuid><OutputType>Library</OutputType><AppDesignerFolder>Properties</AppDesignerFolder><RootNamespace>MVPMulti.Wizards</RootNamespace><AssemblyName>MVPMulti.Wizards</AssemblyName><TargetFrameworkVersion>v4.5</TargetFrameworkVersion><FileAlignment>512</FileAlignment><NuGetPackageImportStamp>265a3730</NuGetPackageImportStamp></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "><DebugSymbols>true</DebugSymbols><DebugType>full</DebugType><Optimize>false</Optimize><OutputPath>..\Build\</OutputPath><DefineConstants>DEBUG;TRACE</DefineConstants><ErrorReport>prompt</ErrorReport><WarningLevel>4</WarningLevel></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "><DebugType>pdbonly</DebugType><Optimize>true</Optimize><OutputPath>..\Build\</OutputPath><DefineConstants>TRACE</DefineConstants><ErrorReport>prompt</ErrorReport><WarningLevel>4</WarningLevel></PropertyGroup><PropertyGroup><SignAssembly>true</SignAssembly></PropertyGroup><PropertyGroup><AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile></PropertyGroup><PropertyGroup><DelaySign>false</DelaySign></PropertyGroup><ItemGroup><Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"><EmbedInteropTypes>True</EmbedInteropTypes></Reference><Reference Include="Microsoft.VisualStudio.TemplateWizardInterface, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /><Reference Include="System" /><Reference Include="System.Core" /><Reference Include="System.Xml.Linq" /><Reference Include="System.Data.DataSetExtensions" /><Reference Include="Microsoft.CSharp" /><Reference Include="System.Data" /><Reference Include="System.Xml" /></ItemGroup><ItemGroup><Compile Include="ChildWizard.cs" /><Compile Include="CustomWizard.cs" /><Compile Include="Properties\AssemblyInfo.cs" /></ItemGroup><ItemGroup><None Include="key.snk" /><None Include="packages.config" /></ItemGroup><ItemGroup><Content Include="FodyWeavers.xml" /></ItemGroup><Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /><PropertyGroup><PostBuildEvent>cd C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
gacutil.exe /i "$(TargetPath)" /f /nologo
gacutil /l "$(TargetName)" /nologo</PostBuildEvent></PropertyGroup><Import Project="..\packages\Fody.1.28.3\build\Fody.targets" Condition="Exists('..\packages\Fody.1.28.3\build\Fody.targets')" /><Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"><PropertyGroup><ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText></PropertyGroup><Error Condition="!Exists('..\packages\Fody.1.28.3\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.28.3\build\Fody.targets'))" /></Target><!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.<Target Name="BeforeBuild"></Target><Target Name="AfterBuild"></Target>
  --><!--<PropertyGroup><IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer><IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer><IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment></PropertyGroup>--></Project>


And this is .vstemplate file:

<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project"><TemplateData><Name>MVP Project</Name><Description>&lt;No description available&gt;</Description><ProjectType>CSharp</ProjectType><ProjectSubType></ProjectSubType><SortOrder>1000</SortOrder><CreateNewFolder>true</CreateNewFolder><DefaultName>MVP Project</DefaultName><ProvideDefaultName>true</ProvideDefaultName><LocationField>Enabled</LocationField><EnableLocationBrowseButton>true</EnableLocationBrowseButton><Icon>__TemplateIcon.ico</Icon></TemplateData><TemplateContent><Project TargetFileName="$fileinputname$.Web.csproj" File="MVPTemplate.Web.csproj" ReplaceParameters="true"><Folder Name="Admin" TargetFolderName="Admin"><Folder Name="Membership" TargetFolderName="Membership"><ProjectItem ReplaceParameters="true" TargetFileName="CustomPrincipal.cs">CustomPrincipal.cs</ProjectItem><ProjectItem ReplaceParameters="true" TargetFileName="CustomPrincipalSerializeModel.cs">CustomPrincipalSerializeModel.cs</ProjectItem><ProjectItem ReplaceParameters="true" TargetFileName="MVPTSqlMembershipProvider.cs">MVPTSqlMembershipProvider.cs</ProjectItem><ProjectItem ReplaceParameters="true" TargetFileName="Role.cs">Role.cs</ProjectItem></Folder></Folder><Folder Name="Controls" TargetFolderName="Controls" /><Folder Name="css" TargetFolderName="css" /><ProjectItem ReplaceParameters="true" TargetFileName="Global.asax">Global.asax</ProjectItem><ProjectItem ReplaceParameters="true" TargetFileName="Global.asax.cs">Global.asax.cs</ProjectItem><Folder Name="Helpers" TargetFolderName="Helpers" /><Folder Name="images" TargetFolderName="images" /><Folder Name="js" TargetFolderName="js" /><Folder Name="Models" TargetFolderName="Models" /><Folder Name="Properties" TargetFolderName="Properties"><ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem></Folder><ProjectItem ReplaceParameters="true" TargetFileName="Web.config">Web.config</ProjectItem><ProjectItem ReplaceParameters="true" TargetFileName="Web.Debug.config">Web.Debug.config</ProjectItem><ProjectItem ReplaceParameters="true" TargetFileName="Web.Release.config">Web.Release.config</ProjectItem></Project></TemplateContent><WizardExtension><Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</Assembly><FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName></WizardExtension><WizardExtension><Assembly>MVPMulti.Wizards, Version=0.6.0.26150, Culture=neutral, PublicKeyToken=4b581e1f8bd61e3c</Assembly><FullClassName>MVPMulti.Wizards.ChildWizard</FullClassName></WizardExtension><WizardExtension><Assembly>MVPMulti.Wizards, Version=0.6.0.26150, Culture=neutral, PublicKeyToken=4b581e1f8bd61e3c</Assembly><FullClassName>MVPMulti.Wizards.CustomWizard</FullClassName></WizardExtension><WizardData><packages repository="extension" repositoryId="MVPWebForms.ModelViewPresenter"><package id="EnterpriseLibrary.Logging" version="6.0.1304" /><package id="EnterpriseLibrary.Common" version="6.0.1304" /><package id="Ninject" version="3.2.2.0" /><package id="jQuery" version="2.1.4" /><package id="bootstrap" version="3.3.4" /><package id="MVP.WebForms.View" version="0.5.0.38575" /></packages></WizardData></VSTemplate>

Additional information will be provided if necessary.


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>