Describe the bug
Something has changed in v7 that requires the test logging to be compiled against the test assembly, rather than just "being there". As the loggers are not strong-named, this causes compilation to fail for test projects that are strong named:
CSC : error CS8002: Referenced assembly 'Microsoft.VisualStudio.TestPlatform.Extension.JUnit.Xml.TestLogger, Version=7.0.1.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [/home/runner/work/openapi-extensions/openapi-extensions/tests/OpenApi.Extensions.Tests/MartinCostello.OpenApi.Extensions.Tests.csproj::TargetFramework=net9.0]
It's easy to workaround for tests that do not use [InternalsVisbleTo] by just disabling strong naming in the test projects, but for it is not possible to grant internals access to a strong-named assembly from a test assembly that isn't.
- Test Framework (choose one): Xunit
- .NET project version, sdk version:
net9.0
- Command line used:
dotnet test --configuration "Release" --logger:junit;LogFilePath=junit.xml
- OS: All
Expected behavior
Compilation succeeds.
Other details
Additional context
None.
Describe the bug
Something has changed in v7 that requires the test logging to be compiled against the test assembly, rather than just "being there". As the loggers are not strong-named, this causes compilation to fail for test projects that are strong named:
It's easy to workaround for tests that do not use
[InternalsVisbleTo]by just disabling strong naming in the test projects, but for it is not possible to grant internals access to a strong-named assembly from a test assembly that isn't.net9.0dotnet test --configuration "Release" --logger:junit;LogFilePath=junit.xmlExpected behavior
Compilation succeeds.
Other details
dotnet test --diag:log.txtto the issue. Please redact any confidential info from the logs before attaching. See https://github.com/spekt/testlogger/wiki/Collecting-vstest-logsAdditional context
None.