-
Notifications
You must be signed in to change notification settings - Fork 324
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
dotnet test does not forward MSBuild properties to msbuild in .NET 7 RC1 #4014
Comments
Just to add to your voice: we see this issue too when kicking off tests from this PS task.
|
(Looks like there were changes to the way MSBuild parameters were passed through...) |
Nice spot @mwadams |
Good spot, thanks for the ping @slang25. We'll take a look and get this fixed for rc2. |
As a workaround, since MSBuild accepts environment variables as property values you could set an env var for each |
Is there an update on whether this issue will be fixed into time for .NET 7 GA? |
Hey folks! Sorry for the wait, I will work on this issue starting tomorrow. I see there is a started PR so hopefully it won't be too long. |
This did not land on net7.0, did it? |
Nope, the PR has not been merged 😢 |
This seems to break all code coverage tools (using coverlet in my case) |
Yeah, I know it sucks, but a workaround (as mentioned by @baronfel) is to add the parameters as environment variables in your build pipeline; here is an Azure example from my own project:
If you want more context, have a look here: https://github.com/gimlichael/Cuemon/blob/development/.azure/steps/unit-test.yml |
* Bump Microsoft.Extensions.DependencyInjection.Abstractions Bumps [Microsoft.Extensions.DependencyInjection.Abstractions](https://github.com/dotnet/runtime) from 6.0.0 to 7.0.0. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/commits) --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Bumping build image to dotnet 7 * Using env variables to msbuild, as of microsoft/vstest#4014 * Correcting .dockerignore file * Staying at net6.0, bumping dependencies and releasing new patch version * removed comma from TargetFramework Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@heaths The work around is to not use .net 7.0.100, because that is where the bug originates. |
@baronfel I'd like to leave the feedback that this is one of those large issues where the fix shouldn't be delayed by over a month to coincide with fixed release schedules. This should have been fixed as fast as possible. Especially seeing all the comments here about people getting this issue pushed on them via updates of their github actions etc. |
There's a workaround that seems to work well for this problem. We noticed that most of our unit test csproj's don't specify their OutputPath in the settings. If we add |
@baronfel we're really affected by this bug. Is there a more precise ETA for this bugfix release? |
.NET SDK 7.0.101 was released today and I can confirm it fixed problems on our build server. |
Thanks for the update @matyasbach. I will move forward by closing this issue as the fix is now released. |
Those variables were used as a temporarily solution to a regression bug of .NET 7.0.100. For more info: - [coverlet.msbuild not working on .net 7](coverlet-coverage/coverlet#1391) - [dotnet test does not forward MSBuild properties to msbuild in .NET 7 RC1]microsoft/vstest#4014
Those variables were used as a temporarily solution to a regression bug of .NET 7.0.100. For more info: - [coverlet.msbuild not working on .net 7](coverlet-coverage/coverlet#1391) - [dotnet test does not forward MSBuild properties to msbuild in .NET 7 RC1]microsoft/vstest#4014
Those variables were used as a temporarily solution to a regression bug of .NET 7.0.100. For more info: - [coverlet.msbuild not working on .net 7](coverlet-coverage/coverlet#1391) - [dotnet test does not forward MSBuild properties to msbuild in .NET 7 RC1](microsoft/vstest#4014)
Those variables were used as a temporarily solution to a regression bug of .NET 7.0.100. For more info: - [coverlet.msbuild not working on .net 7](coverlet-coverage/coverlet#1391) - [dotnet test does not forward MSBuild properties to msbuild in .NET 7 RC1](microsoft/vstest#4014)
Those variables were used as a temporarily solution to a regression bug of .NET 7.0.100. For more info: - [coverlet.msbuild not working on .net 7](coverlet-coverage/coverlet#1391) - [dotnet test does not forward MSBuild properties to msbuild in .NET 7 RC1](microsoft/vstest#4014)
Required for microsoft/vstest#4014 fix
* Drop netcoreapp3.1, add net7.0 support Resolves #32596. With netcoreapp3.1 falling out of support soon, we're upgrading to net7.0, net6.0, and, on Windows, net461. * Resolve PR comments and fix build break * Tweak platform monikers * Upgrade to .NET 7.0.101 SDK Required for microsoft/vstest#4014 fix * Drop unnecessary runtimes from .vsconfig * Skip Monitor tests failing under net7.0 Relates to #33403 * Resolve track 1 management plane issues on net7.0 * Resolve Key Vault issues after upgrade to net7.0 * Use different platform guard for management plane * Resolve PR feedback
…t files not being generated in the right folder.
…t files not being generated in the right folder.
Description
Starting with .NET SDK
7.0.100-rc.1.22431.12
MSBuild parameters specified on the command line todotnet test
are no longer forwarded to MSBuild.The issue was not present in .NET 7 preview 7.
Steps to reproduce
Clone the martincostello/api repository at commit
61ec79c1c1e773b721f6ebdf28ed189d78d63ae7
and then rundotnet test
with the arguments specified below.Expected behavior
dotnet test
exits with an exit code of0
.Actual behavior
dotnet test
returns a non-zero exit code due to theCollectCoverage
property not being set tofalse
, causing the minimum coverage requirement of coverlet to not be satisfied.Environment
AB#1663078
The text was updated successfully, but these errors were encountered: