aboutsummaryrefslogtreecommitdiff
path: root/src/test/examples/examples.proj
blob: 08cb75116243c28b1c2d162b613de7c33fcc0329 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->


<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  
  <Import Project="..\..\Directory.Build.props" />

  <PropertyGroup>
    <EarliestCoreMBAProjectPath>EarliestCoreMBA\Example.EarliestCoreMBA.csproj</EarliestCoreMBAProjectPath>
    <FullFramework2MBAProjectPath>FullFramework2MBA\Example.FullFramework2MBA.csproj</FullFramework2MBAProjectPath>
    <FullFramework4MBAProjectPath>FullFramework4MBA\Example.FullFramework4MBA.csproj</FullFramework4MBAProjectPath>
    <LatestCoreMBAProjectPath>LatestCoreMBA\Example.LatestCoreMBA.csproj</LatestCoreMBAProjectPath>
    <WPFCoreMBAProjectPath>WPFCoreMBA\Example.WPFCoreMBA.csproj</WPFCoreMBAProjectPath>
    <MBAPublishPath>$(OutputPath)examples\publish\</MBAPublishPath>
  </PropertyGroup>

  <ItemGroup>
    <CoreMBAProject Include="$(EarliestCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.EarliestCoreMBA</PublishPath>
    </CoreMBAProject>
    <CoreMBAProject Include="$(LatestCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.LatestCoreMBA</PublishPath>
    </CoreMBAProject>
    <CoreMBAProject Include="$(WPFCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.WPFCoreMBA</PublishPath>
      <SkipSCD>true</SkipSCD>
      <SkipTrimmedSCD>true</SkipTrimmedSCD>
    </CoreMBAProject>
    
    <FullMBAProject Include="$(FullFramework2MBAProjectPath)" />
    <FullMBAProject Include="$(FullFramework4MBAProjectPath)" />
    
    <ExampleBundleProject Include="**\*.wixproj" />
  </ItemGroup>

  <Target Name="PublishCoreExamples">
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd" -r win-x86 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipFDD)'==''" />
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x86 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipSCD)'==''" />
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x86 -c $(Configuration) --self-contained true -p:PublishTrimmed=true "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipTrimmedSCD)'==''" />
  </Target>

  <Target Name="Build" DependsOnTargets="PublishCoreExamples">
    <MSBuild Projects="%(ExampleBundleProject.Identity)" />
  </Target>
  
  <Import Project="..\..\Directory.Build.targets" />
</Project>