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

Move away from nuspec for MSTest metapackage #4818

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions samples/Playground/Playground.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand Down Expand Up @@ -38,5 +38,5 @@
</ItemGroup>

<!-- Import the capabilities for the Microsoft.Testing.Platform -->
<Import Project="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\buildMultiTargeting\Microsoft.Testing.Platform.props"/>
<Import Project="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\buildMultiTargeting\Microsoft.Testing.Platform.props" />
</Project>
52 changes: 0 additions & 52 deletions src/Package/MSTest/MSTest.NonWindows.nuspec

This file was deleted.

45 changes: 30 additions & 15 deletions src/Package/MSTest/MSTest.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks);$(UwpMinimum);$(WinUiMinimum)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">$(SupportedNetFrameworks);netstandard2.0</TargetFrameworks>

<!--
warning NETSDK1023: A PackageReference for 'Microsoft.NET.Test.Sdk' was included in your project. This package
is implicitly referenced by the .NET SDK and you do not typically need to reference it from
your project. For more information, see https://aka.ms/sdkimplicitrefs
-->
<NoWarn>$(NoWarn);NETSDK1023</NoWarn>

<IncludeBuildOutput>false</IncludeBuildOutput>
<IsPackable>true</IsPackable>
<NuspecFile Condition=" '$(OS)' == 'Windows_NT' ">MSTest.nuspec</NuspecFile>
<NuspecFile Condition=" '$(OS)' != 'Windows_NT' ">MSTest.NonWindows.nuspec</NuspecFile>
<NuspecBasePath>$(OutputPath)</NuspecBasePath>
<PackageId>MSTest</PackageId>
<PackageTags>MSTest TestFramework TestAdapter VisualStudio Unittest MSTestV2 Microsoft</PackageTags>
<PackageReadmeFile>PACKAGE.md</PackageReadmeFile>
<PackageDescription>
MSTest is Microsoft supported Test Framework.

Expand All @@ -23,19 +28,29 @@
- .NET 6.0 Windows.18362+
- UWP 10.0.16299
</PackageDescription>
<!-- Nothing in lib but that's expected -->
<NoWarn>$(NoWarn);NU5128</NoWarn>

<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddEmptyTfmDirectoryInLib</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<ItemGroup Label="NuGet">
<NuspecProperty Include="TestPlatformVersion=$(MicrosoftNETTestSdkVersion)" />
<NuspecProperty Include="RepoRoot=$(RepoRoot)" />
</ItemGroup>
<Target Name="_AddEmptyTfmDirectoryInLib">
<ItemGroup>
<TfmSpecificPackageFile Include="_._" PackagePath="lib/$(TargetFramework)/" />
</ItemGroup>
</Target>

<ItemGroup>
<!-- Not a real dependency but it ensures correct build order -->
<ProjectReference Include="..\..\Adapter\MSTest.TestAdapter\MSTest.TestAdapter.csproj" />
<ProjectReference Include="..\..\TestFramework\TestFramework.Extensions\TestFramework.Extensions.csproj" />
<ProjectReference Include="..\..\Analyzers\MSTest.Analyzers.Package\MSTest.Analyzers.Package.csproj" />
</ItemGroup>

<ItemGroup>
<!-- Microsoft.NET.Test.Sdk package is referenced by build system, so omitting it. -->
<PackageReference Include="Microsoft.NET.Test.Sdk" VersionOverride="$(MicrosoftNETTestSdkVersion)" Condition="'$(TargetFramework)' != '$(UwpMinimum)'" />
</ItemGroup>

<ItemGroup>
<None Include="$(PackageReadmeFile)" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
70 changes: 0 additions & 70 deletions src/Package/MSTest/MSTest.nuspec

This file was deleted.

Empty file added src/Package/MSTest/_._
Empty file.
Loading