Home Dashboard Directory Help
Search

EnvDTE80.Solution2.GetProjectTemplate("ClassLibrary.zip", "VisualBasic") returns Windows Metro template by Carlos J. Quintero


Status: 

Closed
 as Fixed Help for as Fixed


2
0
Sign in
to vote
Type: Bug
ID: 728382
Opened: 3/3/2012 3:00:58 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

Using EnvDTE80.Solution2.GetProjectTemplate("ClassLibrary.zip", "VisualBasic") in an add-in to get the full path to the "Class Library" template of Windows returns the one of Windows Metro:

"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplatesCache\VisualBasic\Windows Metro style\1033\ClassLibrary.zip\ClassLibrary.vstemplate"

rather than the one of Windows:

"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplatesCache\VisualBasic\Windows\1033\ClassLibrary.zip\ClassLibrary.vstemplate"

The problem is caused because according to the MSDN docs (http://msdn.microsoft.com/en-us/library/envdte80.solution2.getprojecttemplate.aspx):

"Custom templates require unique file names that do not conflict with the file names defined in:
<drive>:\Program Files\Microsoft Visual Studio <version>\Common7\IDE\ProjectTemplates\Language"

If that applies to custom templates, it should also apply to built-in templates, and it happens that the "ClassLibrary.zip" file name is not unique, VS 11 uses also that name inside the "Windows Metro style" folder that was already used inside the "Windows" folder.

This causes a compatibility problem in add-ins using the GetProjectTemplate method to get the template ClassLibrary.zip of Windows, since something that worked in VS 2010 is broken in VS 11. The solution is to rename the ClassLibrary.zip file inside the "Windows Metro style" folder to MetroClassLibrary.zip file. Notice that this doesn't affect the "Class Library" name displayed in the user interface, it's only a change in the file system. Important: the same applies to CSharp.

Details
Sign in to post a comment.
Posted by Microsoft on 3/14/2012 at 11:28 AM
Hi Carlos,

Thank you for reporting this bug. I am happy to let you know that we have renamed the Class Library project template in the Windows Metro style folder. This will be available in the next public release of Visual Studio.

Thanks,
Jeff Ferman
XAML Designer, Visual Studio & Blend
Posted by MS-Moderator09 [Feedback Moderator] on 3/5/2012 at 3:26 AM
Thank you for submitting feedback on Visual Studio 11 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 3/4/2012 at 5:35 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.