-
Notifications
You must be signed in to change notification settings - Fork 319
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
Program.cs is getting added to full clr test project. #608
Comments
Faizan2304
pushed a commit
to Faizan2304/vstest
that referenced
this issue
Mar 27, 2017
Fix: Inject entry point only for project targeting netcoreapp1.0
Faizan2304
added a commit
that referenced
this issue
Mar 28, 2017
2 tasks
jamill
added a commit
to jamill/VFSForGit
that referenced
this issue
Jan 3, 2019
Tweak GVFS.UnitTests.csproj to work with the dotnet test command. The following scenario should work: Running the command "dotnet test" on the GVFS.UnitTest project should build and run the assocated unit tests. Several changes are required to enable this scenario: 1) Do not Generate program file Our test project generates its own executable, which conflict with the default configuration of the vstest framework for netcoreapps. According to the links below, netcoreapps require a Program.cs, which is not usually included in test projects. Because of this, vstest implicity adds this file for dotnetcore apps, which is conflicting with the explicitly included Program.cs we define. The suggested fix is to supress the automatic injection of the entry point via the "GenerateProgramFile" property. Links: microsoft/vstest#636 microsoft/vstest#608 2) Add PackageReference to Microsoft.NET.Test.SDK This is required for dotnet test to discover tests 3) Add PackageReference to NUnit3TestAdapter This is required to integrate NUnit tests with the test discovery / execution framework.
jamill
added a commit
to jamill/VFSForGit
that referenced
this issue
Jan 5, 2019
Tweak GVFS.UnitTests.csproj to work with the dotnet test command. The following scenario should work: Running the command "dotnet test" on the GVFS.UnitTest project should build and run the assocated unit tests. Several changes are required to enable this scenario: 1) Do not Generate program file Our test project generates its own executable, which conflict with the default configuration of the vstest framework for netcoreapps. According to the links below, netcoreapps require a Program.cs, which is not usually included in test projects. Because of this, vstest implicity adds this file for dotnetcore apps, which is conflicting with the explicitly included Program.cs we define. The suggested fix is to supress the automatic injection of the entry point via the "GenerateProgramFile" property. Links: microsoft/vstest#636 microsoft/vstest#608 2) Add PackageReference to Microsoft.NET.Test.SDK This is required for dotnet test to discover tests 3) Add PackageReference to NUnit3TestAdapter This is required to integrate NUnit tests with the test discovery / execution framework.
jamill
added a commit
to jamill/VFSForGit
that referenced
this issue
Jan 7, 2019
Tweak GVFS.UnitTests.csproj to work with the dotnet test command. The following scenario should work: Running the command "dotnet test" on the GVFS.UnitTest project should build and run the assocated unit tests. Several changes are required to enable this scenario: 1) Do not Generate program file Our test project generates its own executable, which conflict with the default configuration of the vstest framework for netcoreapps. According to the links below, netcoreapps require a Program.cs, which is not usually included in test projects. Because of this, vstest implicity adds this file for dotnetcore apps, which is conflicting with the explicitly included Program.cs we define. The suggested fix is to supress the automatic injection of the entry point via the "GenerateProgramFile" property. Links: microsoft/vstest#636 microsoft/vstest#608 2) Add PackageReference to Microsoft.NET.Test.SDK This is required for dotnet test to discover tests 3) Add PackageReference to NUnit3TestAdapter This is required to integrate NUnit tests with the test discovery / execution framework.
jamill
added a commit
to jamill/VFSForGit
that referenced
this issue
Jan 8, 2019
Tweak GVFS.UnitTests.csproj to work with the dotnet test command. The following scenario should work: Running the command "dotnet test" on the GVFS.UnitTest project should build and run the assocated unit tests. Several changes are required to enable this scenario: 1) Do not Generate program file Our test project generates its own executable, which conflict with the default configuration of the vstest framework for netcoreapps. According to the links below, netcoreapps require a Program.cs, which is not usually included in test projects. Because of this, vstest implicity adds this file for dotnetcore apps, which is conflicting with the explicitly included Program.cs we define. The suggested fix is to supress the automatic injection of the entry point via the "GenerateProgramFile" property. Links: microsoft/vstest#636 microsoft/vstest#608 2) Add PackageReference to Microsoft.NET.Test.SDK This is required for dotnet test to discover tests 3) Add PackageReference to NUnit3TestAdapter This is required to integrate NUnit tests with the test discovery / execution framework.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Steps to reproduce
Expected behavior
Actual behavior
Root Cause Analysis : We are now adding this (https://github.com/Microsoft/vstest/blob/master/src/package/nuspec/Microsoft.NET.Test.Sdk.targets) targets file for both netcoreapp and net46 tfms. Earlier we used it only for netcoreapp tfm.
Conditionally adding the program.cs based on tfm should fix this.
The text was updated successfully, but these errors were encountered: