Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS 2017 templates fail unless VS 2015 also installed #7

Closed
walbourn opened this issue Apr 4, 2017 · 10 comments
Closed

VS 2017 templates fail unless VS 2015 also installed #7

walbourn opened this issue Apr 4, 2017 · 10 comments
Labels

Comments

@walbourn
Copy link
Owner

walbourn commented Apr 4, 2017

Moved from DirectXTK

I am unable to use the templates from the Getting Started Guide VS 2013 / VS 2015 / VS 2017 VSIX

When attempting to create a new project using the templates I get an error dialog:

Error: this template attempted to load component assembly 
'Microsoft.VisualStudio.WinRT.TemplateWizards, Version=14.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. For more 
information on this problem and how to enable this template, 
please see documentation on Customizing Project Templates.

I assume it's simply just looking for a certain version of the component assembly, I think Version 15 would be for 2017. I'm not sure how to get in there and actually edit the template by hand myself.

@walbourn
Copy link
Owner Author

walbourn commented Apr 4, 2017

A workaround for this is to edit C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe.config and add to the <assemblyBinding> section:

    <dependentAssembly>
      <assemblyIdentity name="Microsoft.VisualStudio.Universal.TemplateWizards" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
      <bindingRedirect oldVersion="14.0.0.0" newVersion="15.0.0.0"/>
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.VisualStudio.WinRT.TemplateWizards" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
      <bindingRedirect oldVersion="14.0.0.0" newVersion="15.0.0.0"/>
    </dependentAssembly>

I'll see if I can get this fix into a Visual Studio 2017 update.

@unreal5
Copy link

unreal5 commented Apr 30, 2017

Yes, solve my problems, thx!非常感谢,解决了我的问题!

@walbourn
Copy link
Owner Author

Note that this is fixed in Visual Studio 2017 15.3 Developer Preview 2.

@nait123321
Copy link

nait123321 commented Jul 21, 2017

Till now gives out an error, tried and on VS17 and on VS15
http://i.imgur.com/nOXDgxK.png

@walbourn
Copy link
Owner Author

If you are not using a VS 2017 Developer Preview build, then the VSIX package needs you to have VS 2015 installed as well as VS 2017.

@nait123321
Copy link

Thanks for the quick response. Unfortunately, due to my inattention, I made a mistake in the last message. After installing Preview and a couple of SDK re-installs - it worked.

@walbourn
Copy link
Owner Author

The VS 2017 (15.3) update is now available.

@trojanfoe
Copy link

This is happening to me now after uninstalling VS2017 and installing VS2019 (16.0.4). I have installed everything UWP-related I can see.

@walbourn
Copy link
Owner Author

walbourn commented May 21, 2019

The VS 2019 version of the issue was reported here and has been filed with the VS Team.

The workaround is to edit devenv.exe.config to change it from:

        <!-- Redirects for Universal app template wizard assemblies -->
        <!-- This is to allow VS 2015 and VS 2017 project templates to work correctly in VS 2019 -->
        <dependentAssembly>
          <assemblyIdentity name="Microsoft.VisualStudio.Universal.TemplateWizards" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
          <bindingRedirect oldVersion="14.0.0.0" newVersion="16.0.0.0"/>
          <bindingRedirect oldVersion="15.0.0.0" newVersion="16.0.0.0"/>
        </dependentAssembly>
        <dependentAssembly>
          <assemblyIdentity name="Microsoft.VisualStudio.WinRT.TemplateWizards" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
          <bindingRedirect oldVersion="14.0.0.0" newVersion="16.0.0.0"/>
          <bindingRedirect oldVersion="15.0.0.0" newVersion="16.0.0.0"/>
        </dependentAssembly>

to

        <!-- Redirects for Universal app template wizard assemblies -->
        <!-- This is to allow VS 2015 and VS 2017 project templates to work correctly in VS 2019 -->
        <dependentAssembly>
          <assemblyIdentity name="Microsoft.VisualStudio.Universal.TemplateWizards" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
          <bindingRedirect oldVersion="14.0.0.0-15.0.0.0" newVersion="16.0.0.0"/>
        </dependentAssembly>
        <dependentAssembly>
          <assemblyIdentity name="Microsoft.VisualStudio.WinRT.TemplateWizards" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
          <bindingRedirect oldVersion="14.0.0.0-15.0.0.0" newVersion="16.0.0.0"/>
        </dependentAssembly>

@trojanfoe
Copy link

Thanks, that did the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants