aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Bal/test/examples/examples.proj
blob: 60388a936ed7cc30d29a655c842489e559a31ba7 (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
51
52
53
54
<?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 Sdk="Microsoft.Build.Traversal">

  <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>
      <TrimMode>CopyUsed</TrimMode>
    </CoreMBAProject>
    <CoreMBAProject Include="$(LatestCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.LatestCoreMBA</PublishPath>
      <TrimMode>Link</TrimMode>
    </CoreMBAProject>
    <CoreMBAProject Include="$(WPFCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.WPFCoreMBA</PublishPath>
      <SkipFDDx86>true</SkipFDDx86>
      <SkipSCD>true</SkipSCD>
    </CoreMBAProject>

    <FullMBAProject Include="$(FullFramework2MBAProjectPath)" />
    <FullMBAProject Include="$(FullFramework4MBAProjectPath)" />
  </ItemGroup>

  <Target Name="PublishCoreExamples" BeforeTargets="Build">
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd-x86" -r win-x86 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipFDDx86)'==''" />
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd" -r win-x64 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipFDD)'==''" />
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x64 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipSCD)'==''" />
    <!--
    Publishing a library is "undefined" (per https://github.com/dotnet/runtime/issues/91535)
    and is now a build error. This will go away when BAs go out of proc, so not spending a 
    lot of time to keep building trimmed in VS 17.8.
    -->
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x64 -c $(Configuration) --self-contained true -p:PublishTrimmed=false -p:TrimMode=%(CoreMBAProject.TrimMode) "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.TrimMode)'!=''" />
  </Target>

  <ItemGroup>
    <ProjectReference Include="**\*.wixproj" />
  </ItemGroup>
</Project>