Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestDriven.net does not appear in VS2017 and FAQ is out of date #103

Closed
duncanawoods opened this issue Aug 24, 2017 · 15 comments
Closed

TestDriven.net does not appear in VS2017 and FAQ is out of date #103

duncanawoods opened this issue Aug 24, 2017 · 15 comments

Comments

@duncanawoods
Copy link

I am having a trouble installing TestDriven.net - it appears in VS2015 but not VS2017.

I have tried

  • multiple versions including the latest 4.0 RTM and 4.1 alpha (personal editions)
  • reinstalling & rebooting
  • resetting mef cache
  • running VS2017 repair which resets all config and extensions
  • deleting test extensions temp cache

Other notes

  • Windows 10 x64 1703
  • VS2017 15.3 (applies to all versions since RTM)
  • Have not installed any RC or pre-release version of VS2017
  • Other extensions install and appear in menus ok
  • No errors in the event log during TestDriven.Net installation
  • Have googled until my fingers bleed

The FAQ is a bit of museum piece - it offers great support for fixing this issue with XP & VS2002!

http://www.testdriven.net/FAQ.aspx

@grokky1
Copy link

grokky1 commented Aug 24, 2017

Are you using .NET Core? Because it doesn't support it.

The author said he doesn't use Core himself, so it probably won't be supported for a long time / never. 😞

@duncanawoods
Copy link
Author

It doesn't appear even if I only have a 4.x Framework project in the solution. Doesn't appear in top-level menus, context menus, keyboard shortcut commands etc. Its just not loaded.

@duncanawoods
Copy link
Author

The author said he doesn't use Core himself, so it probably won't be supported for a long time / never

That would really suck. It is for .net core but I can cope with having test libraries target the .net framework but depend on core libraries. TestExplorer is so slow :(

@grokky1
Copy link

grokky1 commented Aug 24, 2017

I know, even since I started using Core, my testing experience has sucked big time. The TestExplorer is not only slow, it's barely functional, even with the latest 15.3.1 update. It crashes often, and I need to terminate the test discovery/execution processes all the time. And getting it to actually discover your tests is a pain as well, when it works.

@jcansdale
Copy link
Owner

@duncanawoods, I'm very sorry about your installation woes. It looks like something strange changed in VS15.3 that stops Visual Studio from refreshing its state. I'm tackling the issue over here #104.

Could you give this build a try and let me know if the commands show up?
TestDriven.NET-4.1.0_Extraterrestrial_Alpha.zip

@grokky1 I haven't forgotten about .NET Core support. If I make any progress, you'll be the first to know!

@grokky1
Copy link

grokky1 commented Aug 28, 2017

@jcansdale Your comment made my day! You have no idea how much I miss TD! 😄

@grokky1
Copy link

grokky1 commented Aug 28, 2017

@duncanawoods If you get that "Extraterrestrial" alpha to work like you said (test project is .NET, but targets Core assemblies... which is a cool idea BTW!) please let the rest of us know how you did it... I assume you'll need to fiddle in the csproj somehow, but I'm not sure how.

@duncanawoods
Copy link
Author

duncanawoods commented Aug 28, 2017

@jcansdale no menus :( My problem existed in 15.1 and 15.2 too so may not be the same issue as #104.

@grokky1 there was no problem in vs2015 just creating a v4.7 test library and cross compiling code for both. You could reference dotnet core 1.1 assemblies fine but unfortunately you can't reference dotnet core 2.0 forcing the upgrade to vs2017. I needed a framework #if to add extension methods for library apis that had changed between the two frameworks but it was only small stuff like linq gaining an Append method.

@grokky1
Copy link

grokky1 commented Aug 28, 2017

@duncanawoods Okay I see. And you are implying that that approach no longer works in vs2017, and that you don't get the menus, etc... Got it.

@jcansdale
Copy link
Owner

@duncanawoods,

no menus :( My problem existed in 15.1 and 15.2 too so may not be the same issue as #104.

If it's not working in 15.1, it does sound like it's a different issue. Do you have Visual Studio 2017 installed in the default location, i.e.: \Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\ (Professional or Community).

I haven't found a good way to install for all versions of Visual Studio 2017, so the installer currently looks for some well known locations. If you've used a different location, I'm afraid it won't be able to find it. If you do have it installed in an alternative location you can use the following workaround: #76.

@duncanawoods
Copy link
Author

Aha! - yes, its installed on the E:\ drive. Running the following batch file as admin now means menus are visible - thank you!

set VS2017SKU=Enterprise
set VS2017IDE=E:\Program Files (x86)\Microsoft Visual Studio\2017\%VS2017SKU%\Common7\IDE
set VS14IDE=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
set TDEXT=Extensions\TestDriven
xcopy /S /I "%VS14IDE%\%TDEXT%" "%VS2017IDE%\%TDEXT%"
"%VS2017IDE%\devenv.exe" /updateConfiguration

@jcansdale
Copy link
Owner

@duncanawoods,

I'm glad it's now working and sorry about the hassle!

Installing Visual Studio extensions has always been a bit of a minefield. Whenever I try something clever with the installer, it always seems to come back to bite me.

There is an alternative approach that I could have used. Unfortunately this would have caused the installer to hang after the recent 15.3 update was released! At the moment the buttons aren't updated when you install for 15.3 (which is better than a hung installer).

@duncanawoods
Copy link
Author

Thanks. Maybe just expose a bit more of the workings e.g. an error log combined with an installer that takes command line parameters and there is a good chance we can fix some of these issues ourselves.

I'll let you close the issue if you feel its resolved - IMHO its worth putting in the FAQ.

@jcansdale
Copy link
Owner

@duncanawoods If you could leave it open as a reminder. Thanks for the report.

@jcansdale
Copy link
Owner

I just wanted to mention a few things before closing this issue.

The workaround I use for testing .NET Standard/Core projects is to make them combine for both Desktop and Standard/Core. TestDriven.Net will execute tests using the first framework in the list. If you set this to be a Desktop framework you will be able to test using the .NET Framework wile developeing for Code. Not ideal but better than nothing.

For example, change:

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>

To the following (note that <TargetFramework> has changed to ):

  <PropertyGroup>
    <TargetFrameworks>net4.5;netstandard2.0</TargetFrameworks> 
  </PropertyGroup>

Re installing in non-default VS 2017 install locations. I'm hoping to release a pure VSIX version of TestDriven.Net. This will make VS 2017 responsible for the installation and mean I don't need to search for where it's installed.

Also, I'm now working for GitHub on https://github.com/github/visualstudio. Luckily they're happy for me to keep doing TestDriven.Net. Unfortunately with my day job and family life, by bandwidth is limited. I continue to use TestDriven.Net every day and there will be improvements, just not as many as I'd like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants