chr
2026-04-05 fe750b791d5b517cc4e9bc8e99a9a75139a0cfba
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <AssemblyName>tap</AssemblyName>
    <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
    <ApplicationIcon>../Installer/Assets/opentap.ico</ApplicationIcon>
    <TargetFramework>$(OpenTapAppTargetFramework)</TargetFramework>
    <GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
    <!-- .net9 introduces CET compatibility by default. This adds hardware stack protection.
    Howver, this causes issues with some plugins using native code.
    Hence we disable it for now-->
    <CETCompat>false</CETCompat>
  </PropertyGroup>
 
  <PropertyGroup>
    <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
    <AssemblyTitle>tap</AssemblyTitle>
  </PropertyGroup>
 
  <!-- Automatic assembly versioning in pipeline-->
  <PropertyGroup Condition="'$(ShortVersion)' != ''">
    <Version>$(ShortVersion)</Version>
    <AssemblyVersion>$(ShortVersion)</AssemblyVersion>
    <InformationalVersion>$(GitVersion)</InformationalVersion>
    <FileVersion>$(ShortVersion).0</FileVersion> 
  </PropertyGroup>
 
  <!-- Automatic assembly versioning in pipeline-->
  <PropertyGroup Condition="'$(ShortVersion)' == ''">
    <Version>9.31.0</Version>
    <AssemblyVersion>9.31.0</AssemblyVersion>
    <InformationalVersion>9.31.0-alpha+developerBuild</InformationalVersion>
    <FileVersion>9.31.0.0</FileVersion> 
  </PropertyGroup>
 
  <ItemGroup>
    <Content Include="..\LinuxInstall\tap.sh">
      <Link>tap.sh</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
 
  <ItemGroup Condition="'$(OS)'=='Windows_NT'">
    <Content Include="..\Shared\tap.runtimeconfig.WindowsDesktop.json">
      <Link>tap.runtimeconfig.json</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
 
  <ItemGroup Condition="'$(OS)'!='Windows_NT'">
    <Content Include="..\Shared\tap.runtimeconfig.json">
      <Link>tap.runtimeconfig.json</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
 
  <ItemGroup>
    <ProjectReference Include="..\Cli\Tap.Cli.csproj" />
    <ProjectReference Include="..\Package\Tap.Package.csproj" />
    <ProjectReference Include="..\Engine\Tap.Engine.csproj" />
    <ProjectReference Include="..\BasicSteps\Tap.Plugins.BasicSteps.csproj" />
    <ProjectReference Include="..\Tap.Upgrader\Tap.Upgrader.csproj" />
  </ItemGroup>
 
  <PropertyGroup>
    <!--Detect platform-->
    <PlatformEnv Condition="$([MSBuild]::IsOSPlatform('OSX'))">MacOS</PlatformEnv>
    <PlatformEnv Condition="$([MSBuild]::IsOSPlatform('Linux'))">Linux</PlatformEnv>
    <PlatformEnv Condition="$([MSBuild]::IsOSPlatform('Windows'))">Windows</PlatformEnv>
    <!-- IsOsPlatform may not always be available on Windows -->
    <PlatformEnv Condition="'$(OS)' == 'Windows_NT'">Windows</PlatformEnv>
 
    <!--Detect architecture -->
    <ArchEnv>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</ArchEnv> 
  </PropertyGroup>
 
  <!-- Install OpenTAP as a package - this is necessary for most of the package cli actions to function normally.  -->
  <!-- CopyFilesToOutputDirectory is required for libgit native DLLs -->
  <Target Name="InstallOpenTapAsPackage" AfterTargets="CopyFilesToOutputDirectory">
    <Exec Command="$(OutDir)tap package create ../../package.xml -o $(OutDir)OpenTap.Debug.TapPackage --install" EnvironmentVariables="Debug=true;Sign=false;Platform=$(PlatformEnv);Architecture=$(ArchEnv.ToLower())" WorkingDirectory="$(OutDir)" />
  </Target>
</Project>