Skip to content

Conversation

@russcam
Copy link
Contributor

@russcam russcam commented Jun 27, 2017

Visual Studio 2017 RTM and Resharper unit test runner are currently broken: https://youtrack.jetbrains.com/issue/RSRP-464233

This fix allows xunit tests to be runnable within Visual Studio by adding references to the following packages:

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />

A consequence of doing this is that Microsoft.NET.Test.Sdk defines a Main entry point which means that Tests project cannot define one. Main renamed to TestMain until this is resolved.

Visual Studio 2017 RTM and Resharper unit test runner are currently broken: https://youtrack.jetbrains.com/issue/RSRP-464233

This fix allows xunit tests to be runnable within Visual Studio by adding references to the following packages:

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />

A consequence of doing this is that Microsoft.NET.Test.Sdk defines a Main entry point which means that Tests project cannot define one. Main renamed to TestMain until this is resolved.
@russcam russcam requested a review from Mpdreamz June 27, 2017 08:19
Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this gets resolved fast, I also lost the ability to debug tests on rider in recent EAPs on Windows. I can run test fine from rider though.

private static string OutputPath { get; }

public static void Main(string[] args)
public static void TestMain(string[] args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment why we do this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

<PackageReference Include="DiffPlex" Version="1.4.1" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<!-- TODO only for Desktop CLR? -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:Sad: 😢

@russcam russcam merged commit 7d3dde8 into 5.x Jun 28, 2017
russcam added a commit that referenced this pull request Jun 28, 2017
* Runnable xunit tests with Resharper

Visual Studio 2017 RTM and Resharper unit test runner are currently broken: https://youtrack.jetbrains.com/issue/RSRP-464233

This fix allows xunit tests to be runnable within Visual Studio by adding references to the following packages:

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />

A consequence of doing this is that Microsoft.NET.Test.Sdk defines a Main entry point which means that Tests project cannot define one. Main renamed to TestMain until this is resolved.

* Add comment for Main method rename in Tests project

Following PR review

(cherry picked from commit 7d3dde8)
russcam added a commit that referenced this pull request Jun 28, 2017
* Runnable xunit tests with Resharper

Visual Studio 2017 RTM and Resharper unit test runner are currently broken: https://youtrack.jetbrains.com/issue/RSRP-464233

This fix allows xunit tests to be runnable within Visual Studio by adding references to the following packages:

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />

A consequence of doing this is that Microsoft.NET.Test.Sdk defines a Main entry point which means that Tests project cannot define one. Main renamed to TestMain until this is resolved.

* Add comment for Main method rename in Tests project

Following PR review

(cherry picked from commit 7d3dde8)
@russcam
Copy link
Contributor Author

russcam commented Jun 28, 2017

@russcam russcam deleted the fix/resharper-unit-tests branch June 28, 2017 02:12
awelburn pushed a commit to Artesian/elasticsearch-net that referenced this pull request Nov 6, 2017
* Runnable xunit tests with Resharper

Visual Studio 2017 RTM and Resharper unit test runner are currently broken: https://youtrack.jetbrains.com/issue/RSRP-464233

This fix allows xunit tests to be runnable within Visual Studio by adding references to the following packages:

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />

A consequence of doing this is that Microsoft.NET.Test.Sdk defines a Main entry point which means that Tests project cannot define one. Main renamed to TestMain until this is resolved.

* Add comment for Main method rename in Tests project

Following PR review

(cherry picked from commit 7d3dde8)
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

Successfully merging this pull request may close these issues.

3 participants