I've got SideWaffle 1.16 from 3/10/15 installed on VS 2013 SP4.
After the installation, the "Add New Class" functionality is broken via the right-click menu item and the shortcut (shift+alt+c) in a C# app. Instead of opening the "Add New Item" window, with Class selected, as expected, I get the Add New Item Window, with FSharp selected.
The only thing under the FSharp menu is the SideWaffle Template.
If I disable SideWaffle, the functionality goes back to being as expected.
@mwhitis I've been noticing this too. I'm not aware of any changes that should have affected this, but I'll look into it.
@sayedihashimi any suggestions on what might have made this change?
Strange thing is that F# template shouldn't even be included. It's suppose to exclude templates that start with an underscore.
Can you try it with the latest version from sidewaffle.com? I just downloaded and cannot repro it. Maybe we published a bad build out there. That shouldn't happen anymore since we have now automated the publish process.
I can reproduce it. It only happens for me on Web Projects though.
removing sample F# item template #251
I just deleted the item template. It was just a sample anyway.
Once the release build https://ci.appveyor.com/project/sayedihashimi/side-waffle/build/1.0.184 completes it should be published, will close after I verify it.
I did some digging on TemplateBuilder and it doesn't actually exclude templates that start with underscore. It excludes templates that start with _Sample. I tried it on my local and Add Class is still broken. It just picks the Visual Basic template now instead of the F# one.
@kentcooper oh ok, my bad.
@sayedihashimi okay so I messed around with this for the past couple hours and as far as I can tell it has to do with the order the languages are displayed in. In a web project with SideWaffle installed for whatever reason the non native language is displayed first. And it seems that add>class is trying to pick a template called Class from the first language in the list and the class template isn't there.
Yeah Web projects have a custom implementation for Add Class. It seems like there may be an issue with that. I've never heard it reported before so I think it's not a common scenario.
Here is a build with that sample template included https://dl.dropboxusercontent.com/u/40134810/SideWaffle/issue-251/TemplatePack-582e9f55.vsix.
Well I have a potential work around. If you use the AppliesTo element in the template definition to actually filter the languages so that the VB templates aren't showing up on the C# project and vice versa than it seems to resolve the problem. Problem is that's a lot of templates that need updating.
I didn't realize AppliesTo would make VB templates show up for C#. I thought AppliesTo was about the project type, so that is strange.
Well most of the AppliesTo elements on the Web and Misc types are set to <AppliesTo>ABC | (!ABC)</AppliesTo> Which causes them to show up in the New Item Dialog for every project type. If we change that to <AppliesTo>CSharp</AppliesTo> in the CSharp.vstemplate and <AppliesTo>VisualBasic</AppliesTo> in the VB.vstemplate files that would cause them not to show up in the dialog except for the specific projects.
<AppliesTo>ABC | (!ABC)</AppliesTo>
@kentcooper ok I think I see what you are saying.
Here is what I think we should do.
That way the templates still show up for cordova and asp.net 5.
The script I used to update the element is at https://gist.github.com/sayedihashimi/fd04142e167fffef514b maybe we could use that to achieve the items above?
@kentcooper , @sayedihashimi
Thanks for the quick turnaround on this!
@kentcooper I noticed you used <AppliesTo>!VB</AppliesTo> instead of <AppliesTo>!VisualBasic</AppliesTo> was that on purpose, does it work?
@sayedihashimi yes it was on purpose. I messed it up when it posted it before. Oh and yes it does work I just tested again just to make sure.
@kentcooper ok just checking that everything is good thanks.