GruntLauncher icon indicating copy to clipboard operation
GruntLauncher copied to clipboard

No context menu visible

Open onkeltoob opened this issue 11 years ago • 20 comments

Heyho and first of all thanks for the effort, this will hopefully turn out to be a very useful add-on. I'm having the same problem as described in issue #2, there are no Grunt entries in the context menu. I did, however install the latest version 1.0.0.1 from here (even though it says 1.0 in my "Extensions and Updates..." window) and I'm using a capitalised Gruntfile.js. I don't really know what further information to provide, but here's a Gist with my Gruntfile.js: https://gist.github.com/papatoob/c4983755444faaa2a22e

Do you have any idea what might be going wrong? Grunt itself seems to run fine, at least it's doing what I wanted.

Thanks in advance, Tobi

onkeltoob avatar Aug 08 '13 12:08 onkeltoob

I've tried your gruntfile on my computer and it works so it's being parsed correctly by the plugin. File name is not a problem, I've changed it to accept both Gruntfile.js and gruntfile.js.

What version of visual studio are you using and what operating system?

Do you have some special characters in the path to the gruntfile?

Bjornej avatar Aug 08 '13 17:08 Bjornej

Good morning.

I'm using Visual Studio 2012 Premium (11.0.60610.01 Update 3) on Windows 7 Professional Service Pack 1.

I actually had an underscore in the file path (which in this context wouldn't really be a special character), but the problem persisted after clearing it.

onkeltoob avatar Aug 09 '13 07:08 onkeltoob

Hi,

I've not tested the plugin with update 3 but I don't suppose that's the problem.

When i get home tonight I'll build a debug version of the package with output enabled for you to try so we can try to pinpoint what exactly goes wrong.

Bjornej avatar Aug 09 '13 09:08 Bjornej

I've added debugging output to the package and created a debug build. If you could uninstall the currently installed package and install this I can try to pinpoint the problem by looking at the output

Bjornej avatar Aug 09 '13 19:08 Bjornej

Thanks a lot for your support. I'll be back at work on monday and will try that immediately.

onkeltoob avatar Aug 09 '13 19:08 onkeltoob

Did that and got the following output:

Initializing package
Adding command
Command Added

onkeltoob avatar Aug 13 '13 09:08 onkeltoob

Ok so the package is being initialized correctly.

When you right-click on gruntfile.js in the solution explorer is something else printed to the output window?

Bjornej avatar Aug 13 '13 11:08 Bjornej

Sorry for letting you wait so long, I wasn't in the office yesterday. No, when right-clicking my gruntfile.js nothing else is printed to the output window.

onkeltoob avatar Aug 15 '13 07:08 onkeltoob

No problem.

In regards to your problem It seems that the event that controls the visibility of the commands (BeforeQueryStatus) in the solution explorer context menu is not being fired which is really strange and I'm not able to reproduce the problem. Can you tell me what other exxtensions you have installed?

Bjornej avatar Aug 15 '13 08:08 Bjornej

Here's a list:

  • Microsoft Web Developer Tools (cannot deactivate this)
  • NuGet Package Manager (cannot deactivate this)
  • Visual Studio 2012 Color Theme Editor (deactivating does not change anything)
  • Visual Studio Extensions for Windows Library for JavaScript (cannot deactivate this)
  • Web Essentials 2012 (deactivating does not change anything)

I first suspected the last one to be a problem since it also provides some right-click menu entries. But as I stated, deactivating did not change anything.

Actually this is not a very big deal for me, I have already gotten used to the "command line grunting". But if you want to figure it out anyway I will of course try to contribute.

onkeltoob avatar Aug 15 '13 11:08 onkeltoob

Those extensions are safe, I have all of them installed except for the Color Theme Editor. I thought you had something like Power tools installed which are much more invasive.

I'm stumped about this bug, I will try to make some research about this problem but I'm not sure it will be simple.

Thank you for your patience .

Bjornej avatar Aug 15 '13 19:08 Bjornej

Looks like similar issue here.

Context menu has "Grunt" and "Grunt: Cannot parse Gruntfile".

VS2012.4 GruntLauncher 1.2 Node 0.10

db avatar Jan 24 '14 01:01 db

Your problem is different, if the command "Grunt: Cannot parse Gruntfile" is present it means that the plugin is unable to parse the Gruntfile to identify the possible options.

Can you send me your gruntfile so I can correct the parser?

Bjornej avatar Jan 24 '14 07:01 Bjornej

Thank you for the prompt feedback. I dont have access to the system with the issue now, but its gruntfile was based on the below template. I tried various simplifications of it without narrowing down the issue.

https://github.com/db/generator-minimalbase/blob/master/app/templates/_gruntfile.js

db avatar Jan 24 '14 12:01 db

Ok, I think I've spotted the problem.

When I get home I'll modify the parser and create you an ad-hoc build to try

Bjornej avatar Jan 24 '14 13:01 Bjornej

Ok I think I've solved the problem. Can you uninstall your currently installed plugin and try this ?

If the problem is solved I'll update the gallery package too.

Bjornej avatar Jan 24 '14 20:01 Bjornej

Works great. Thanks.

db avatar Jan 27 '14 21:01 db

Published on visual studio gallery

Bjornej avatar Jan 27 '14 22:01 Bjornej

This issue can probably be closes

madskristensen avatar Feb 19 '14 20:02 madskristensen

Hi, I'm also having this issue with the gruntfile parsing. It works with the grunt command line but doesn't work with the extension.

u84six avatar Nov 14 '14 15:11 u84six