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 tests running on version freeze #10735

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
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>