forked from dotnet/msbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestNetTaskResourceCallback.csproj
More file actions
25 lines (20 loc) · 1.01 KB
/
Copy pathTestNetTaskResourceCallback.csproj
File metadata and controls
25 lines (20 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(LatestDotNetCoreForMSBuild)</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TestProjectFolder>$([System.IO.Path]::GetFullPath('$([System.IO.Path]::Combine('$(MSBuildThisFileDirectory)', '..', '..', '..', '..'))'))</TestProjectFolder>
<ExampleTaskPath>$([System.IO.Path]::Combine('$(TestProjectFolder)', '$(TargetFramework)', 'ExampleTask.dll'))</ExampleTaskPath>
</PropertyGroup>
<UsingTask
TaskName="Microsoft.Build.UnitTests.BackEnd.RequestCoresTask"
AssemblyFile="$(ExampleTaskPath)"
TaskFactory="TaskHostFactory"
Runtime="NET"/>
<Target Name="TestTask" BeforeTargets="Build">
<Microsoft.Build.UnitTests.BackEnd.RequestCoresTask CoreCount="2" ReleaseAfter="true">
<Output PropertyName="Granted" TaskParameter="GrantedCores" />
</Microsoft.Build.UnitTests.BackEnd.RequestCoresTask>
<Message Text="CallbackResult: RequestCores(2) = $(Granted)" Importance="high" />
</Target>
</Project>