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

Fix TestPlatform.ObjectModel reference #100

Merged
merged 10 commits into from May 28, 2021
@@ -1,18 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net472</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;net472;net5.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Machine.Fakes.Moq" Version="2.10.0" />
<PackageReference Include="Machine.Specifications" Version="1.0.0" />
<PackageReference Include="Machine.Fakes.Moq" Version="2.11.0" />
<PackageReference Include="Machine.Specifications.Should" Version="1.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.2.1" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="15.9.0" Condition="'$(TargetFramework)'=='netcoreapp2.1'" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="11.0.0" Condition="'$(TargetFramework)'=='net472'" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.9.0" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="16.10.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Expand Up @@ -16,20 +16,14 @@
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='netcoreapp2.1'">
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<DefineConstants>NETSTANDARD</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Mono.Cecil" Version="[0.10-*, 0.11)" />
<PackageReference Include="Machine.Specifications" Version="[0.11.0,2.0.0)" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp2.1'">
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="[15.0.0,17.0.0)" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net452'">
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="11.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="16.10.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand All @@ -40,18 +34,23 @@
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);NetCorePackageItems;NetFrameworkPackageItems</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<Target Name="PreventTestPlatformObjectModelCopyLocal" AfterTargets="ResolveReferences">
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(Filename)' == 'Microsoft.VisualStudio.TestPlatform.ObjectModel'" />
</ItemGroup>
</Target>

<Target Name="NetCorePackageItems" Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<ItemGroup>
<TfmSpecificPackageFile Include="*.props" PackagePath="build\$(TargetFramework)" />
<TfmSpecificPackageFile Include="$(OutputPath)\*.dll" PackagePath="build\$(TargetFramework)" />
<TfmSpecificPackageFile Include="$(OutputPath)\Machine.*.dll" PackagePath="build\$(TargetFramework)" />
</ItemGroup>
</Target>

<Target Name="NetFrameworkPackageItems" Condition="'$(TargetFramework)'=='net452'">
<Target Name="NetFrameworkPackageItems" Condition="'$(TargetFramework)' != 'netcoreapp2.1'">
<ItemGroup>
<TfmSpecificPackageFile Include="*.props" PackagePath="build\$(TargetFramework)" />
<TfmSpecificPackageFile Include="$(OutputPath)\Machine.Specifications.dll" PackagePath="build\$(TargetFramework)\" />
<TfmSpecificPackageFile Include="$(OutputPath)\Machine.TestAdapter.dll" PackagePath="build\$(TargetFramework)" />
<TfmSpecificPackageFile Include="$(OutputPath)\Machine.*.dll" PackagePath="build\$(TargetFramework)" />
mikeblakeuk marked this conversation as resolved.
Show resolved Hide resolved
<TfmSpecificPackageFile Include="$(OutputPath)\Mono.*.dll" PackagePath="build\$(TargetFramework)" />
</ItemGroup>
</Target>
Expand Down