Skip to content
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

Change Object mode for package testing & remove older frameworks & rids #7510

Merged
merged 6 commits into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class GetCompatiblePackageTargetFrameworks : BuildTask
public string[] PackagePaths { get; set; }

[Required]
public string SupportedFrameworks { get; set; }
public string SupportedTestFrameworks { get; set; }

[Output]
public ITaskItem[] TestProjects { get; set; }
Expand All @@ -31,7 +31,7 @@ public override bool Execute()
List<ITaskItem> testProjects = new List<ITaskItem>();
try
{
Initialize(SupportedFrameworks);
Initialize(SupportedTestFrameworks);
string minDotnetTargetFramework = allTargetFrameworks.Where(t => t.Framework == ".NETCoreApp").OrderBy(t => t.Version).FirstOrDefault()?.GetShortFolderName();

foreach (var packagePath in PackagePaths)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
<DotNetPackageTestingAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.DotNet.PackageTesting.dll</DotNetPackageTestingAssembly>
<DotNetPackageTestingAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\netcoreapp3.1\Microsoft.DotNet.PackageTesting.dll</DotNetPackageTestingAssembly>
</PropertyGroup>

<ItemGroup>
<SupportedTestFramework Include="netcoreapp3.1;net5.0;net6.0;net461;net462;net471;net472;net48;netstandard2.0;netstandard2.1" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

SupportedTargetFramework is currently set by the sdk and it contains all the frameworks so i defined it as SupportedTestFramework

Anipik marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

I believe you are missing test coverage in the test assembly as when I tried to add net6.0 last time, the NuGet Parse mechanism blew up. Can you please add a test that passes these items in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

</ItemGroup>
</Project>