test (ubuntu-latest)
The current .NET SDK does not support targeting .NET 7.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0.
These annotations are generated by problem-matcher.
And these errors are picked from dotnet test logs.
To Reproduce Problem
It can reproduce problems with following steps on local ubuntu environment.
cd to docfx/test/docfx.Tests
Execute dotnet restore -p:TargetFramework=net6.0
Execute dotnet test --framework:net6.0 --no-build
if Solution Directory.Build.props file's TargetFrameworks is modified from net7.0;net6.0 to net6.0.
These error is disappeared.
Root cause of this errorsdocfx.Test project create temporary .csproj targeting .net6.0 under bin directory.
But there is Directory.Build.props at solution root level. and target frameworks (net6.0/net7.0) are specified.
So, Directory.Build.props settings are applied these .csproj.
It might be better to create temp working directory to OS's temp directory.
Additional context
On ubuntu environments. CI Build succeeded.
But some extra warnings are reported on log.
warning: [Failure] Project file not found:
'/home/runner/work/docfx/docfx/test/docfx.Tests/bin/Release/net6.0/1jc3olh4.spy/ref.csproj'
Describe the bug
GitHub actions reports following annotation errors when
ci.yml
executed.These annotations are generated by
problem-matcher
. And these errors are picked fromdotnet test
logs.To Reproduce Problem It can reproduce problems with following steps on local
ubuntu
environment.docfx/test/docfx.Tests
dotnet restore -p:TargetFramework=net6.0
dotnet test --framework:net6.0 --no-build
if Solution
Directory.Build.props
file'sTargetFrameworks
is modified fromnet7.0;net6.0
tonet6.0
. These error is disappeared.Root cause of this errors
docfx.Test
project create temporary.csproj
targeting.net6.0
underbin
directory. But there isDirectory.Build.props
at solution root level. and target frameworks (net6.0
/net7.0
) are specified. So,Directory.Build.props
settings are applied these.csproj
.It might be better to create temp working directory to OS's temp directory.
Additional context
On ubuntu environments. CI Build succeeded. But some extra warnings are reported on log.