dotnet-installer/src/SourceBuild/content/repo-projects/installer.proj
2024-02-13 09:19:33 -06:00

74 lines
3.6 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- We need to extract the non-portable OS name from the non-portable RID and pass that to installer build script -->
<OSNameOverride>$(TargetOS)</OSNameOverride>
<OSNameOverride Condition="'$(PortableBuild)' != 'true'">$(TargetRid.Substring(0, $(TargetRid.IndexOf("-"))))</OSNameOverride>
<!-- Use the repo root build script -->
<BuildScript>$(ProjectDirectory)build$(ShellExtension)</BuildScript>
<!-- Restore and Build actions are already passed in by the root script. -->
<BuildActions>$(FlagParameterPrefix)pack $(FlagParameterPrefix)publish</BuildActions>
<BuildArgs>$(BuildArgs) $(FlagParameterPrefix)runtime-id $(TargetRid)</BuildArgs>
<!--
Setting NETCoreAppMaximumVersion to a high version so that the sdk doesn't complain if we're restoring/publishing for a higher version than the sdk.
See https://github.com/dotnet/sdk/issues/1512#issuecomment-377082883
-->
<BuildArgs>$(BuildArgs) /p:NETCoreAppMaximumVersion=99.9</BuildArgs>
<BuildArgs>$(BuildArgs) /p:OSName=$(OSNameOverride)</BuildArgs>
<BuildArgs>$(BuildArgs) /p:PortableOSName=$(__PortableTargetOS)</BuildArgs>
<BuildArgs>$(BuildArgs) /p:Rid=$(TargetRid)</BuildArgs>
<BuildArgs>$(BuildArgs) /p:DOTNET_INSTALL_DIR=$(DotNetRoot)</BuildArgs>
<BuildArgs Condition="'$(TargetOS)' != 'windows'">$(BuildArgs) /p:AspNetCoreInstallerRid=$(TargetRid)</BuildArgs>
<!-- installer always wants to build portable on FreeBSD -->
<BuildArgs Condition="'$(TargetOS)' == 'freebsd' and '$(DotNetBuildSourceOnly)' == 'true'">$(BuildArgs) /p:PortableBuild=true</BuildArgs>
<BuildArgs Condition="'$(TargetOS)' != 'windows'">$(BuildArgs) /p:CoreSetupRid=$(TargetRid)</BuildArgs>
<!-- Consume the source-built Core-Setup and toolset. This line must be removed to source-build CLI without source-building Core-Setup first. -->
<BuildArgs>$(BuildArgs) /p:PublicBaseURL=file:%2F%2F$(ArtifactsAssetsDir)</BuildArgs>
<BuildArgs>$(BuildArgs) /p:UsePortableLinuxSharedFramework=false</BuildArgs>
</PropertyGroup>
<ItemGroup>
<RepositoryReference Include="arcade" />
<RepositoryReference Include="aspnetcore" />
<RepositoryReference Include="emsdk" />
<RepositoryReference Include="fsharp" />
<RepositoryReference Include="msbuild" />
<RepositoryReference Include="source-build-externals" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
<RepositoryReference Include="nuget-client" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="runtime" />
<RepositoryReference Include="sdk" />
<RepositoryReference Include="test-templates" />
<RepositoryReference Include="vstest" />
</ItemGroup>
<!--
If we have authentication, keep the templating internal feed (if one exists) to acquire the
text-only prebuilt. The source-build repo as a whole should depend on the same internal feed as
this repo does, so authentication should already be set up in the global endpoints json.
-->
<ItemGroup Condition="'$(VSS_NUGET_EXTERNAL_FEED_ENDPOINTS)' != ''">
<KeepFeedPrefixes Include="darc-int-dotnet-aspnetcore-" />
</ItemGroup>
<ItemGroup>
<EnvironmentVariables Include="CLIBUILD_SKIP_TESTS=true" />
<!-- Disable bundled tools until we can figure out:
Unable to find package dotnet-dev-certs.
Unable to find package dotnet-ef.
Unable to find package dotnet-sql-cache.
Unable to find package dotnet-user-secrets.
Unable to find package dotnet-user-jwts.
Unable to find package dotnet-watch. -->
<EnvironmentVariables Include="CLIBUILD_SKIP_BUNDLEDDOTNETTOOLS=true" />
</ItemGroup>
</Project>