-
Notifications
You must be signed in to change notification settings - Fork 263
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
Use Testing platform server mode breaks testing #4808
Comments
cc @drognanar |
If this is a net4.6.2 project then it cannot be run via dotnet.exe, @Evangelink are testing platform projects generating an executable for netfx by default? otherwise @daryllabar could you check if setting |
@drognanar it is not generating an exe. |
@daryllabar I am assuming your project looks roughly like: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnableMSTestRunner>true</EnableMSTestRunner>
<!--<OutputType>Exe</OutputType>-->
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSTest" Version="3.7.3" />
</ItemGroup>
</Project> If that's the case then the behavior is "expected". As explained in our documentations and blogposts you need to set both @Youssef1313 This is an example of where adding a target that warns when output type is not set to Closing as by-design. |
@Evangelink Interesting. At least for .NET Framework seems like |
Yes that's what I have seen. Not sure if that's expected dotnet behavior but I wouldn't be surprised there is a fundamental change in assembly layout. |
@Youssef1313 What blog posts / documentation are you referring to? All I know is I updated my Visual Studio and my unit tests failed to run. I've updated my test project to this: <?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>MyClient.Dataverse.Plugin.Tests</AssemblyName>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<RootNamespace>MyClient.Dataverse.Plugin.Tests</RootNamespace>
<TargetFramework>net462</TargetFramework>
<SignAssembly>false</SignAssembly>
<LangVersion>9</LangVersion>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\MyClient.Dataverse.Plugin\MyClient.Dataverse.Plugin.csproj" />
<ProjectReference Include="..\MyClient.Dataverse.Test\MyClient.Dataverse.Test.csproj" />
</ItemGroup>
</Project> which does generate the exe, But now I get a new error:
|
https://devblogs.microsoft.com/dotnet/introducing-ms-test-runner/
How did you onboard to MSTest runner? The csproj change is not linked to VS update and does require some manual onboarding which you probably did at some point.
@daryllabar Where are MSTest package references? |
Describe the bug
Upon updating to the latest version of VS, my test explorer has stopped running tests.
Steps To Reproduce
Enable Use Testing platform server mode
Expected behavior
My tests run
Actual behavior
Here are the logs:
When trying to run the test in the command line, I get a different error, not sure if it is because I need to start a TCP listener first?
Additional context
I'm testing a .Net 4.6.2 project with the following nuget packages with "test" in their name installed:
Unchecking the preview feature and restarting VS resolves the issue.
The text was updated successfully, but these errors were encountered: