-
Notifications
You must be signed in to change notification settings - Fork 320
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 logs "netcoreapp6.0" instead of "net6.0" #2592
Comments
@ViktorHofer What is targetFramework in your runsettings? |
I don't specify one, I assumed it's auto-detected. |
You can look TFM through diag logs. From code I see that TP gets targetFramework from runsettings and then call NuGetFramework.Parse to get exact name for output. |
I assume someone writes that then into the in-memory representation of the .runsettings file. Here is our .runsetttings (we dynamically generate it):
|
What about TFM of dll which you are testing |
We rely on the Nuget.Frameworks package for doing that conversion, I would look into how the version that is shipped with SDK (because that is where we load it from) behaves. The flow here should be that we look at the assembly metadata (assembly: TargetFramework) and find .NETCoreApp,6.0, then convert it to short TFM for readability, there it probably goes wrong, because the Nuget.Frameworks library does not know about net6.0 and tries to guess the name, based on a pattern. And later the same goes backwards, when it converts netcoreapp6.0 to .NETCoreApp,Version=v6.0 |
|
@Sanan07 are you going to take this issue? I think there might be a chance that it fixes itself when NuGet.Frameworks 5.8.0 is released and dotnet sdk starts relying on it. |
I tried to reproduce the issue, but was not successful, so I am not sure, what to do next, cause I do not see any issue with code in TP, it just reads target framework and uses Nuget to convert it. So probably your thoughts are correct, we can wait until Nuget update. |
See log here: https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-39923-merge-aa9b5bbbcfef4b559b/System.Net.Security.Tests/console.7e5e7c45.log?sv=2019-07-07&se=2020-11-01T16%3A25%3A58Z&sr=c&sp=rl&sig=91ls7H2FESnHzB5xwF328nTIAR6ll5m0TAnYPSZOmeA%3D
Using the latest runner:
16.8.0-release-20201009-01
.There is no
netcoreapp6.0
TargetFramework. Instead it should benet6.0
.The text was updated successfully, but these errors were encountered: