Skip to content

Conversation

@vitek-karas
Copy link
Member

Retarget all tests to run on .NET6. This will allow us to test some new APIs added into the framework for .NET 6.
The changes in MembersUsedViaReflection are due to change in the framework annotations - we're now marking less (but still enough).

@vitek-karas vitek-karas added this to the .NET 6.0 milestone Mar 12, 2021
@vitek-karas vitek-karas self-assigned this Mar 12, 2021
<ProjectReference Condition="'$(UseCecilPackage)' != 'true'" Include="../../external/cecil/Mono.Cecil.csproj" PrivateAssets="All" />
<ProjectReference Condition="'$(UseCecilPackage)' != 'true'" Include="../../external/cecil/Mono.Cecil.csproj" PrivateAssets="All">
<!-- https://github.com/dotnet/sdk/issues/2280#issuecomment-392815466 -->
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this needed? (Or is it just to be safe?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason it picked the net40 version... it's weird, but I just could not make it work otherwise.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird... 🤷‍♂️ Glad you figured it out. I didn't know about SetTargetFramework

// Ensure that [Required] members are non-null
AssemblyPaths = new ITaskItem[0];
RootAssemblyNames = new ITaskItem[0];
ILLinkPath = Path.Combine (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location), "illink.dll");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious what prompted this change

Copy link
Member Author

@vitek-karas vitek-karas Mar 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic in the ILLink is basically MyPath/../../bin/net5.0/illink.dll. Which worked before by luck, since the folder in the artifacts where the test lives ends with bin/net5.0 as well. Now when the test is running on 6, the path ends with bin/net6.0.
But the product is still NET5.

@marek-safar marek-safar merged commit 70612c2 into dotnet:main Mar 13, 2021
@vitek-karas vitek-karas deleted the UpgradeTestsToNET6 branch March 13, 2021 21:45
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants