madskristensen / NpmTaskRunner

Visual Studio extension
Other
88 stars 32 forks source link

Incompatibility between VS 2015 and VS 2013 #22

Closed danpowell88 closed 8 years ago

danpowell88 commented 8 years ago

Installed product versions

If a project is created in 2015 with a gulpfile and then opened in 2013 with the extension installed it will no longer have bindings in 2015.

Steps to recreate

  1. Open the solution in 2015 and the gulpfile will have the following added to it /// <binding AfterBuild='default' Clean='clean' ProjectOpened='watch' />
  2. Open the file in 2013 with the extension installed and the following is added If the project is then added in 2013 the following is added above /// <vs AfterBuild='default' Clean='clean' SolutionOpened='watch' />

So the final file looks like

/// <vs AfterBuild='default' Clean='clean' SolutionOpened='watch' />
/// <binding AfterBuild='default' Clean='clean' ProjectOpened='watch' />

Current behavior

After the two lines are added only the first line of the file appears to be read, so if VS 2013 was the last one to open its line will be first and VS 2015 will not have any bindings shown in it.

Expected behavior

Opening in either version should probably just added the same binding syntax which should probably be <binding /> as used in VS 2015.

Numerous other people are experiencing this problem also https://visualstudiogallery.msdn.microsoft.com/8e1b4368-4afb-467a-bc13-9650572db708/view/Discussions/4

I did a quick look through the code and only found a reference to so I'm not 100% sure why the extension isn't using it, unless the version in the gallery doesnt contain this change?

https://github.com/madskristensen/NpmTaskRunner/blob/master/src/TaskRunner/Helpers/BindingsPersister.cs#L46

madskristensen commented 8 years ago

[This issue is not related to this extension so I'm closing it]

You're referring to the Task Runner Explorer extension for VS2013 which was a proof-of-concept extension that was merged into VS2015 and received heavy updates and still is. The proof-of-concept extension for VS2013 cannot be updated to support the same binding XML as the VS2015 version. Other people have asked, but we don't have the exact source code for the 2013 version anymore. It was all iterated on and eventually added to VS2015

danpowell88 commented 8 years ago

What about changing this plugin to search for the binding in the first or second line that way both should be able to work without having to modify the older plugin

madskristensen commented 8 years ago

The bindings XML comment is generated and parsed by VS and not by the individual Task Runner extensions like this one