Skip to content

Commit

Permalink
Revert "Revert "Fix tests running on version freeze (#10735)" (#10775)"
Browse files Browse the repository at this point in the history
This reverts commit 312a2b8.
  • Loading branch information
YuliiaKovalova authored Oct 9, 2024
1 parent 94941d9 commit 507cd1a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,30 @@
</None>
</ItemGroup>

<!-- This target creates packages needed for e2e testing. Inputs and outputs are defined to enable incremental builds. -->

<PropertyGroup Label="TestAssests">
<ArtifactsNonShippingPackagesDir>$(ArtifactsBinDir)Microsoft.Build.BuildCheck.UnitTests\CustomChecks</ArtifactsNonShippingPackagesDir>
</PropertyGroup>

<ItemGroup Label="TestAssets">
<ProjectsToPack Include="..\Build\Microsoft.Build.csproj" />
<ProjectsToPack Include="..\Framework\Microsoft.Build.Framework.csproj" />
<ProjectsToPack Include="..\StringTools\StringTools.csproj" />
</ItemGroup>

<Target Name="GetSourceFilesForPacking">
<ItemGroup>
<SourceFilesForPacking Include="%(ProjectsToPack.RootDir)%(ProjectsToPack.Directory)**\*.cs" />
</ItemGroup>
</Target>

<Target Name="MSBuildPackagesForTests"
AfterTargets="Build"
DependsOnTargets="GetSourceFilesForPacking"
Inputs="@(ProjectsToPack);@(SourceFilesForPacking)"
Outputs="$(ArtifactsNonShippingPackagesDir)\Microsoft.Build.$(Version).nupkg;$(ArtifactsNonShippingPackagesDir)\Microsoft.Build.Framework.$(Version).nupkg;$(ArtifactsNonShippingPackagesDir)\Microsoft.NET.StringTools.$(Version).nupkg">
<Exec Command="dotnet pack &quot;%(ProjectsToPack.Identity)&quot; -o &quot;$(ArtifactsNonShippingPackagesDir)&quot; -p:PackageVersion=$(PackageVersion)" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<!-- In the real world scenario, the dependencies are added as Nuget PackageReference, modified for test purposes only. -->
<ItemGroup>
<ProjectReference Include="..\..\..\Build\Microsoft.Build.csproj" IncludeInPackage="true" />
<ProjectReference Include="..\..\..\Build\Microsoft.Build.csproj" />
</ItemGroup>

</Project>

0 comments on commit 507cd1a

Please sign in to comment.