Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

missing specflow templates in VS 2008

I'm new to BDD and Specflow so please help. Today I installed Specflow V1.8.1 on my local machine. During the installation, I made sure that I chose both VS 2008 and 2010 addon. after installation, I can find the new templates such as .feature in VS 2010, but in VS 2008, I can't finds any of the specflow templates, I tried to reinstall for several times, closing all the VS projects, but things didn't get better. What could be the possible cause? Thanks!

like image 898
Tammy Avatar asked Nov 20 '25 10:11

Tammy


1 Answers

I've just run into the same problem as I've had to downgrade to VS2008 for a project. The 1.8.1 installation program works fine for VS2010 but not for VS2008.

UPDATE After installing Specflow installer you'll probably find 3 new specflow*.zip files in the following directory:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp

If you create the sub folder structure *Specflow\1033* and move the following three files into the new 1033 folder:

  • SpecFlowEventDefinition.zip
  • SpecFlowFeature.zip
  • SpecFlowStepDefinition.zip

You can now recreate the item cache using the steps:

  1. Open a VS2008 cmd window (under Microsoft Visual Studio 2008 | visual studio tools in start menu) - make sure you run as administrator for this.
  2. In the DOS window, enter devenv.exe /installvstemplates and run

OTHER METHOD

The following steps could solve the issue for you:

  1. Close all VS2008 instances.
  2. Copy the non _VB.* files from C:\Program Files (x86)\TechTalk\SpecFlow\ItemTemplates to C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\SpecFlow\1033
  3. Open a VS2008 cmd window (under Microsoft Visual Studio 2008 | visual studio tools in start menu) - make sure you run as administrator for this.
  4. In the DOS window, enter devenv.exe /installvstemplates and run.
  5. Close the DOS window.
  6. Open VS2008 and the items are now available under "Add New" - the options will appear under the top level item "Visual C# Items", they don't appear in any of the child folders.

Note: Step 2 places the templates in the VS install location, whilst step 4 rebuilds the templates and installs them into the cache (here: C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache\CSharp\SpecFlow\1033)

like image 180
Paul Hadfield Avatar answered Nov 22 '25 03:11

Paul Hadfield



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!