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

Walk through on VS2017 integrations #199

Open
warwickfoster opened this issue Aug 2, 2017 · 6 comments
Open

Walk through on VS2017 integrations #199

warwickfoster opened this issue Aug 2, 2017 · 6 comments

Comments

@warwickfoster
Copy link

downloaded the Git repo and compiled in VS2017. Had the test adapter installed. Nothing appears in the test explorer. Do not have resharper installed. Did not want to try on CLI as I am looking for UI integration, Really like nspec and want to use it. Could someone download VS2017 enterprise and have a look at the integration for me and let me know what to do to get it in the interface.

Thank you. Really like nspec

@BrainCrumbz
Copy link
Collaborator

BrainCrumbz commented Aug 4, 2017

Hi there
in our team we like nspec too, as much as to become contributors!

Thanks for taking the time to try to make it work. We have not been investing huge amounts of time lately, and state-of-the-art with VS2017 is a little bit foggy. Let's try to recap:

  • NSpec has been ported itself to .NET Core 1.x, and it can be referenced by projects in the project.json/xproj format, targeting .NET Core and .NET Framework. It can still be referenced by old style-csproj projects targeting .NET Framework.

  • For VS2015, there's a dotnet-test enabled runner, which is used both by command line and as a VS2015 test adapter, so you can see tests in Test Explorer.

  • This VS Adapter works with old style-csproj projects targeting .NET Framework in VS versions up to 2015.

Our understanding is that in order to have a VS2017 adapter, one should somehow leave the dotnet-test type of runner and "go back" to the VS adapter type. Now, here's the crux:

Our current NSpec.VsAdapter is itself an old style-csproj project in .NET Framework. It has not been ported yet to .NET Core, nor to VS2017 csproj type of project. Also, it is built against a specific version of NSpec (non-.NET Core yet), and this is bad in general: it should instead dynamically reference the NSpec.dll coming with the test project it's running.

Some time ago we tried porting NSpec.VsAdapter initially just to .NET Core in a project.json/xproj project, and at the same time we tried making it dynamically reference NSpec.dll. There we hit the infamous Assembly.Load problems. We thought those had gone away for good, when we previously coded the same thing in dotnet-test runner (that one also loads NSpec dynamically from test project). After trying to solve those problems for some time, we did not have further chances to work at it again.

So, as you can guess, there's some (debug+dev) work to do in order to make VS adapter work in VS2017.

@amirrajan
Copy link
Collaborator

@warwickfoster looking forward to your VS2017 Enterprise test runner contributions.

@warwickfoster
Copy link
Author

warwickfoster commented Aug 5, 2017 via email

@ivan-prodanov
Copy link

It's very unfortunate that I couldn't get this to work through the VS 2017 adapter for .NET Core 2 project (new .csproj format).

@BrainCrumbz
Copy link
Collaborator

We're not yet actively working on VS2017 / .NET Core 2 projects, also given the relative "instability" on the tooling side, that's the main reason. Please feel free to ask for info if you want to give a stab at that.

@amirrajan
Copy link
Collaborator

@ivan-prodanov dig in and figure it out :-)

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

4 participants