Trouble running specflow tests with VS2015 and resharper? - specflow

I'm using SpecFlow with Visual Studio 2013 without issue with Resharper 8.2. If I try running the tests in Visual Studio 2015 with Resharper 10 I get a "Not implemented" error if I right click a scenario and choose Run Unit Tests (worked in 2013 this way) and if I choose the Run SpecFlow Scenario option instead the project seems to build but the test never runs.
Has anyone else run into this? I tried uninstalling resharper, but it tells me no tests are found if I do that and "Run SpecFlow Scenarios" inside my feature file.

In my case the only thing I had to change is the follwoing setting fdrom Auto to Resharper - and it worked:

Its a known issue with Resharper 10 (And some versions of 9) and Specflow (The bindings)
I spent many hours last week banging my head against a wall with it (Someone decided to upgrade to R# 10 and all hell breaks loose with testing)
After many hours of playing around I worked out that certain versions work with certain versions of specflow (Currently)..
Image of versions grid (Selenium to Resharper version combinations that work) http://i.stack.imgur.com/Zxh9G.png (Text as I cant post more than 2 links -_-)
This is hopefully a short term issue (For VS 2013/2015 anyways) as there is what looks like a fix in progress. Here for these two versions of visual studio (Specflow wise). Those links have more info in them (Than my short explanation)
For anyone still using VS 2010 or 2012 whether the Specflow plugin will ever be updated for these versions I don't know... (That being that version 1.9.2 of specflow) for those versions of VS has not been updated since 2013... (Could be updated I don't know however keep that in mind...)
TL;DR
The issue is basically Resharper test hooks have been changed again by the looks of it in R# 9.2+ (In some way). Which is why SpecFlow is not playing ball any more with higher versions! (Basically a waiting on a updated version) which for VS 2010 and 2012 may never come :(

I am using VS2015 / ReSharper Ultimate 2016.1.2 and was able to run after installing SpecRun.Runner v1.5.2 from NuGet / restarting VS2015. (As a side note I also have the "SpecFlow for Visual Studio 2015" extension installed).

Related

Visual Studio complains about using C# 8 language features when the LanguageVersion is set to 9 with ReSharper 2019 installed

I have a very odd problem where I will apply a recommended change that uses a C# 8.0 language feature (in this example I'll use compound assignment). I then get a red squiggly with the following message...
C# 8.0 language feature
This is a net5.0 project I have tried setting my language version property to any of the following...
<LangVersion>9</LangVersion>
<LangVersion>9.0</LangVersion>
<LangVersion>latest</LangVersion>
All of them show the same behaviour. The only way I can get the error to go away is by setting the property to 8 or 8.0 which seems a somewhat retrograde step!
I'm using Visual Studio 2019 and I'm fully patched and up to date as of the time of writing, along with the latest version of ReSharper.
The code will compile without problems but the squiggles are generating noise. Has anyone else found this and has any ideas how to make it go away?
This looks like it was a ReSharper issue - JetBrains have introduced a new tool called Jetbrains Toolbox that seems to manage their updates now. My installed package was telling me it was up to date when it wasn't - I looked deeper and I was running ReSharper 2019.1 and not 2021.1

My VSIX extension is not showing on VS2017 (Was on 2015)

I have a VSIX extension (https://github.com/eduelias/AssociateRecentWorkItems) that worked really well on my VS2015 but, as I built/run it on VS2017 (yeah, I've put the prerequisites on the .csproj properties), it is not appearing at 2017's TFS Pending Changes tab.
I've tried updating MIcrosoft.TeamfoundationServer.Controls to the 2017 version but still no success.
As I try to debug it, it seems that VS2017 isn't loading the extension at all. (Breakpoints aren't not been loaded)
Any help is welcome. Thanks!
Give a try with another new extension on VS2017(from marketplace) in your side. If this could also not installed successfully and you are using VS2017 RC.
You may encountered this issue--Unable to install extensions after updating VS2017 RC
Either update to latest VS version or use Stefan Z Camilleri 's workaround in above link.
If only your old extension could not be installed, since
Huge changes have been made by Microsoft on the installation, so
previous approaches of detecting VS won't work any more. For example,
to detect VS installation folder, now a few extra tools or scripts are
required, https://github.com/Microsoft/vswhere
So guides such as How to: Migrate Extensibility Projects to Visual
Studio
2017
are critical and you can follow the tips.
You could also refer more details in this similar question Visual Studio 2017 is not detected by extensions for installation
Looking through the log, I was able to find that some of my references were asking for Microsoft.TeamFoundation.Client Version=14.0.0, in fact, It was the Microsoft.TeamFoundation.VersionControl version=12.0 that were looking for it.
To solve it, I've made a 'binding redirect' like this:
[assembly: ProvideBindingRedirection(AssemblyName = "Microsoft.TeamFoundation.Client", NewVersion = "15.0.0.0", OldVersionLowerBound = "12.0.0.0", OldVersionUpperBound = "14.0.0.0")]
It started appearing at the Exp instance and I was able to debug it.
Note that I strongly advise against doing such kind of workaround but, in my case, it was the only way I could make it load my extension so I could debug it.

how to run SmartStore.NET in visual studio 2015?

how start smartstore.net in visual studio localhost without any error
i download github code and open project file from
SmartStoreNET-3.x\src\SmartStoreNET.sln
The download link https://github.com/smartstoreag/SmartStoreNET
I use visual studio 2015 enterprise edition and windows 10.
First, you must be change the "Solution Configuration" to Debug mode, and second change the "Solution Plataform" to Any CPU.
This work for me.
I recently went through this integration/configuration procedure trying to get a local instance of SmartStore.NET up and running with demo data. I was able to get there eventually, but the development environment setup was by far the most tricky.
I would suggest starting with these two links:
http://docs.smartstore.com/display/SMNET30/Installing+SmartStore.NET
http://docs.smartstore.com/display/SMNET30/How+to+build+SmartStore.NET
I have a hunch you're issue may be your development environment configuration is not fully correct. Check out this page for more details about requirements:
Technology and Prerequisites
http://docs.smartstore.com/pages/viewpage.action?pageId=35555597
*NOTE: they reference ASP.NET 4.5.1 but I had to use 4.61 to take advantage of some newer features in C# 7.0 - Tuples, and several others)
Probably the most significant discovery I found was their were dependency issues when trying to restore the NuGet packages referenced in the solution. I had to go through this process maybe 4 or 5 times to finally get the app running locally.
Once all of this was complete, getting it working in 2015 required little effort.
I would also suggest narrowing your question to more specific problems. (that's just me)

Update 2 Error Adding MVC View

Last night, I updated Visual Studio 2015 on my system from RTM to Update 2. I now get an error message when I try to add a new View to an ASP.Net MVC application I am working on:
There was an error running the selected code generator:
'Expected 1 export(s) with contract name "NuGet.VisualStudio.IVs.PackageInstaller" but found 0 after applying applicable constraints.'
Any ideas on how to fix this? I had no trouble adding a few views to this project yesterday before I installed the update.
tl;dr - Reinstall NuGet Package Manager
I know this is an old thread. But I encounter the same error message today and found no solution online that works for me. So I decided to answer on this old thread for future devs that will encounter the same error message.
The reason for my case is that my NuGet Package Manager was missing.
I recently installed Wekan and it required me to install Visual C++ 2015 Build Tools, and I think that might be the culprit why NuGet was removed.
So, my solution is to download and reinstall NuGet Package Manager:
In Visual Studio open Extensions and Updates Tools > Extensions and Updates (or by pressing ALT+T+U)
On the left pane click Online and search for keyword NuGet Package Manager for Visual Studio 2015, download/install
Restart VS
These are the other solution that worked for some (didn't work for me):
Try clearing the ComponentModelCache, the cache will rebuild next time VS is launched.
Delete NuGet.Config at C:\Users\UserName\AppData\Roaming\NuGet, and restart VS
Unload/Reload project, Clean solution, Rebuild then restart VS
Updating the VS2015 will force you to update after that the whole work you have done so far. Most of the references specially NuGet are changed or outdated in 2015. I am currently using vs2013 with MVC5. I would suggest you to update the references and find a solution about this NuGet package. It might be no longer available for this view you want to add. In addition, there is a similar topic with Q&A to your and it is accessible right here: Unable to Install Any Package in Visual Studio 2015 . Take a look but VS2015 the free version is not that good for coding. Better download visual studio 2013 with update 5 and you will be much better. If you still want to keep it with VS2015, take a look at this and download it.
VS2015 NuGet Manager:
https://visualstudiogallery.msdn.microsoft.com/5d345edc-2e2d-4a9c-b73b-d53956dc458d

Will VS2012 work with TFS2010?

I'm considering using VS2012 RC to put together coded UI tests (since VS2010 SP2 FP2 does not fully support IE9).
Currently, my test projects are contained within a solution which is connected to our TFS team project. I also set up a build definition to build the project when new code is checked in (the builds are performed on our build machine).
I suppose that if I upgrade my solution to VS2012, then to be able to build the solution on the build machine I will need VS2012 RC installed there too, right? But then is it possible to specify in my build definition for my project to be built by VS2012 instead of VS2010?
Is it possible for me to upgrade my project with VS2012 while still using TFS2010? I should note my solution will be the only one upgraded to VS2012. All the other solutions in the company still need to be built by VS2010. A company-wide upgrade to VS2012 won't be in place for at least a few months, I imagine.
Or do I need a separate build machine or anything?
Any thoughts, ideas or solutions appreciated!
UPDATE: So I gave it a try, and everything worked okay. My only problem is that the Coded UI tests I have didn't work after being re-built on on my build machine, but I suppose that's probably something I'd need to ask about elsewhere. To clarify, the solution built successfully, but the tests still failed.
Visual Studio 2012's project changes allow most types to still be opened by Visual Studio 2010 with SP1, so it depends on what kind of projects are in your solution - see this page for the full compatibility list:
If you created your assets in Visual Studio 2010 with Service Pack 1
(SP1), many of them will load and run in Visual Studio 2012 without
any further action on your part. Many assets will also open again in
Visual Studio 2010 with SP1 without any issues, even after you open
those assets in Visual Studio 2012.
See also "Round-tripping with Visual Studio 11" on the VS blog which has more detail.
Note though that if your build process uses custom build activities then just installing Visual Studio 2012 breaks the build definition on your local machine, and also that MVC1 or MVC2 projects just aren't supported by VS2012. Oh, and Visual Studio 2012 isn't a RC any more, it was RTM'd last week.
(I presume you mean 2012 RTM rather than RC, now that the final release is available)
Theoretically (from what I've read) VS2012 and VS2010 use the same project/solution file format, so you should be able to switch between them without any compatibility issues (aside, presumably from obvious things like creating new file types that VS2010 doesn't understand)
TFS updates have historically been backwards compatible, so you can usually use different client and server versions (but usually you need a compatibility pack installed for old clients on new servers, a new client running against an old server has usualyl been fine). So I'd expect this to work well.
I'd say try it, but diff any files that appear in VCS2012's Pending Changes carefully before you check in to be sure that it hasn't changed anything that will cause problems. The worst that can happen then is that your development machine gets a "corrupt" version of the code and you'll need to revert to 2010.
(This is the approach I've been using with our 130-project C# solution, and so far (1 day) it's working fine, apart from the new UI making my eyes bleed as they try to find the information in all the indistinguishable monochrome clutter)

Resources