How to get Gherkin syntax highlighting for .feature files in Visual Studio?

1,123 views
Skip to first unread message

Alexander Hanhikoski

unread,
Jun 2, 2010, 2:44:06 PM6/2/10
to SpecFlow
Is there a way to enable highlighting of the keywords of Gherkin
language similar to Cucumber?

Jonas Bandi

unread,
Jun 2, 2010, 4:36:39 PM6/2/10
to spec...@googlegroups.com
Check out Cuke4Vs:

http://github.com/henritersteeg/cuke4vs

It also offers intellisense for feature files and navigating from feature files to step definitions.


On Wed, Jun 2, 2010 at 8:44 PM, Alexander Hanhikoski <alexander....@gmail.com> wrote:
Is there a way to enable highlighting of the keywords of Gherkin
language similar to Cucumber?



--
mail: jonas...@gmail.com
web: www.jonasbandi.net
blog: blog.jonasbandi.net
twitter: twitter.com/jbandi

Alexander Hanhikoski

unread,
Jun 2, 2010, 7:16:23 PM6/2/10
to spec...@googlegroups.com
Thanks. Is someone successfully using it with VS2010? What modifications are needed to make it work?

2010/6/2 Jonas Bandi <jonas...@gmail.com>

Ricardo Stuven Garrido

unread,
Jun 2, 2010, 8:15:52 PM6/2/10
to spec...@googlegroups.com
Here's a fork should support VS2010 (I haven't tested myself):
http://github.com/aslakjo/cuke4vs


On Wed, Jun 2, 2010 at 7:16 PM, Alexander Hanhikoski

LR

unread,
Jun 3, 2010, 5:54:33 AM6/3/10
to SpecFlow
Is there a built installer (can someone build one) for that fork that
i can test with VS 2010? I can't get it to build :(

On Jun 3, 10:15 am, Ricardo Stuven Garrido <rstu...@gmail.com> wrote:
> Here's a fork should support VS2010 (I haven't tested myself):http://github.com/aslakjo/cuke4vs
>
> On Wed, Jun 2, 2010 at 7:16 PM, Alexander Hanhikoski
>
> <alexander.hanhiko...@gmail.com> wrote:
> > Thanks. Is someone successfully using it with VS2010? What modifications are
> > needed to make it work?
>
> > 2010/6/2 Jonas Bandi <jonas.ba...@gmail.com>

Alexander Hanhikoski

unread,
Jun 3, 2010, 6:05:09 AM6/3/10
to spec...@googlegroups.com
I spent couple of hours trying to built it and couldn't do it. Apparently you need to install Wix installer tool set http://wix.sourceforge.net/ and Visual Studio SDK, but even after these I still was missing Microsoft.VisualStudio.Package.LanguageService.9.0.dll. I tried with the newer version (v.10.0) but wasn't able to compile. Perhaps the v.9.0 is part of VS2008? Anyway, maybe we should contact the author of the VS2010 fork.

2010/6/3 LR <luke...@gmail.com>

Xerxes Battiwalla

unread,
Jun 3, 2010, 8:06:27 AM6/3/10
to spec...@googlegroups.com
the author of that fork, forked from my VS2010 fork ;) i have a binary which i've updated to cuke4vs 0.3.1 for 2010, but havent tested it myself.....

i've provided an (unofficial) link to the binary: 

If anyone is interested in taking this fork, and fixing it up (remove the obvious duplication everywhere) be my guest.

-xerx

Alexander Hanhikoski

unread,
Jun 3, 2010, 9:35:16 AM6/3/10
to spec...@googlegroups.com
Thank you for the effort and packet. I installed the msi-packet. Using VS2010 professional edition. Opening .feature files crashes, hangs or simply doesn't open the file. I simply created a new console application, referenced NUnit and Specflow DLLs and created a new Specflow feature and tried opening the .feature file. Wasn't the original packet released for RC/Beta of VS2010? Could there be compatibility issues with final release?

@Xerxes,
What edition and build of VS are you using?

Thanks again.

2010/6/3 Xerxes Battiwalla <xer...@gmail.com>

Gáspár Nagy

unread,
Jun 3, 2010, 9:37:39 AM6/3/10
to SpecFlow
I'm using it for VS2010 and the syntax highlight works, but the
navigation and the validation not. In one case it was crashing my VS
when i have opened a file, but most of the time it is stable enough.

Br,
Gaspar

On Jun 3, 2:06 pm, Xerxes Battiwalla <xerx...@gmail.com> wrote:
> the author of that fork, forked from my VS2010 fork ;) i have a binary which
> i've updated to cuke4vs 0.3.1 for 2010, but havent tested it myself.....
>
> i've provided an (unofficial) link to the binary:http://rapidshare.com/files/394792357/Setup.msi.html
>
> If anyone is interested in taking this fork, and fixing it up (remove the
> obvious duplication everywhere) be my guest.
>
> -xerx
>
> On Thu, Jun 3, 2010 at 8:05 PM, Alexander Hanhikoski <
>
> alexander.hanhiko...@gmail.com> wrote:
> > I spent couple of hours trying to built it and couldn't do it. Apparently
> > you need to install Wix installer tool sethttp://wix.sourceforge.net/and
> > Visual Studio SDK, but even after these I still was
> > missing Microsoft.VisualStudio.Package.LanguageService.9.0.dll. I tried with
> > the newer version (v.10.0) but wasn't able to compile. Perhaps the v.9.0 is
> > part of VS2008? Anyway, maybe we should contact the author of the VS2010
> > fork.
>
> > 2010/6/3 LR <luke.r...@gmail.com>

Gáspár Nagy

unread,
Jun 3, 2010, 9:51:53 AM6/3/10
to SpecFlow
So you have the same problem that I had...

I learned that the easiest way to switch off/on cuke4vs, if you rename
the registry key at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Languages
\File Extensions\.feature

to .feature_x (on x64, you need to use the wow64 node). It is easier
than install/uninstall. For me only one file had this issue (as far as
i remember the default feature file) and after I have modified it, the
problem disappeared.

Br,
Gaspar

On Jun 3, 3:35 pm, Alexander Hanhikoski
<alexander.hanhiko...@gmail.com> wrote:
> Thank you for the effort and packet. I installed the msi-packet. Using
> VS2010 professional edition. Opening .feature files crashes, hangs or simply
> doesn't open the file. I simply created a new console application,
> referenced NUnit and Specflow DLLs and created a new Specflow feature and
> tried opening the .feature file. Wasn't the original packet released for
> RC/Beta of VS2010? Could there be compatibility issues with final release?
>
> @Xerxes,
> What edition and build of VS are you using?
>
> Thanks again.
>
> 2010/6/3 Xerxes Battiwalla <xerx...@gmail.com>
>
> > the author of that fork, forked from my VS2010 fork ;) i have a binary
> > which i've updated to cuke4vs 0.3.1 for 2010, but havent tested it
> > myself.....
>
> > i've provided an (unofficial) link to the binary:
> >http://rapidshare.com/files/394792357/Setup.msi.html
>
> > If anyone is interested in taking this fork, and fixing it up (remove the
> > obvious duplication everywhere) be my guest.
>
> > -xerx
>
> > On Thu, Jun 3, 2010 at 8:05 PM, Alexander Hanhikoski <
> > alexander.hanhiko...@gmail.com> wrote:
>
> >> I spent couple of hours trying to built it and couldn't do it. Apparently
> >> you need to install Wix installer tool sethttp://wix.sourceforge.net/and
> >> Visual Studio SDK, but even after these I still was
> >> missing Microsoft.VisualStudio.Package.LanguageService.9.0.dll. I tried with
> >> the newer version (v.10.0) but wasn't able to compile. Perhaps the v.9.0 is
> >> part of VS2008? Anyway, maybe we should contact the author of the VS2010
> >> fork.
>
> >> 2010/6/3 LR <luke.r...@gmail.com>

Alexander Hanhikoski

unread,
Jun 3, 2010, 11:02:28 AM6/3/10
to spec...@googlegroups.com
Weird. My registry has HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\ which contains only Debugger\.
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Languages on the other hand has \Languages but no \File Extensions nor \File Extensions\.feature

2010/6/3 Gáspár Nagy <gaspa...@gmail.com>

Xerxes Battiwalla

unread,
Jun 3, 2010, 7:37:48 PM6/3/10
to spec...@googlegroups.com
I built it last night using 2010 RTM.

There could well be problems with the 2010 version of the plugin - all i did was create a duplicate wix installer to configure it for VS2010, and didnt make any changes to the underlying plugin model.

Now that Gaspar mentions it, I seem to recall having a similar issue with the code completion not working with the VS2010 version back when it was RC. I'd stopped using it so this had slipped my mind. 

Sorry :(

Gáspár Nagy

unread,
Jun 8, 2010, 3:49:36 AM6/8/10
to SpecFlow
Hi,

I guess you have an x64... in this case, the key should be

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio
\10.0\Languages\File Extensions\.feature

Br,
Gaspar

On Jun 3, 5:02 pm, Alexander Hanhikoski
<alexander.hanhiko...@gmail.com> wrote:
> Weird. My registry
> has HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\ which contains
> only Debugger\.
> HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Languages on the
> other hand has \Languages but no \File Extensions nor \File
> Extensions\.feature
>
> 2010/6/3 Gáspár Nagy <gaspar.n...@gmail.com>

Deb

unread,
Jun 23, 2010, 12:15:58 PM6/23/10
to SpecFlow
VS 2010 is still crashing when opening any feature file. Has anyone
been able to successfully install Cuke4Vs on vs 2010?

On Jun 8, 3:49 am, Gáspár Nagy <gaspar.n...@gmail.com> wrote:
> Hi,
>
> I guess you have an x64... in this case, the key should be
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio
> \10.0\Languages\File Extensions\.feature
>
> Br,
> Gaspar
>
> On Jun 3, 5:02 pm, Alexander Hanhikoski
>
> <alexander.hanhiko...@gmail.com> wrote:
> > Weird. My registry
> > has HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\ which contains
> > only Debugger\.
> > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Languages on the
> > other hand has \Languages but no \File Extensions nor \File
> > Extensions\.feature
>
> > 2010/6/3 Gáspár Nagy <gaspar.n...@gmail.com>
>
> > > So you have the same problem that I had...
>
> > > I learned that the easiest way to switch off/oncuke4vs, if you rename
Reply all
Reply to author
Forward
0 new messages