Skip to content

Commit

Permalink
Source-build fixes and clean-up (#40559)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer authored Apr 30, 2024
1 parent bf1a34d commit 3f04dd3
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 214 deletions.
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
<PackageVersion Include="System.Windows.Extensions" Version="$(MicrosoftNETCoreAppRefPackageVersion)" />
<PackageVersion Include="System.Xml.XmlDocument" Version="$(SystemXmlXmlDocumentPackageVersion)" />
<PackageVersion Include="Valleysoft.DockerCredsProvider" Version="2.2.1" />
<PackageVersion Include="WindowsAzure.Storage" Version="9.3.3" />
<PackageVersion Include="xunit" Version="$(XUnitVersion)" />
<PackageVersion Include="Xunit.Combinatorial" Version="$(XunitCombinatorialVersion)" />
<PackageVersion Include="xunit.console" Version="$(XUnitVersion)"/>
Expand Down
4 changes: 4 additions & 0 deletions eng/DotNetBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<PropertyGroup>
<InnerBuildArgs>$(InnerBuildArgs) /p:Projects="$(InnerSourceBuildRepoRoot)\source-build.slnf"</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:UseSharedCompilation=false</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:SkipBuildingInstallers=true</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:IncludeAdditionalSharedFrameworks=false</InnerBuildArgs>
<InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:DISABLE_CROSSGEN=true</InnerBuildArgs>
<InnerBuildArgs Condition="'$(PgoInstrument)' == 'true'">$(InnerBuildArgs) /p:PgoInstrument=true</InnerBuildArgs>
</PropertyGroup>
</Target>

Expand Down
16 changes: 4 additions & 12 deletions eng/Publishing.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

<TempWorkingDirectory>$(ArtifactsDir)\AssetsTmpDir\$([System.Guid]::NewGuid())</TempWorkingDirectory>
<PublishBinariesAndBadge Condition=" '$(PublishBinariesAndBadge)' == '' ">true</PublishBinariesAndBadge>

<IsStableBuild>false</IsStableBuild>
<IsStableBuild Condition="'$(DotNetFinalVersionKind)' == 'release'">true</IsStableBuild>
</PropertyGroup>

<!-- Pulled from arcade's publish.proj see https://github.com/dotnet/arcade/issues/5790 for
Expand Down Expand Up @@ -83,7 +86,7 @@
<PropertyGroup>
<PublishDependsOnTargets>$(PublishDependsOnTargets);_ResolvePublishRoslynNuGetPackages</PublishDependsOnTargets>
</PropertyGroup>

<Target Name="_ResolvePublishRoslynNuGetPackages">
<ItemGroup>
<RoslynPackagesToPush Include="$(NuGetPackageRoot)\Microsoft.Net.Compilers.Toolset.Framework\$(MicrosoftNetCompilersToolsetFrameworkPackageVersion)\*.nupkg" />
Expand All @@ -103,11 +106,6 @@
<ItemsToSignPostBuild Remove="@(ItemsToSignPostBuild)" />
<ItemsToSignPostBuild Include="@(ToolsetAssetsToPublish->'%(Filename)%(Extension)')" />
</ItemGroup>

<PropertyGroup>
<IsStableBuild>false</IsStableBuild>
<IsStableBuild Condition="'$(DotNetFinalVersionKind)' == 'release'">true</IsStableBuild>
</PropertyGroup>

<MakeDir Directories="$(TempWorkingDirectory)" />

Expand Down Expand Up @@ -226,11 +224,6 @@
<ItemsToSignPostBuild Include="@(ItemsToSignPostBuildWithPaths->'%(Filename)%(Extension)')" />
</ItemGroup>

<PropertyGroup>
<IsStableBuild>false</IsStableBuild>
<IsStableBuild Condition="'$(DotNetFinalVersionKind)' == 'release'">true</IsStableBuild>
</PropertyGroup>

<PushToBuildStorage
AzureDevOpsCollectionUri="$(SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)"
AzureDevOpsProject="$(SYSTEM_TEAMPROJECT)"
Expand All @@ -249,7 +242,6 @@
AssetManifestPath="$(InstallersAssetManifestFilePath)"
PublishFlatContainer="true"
IsStableBuild="$(IsStableBuild)"
PublishingVersion="3"
PushToLocalStorage="$(PushToLocalStorage)"
AssetsLocalStorageDir="$(SourceBuiltAssetsDir)"
ShippingPackagesLocalStorageDir="$(SourceBuiltShippingPackagesDir)"
Expand Down
3 changes: 3 additions & 0 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@

<!-- Used only for publishing -->
<UsagePattern IdentityGlob="Microsoft.Net.Compilers.Toolset.Framework/*" />

<!-- These are coming in via runtime but the source-build infra isn't able to automatically pick up the right intermediate. -->
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Crossgen2.linux-x64/*9.0.*" />
</IgnorePatterns>

</UsageData>
4 changes: 4 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,10 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>be933308b9024d798a9a22c0b8f3c8e3616ffbd8</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.24229.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>be933308b9024d798a9a22c0b8f3c8e3616ffbd8</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24229.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>be933308b9024d798a9a22c0b8f3c8e3616ffbd8</Sha>
Expand Down
7 changes: 2 additions & 5 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@
<PropertyGroup Label="MicroBuild.Core version">
<MicroBuildCorePackageVersion>0.2.0</MicroBuildCorePackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.24114.1</MicrosoftDotNetBuildTasksInstallersPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade-services -->
<MicrosoftDotNetDarcLibVersion>1.1.0-beta.24229.1</MicrosoftDotNetDarcLibVersion>
Expand Down Expand Up @@ -319,8 +315,10 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.24229.1</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetSignToolVersion>9.0.0-beta.24229.1</MicrosoftDotNetSignToolVersion>
<MicrosoftDotNetXliffTasksVersion>9.0.0-beta.24229.1</MicrosoftDotNetXliffTasksVersion>
<MicrosoftDotNetXUnitExtensionsVersion>9.0.0-beta.24229.1</MicrosoftDotNetXUnitExtensionsVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/sourcelink -->
Expand All @@ -339,7 +337,6 @@
<PropertyGroup>
<FluentAssertionsVersion>6.12.0</FluentAssertionsVersion>
<FluentAssertionsJsonVersion>6.1.0</FluentAssertionsJsonVersion>
<MicrosoftDotNetXUnitExtensionsVersion>9.0.0-beta.24229.1</MicrosoftDotNetXUnitExtensionsVersion>
<MoqPackageVersion>4.18.4</MoqPackageVersion>
<XunitCombinatorialVersion>1.3.2</XunitCombinatorialVersion>
<MicrosoftDotNetInstallerWindowsSecurityTestDataPackageVersion>8.0.0-beta.23607.1</MicrosoftDotNetInstallerWindowsSecurityTestDataPackageVersion>
Expand Down
2 changes: 2 additions & 0 deletions source-build.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"src\\Compatibility\\Microsoft.DotNet.ApiSymbolExtensions\\Microsoft.DotNet.ApiSymbolExtensions.csproj",
"src\\Containers\\Microsoft.NET.Build.Containers\\Microsoft.NET.Build.Containers.csproj",
"src\\Containers\\packaging\\package.csproj",
"src\\Installer\\redist-installer\\redist-installer.csproj",
"src\\Installer\\core-sdk-tasks\\core-sdk-tasks.csproj",
"src\\Layout\\redist\\redist.csproj",
"src\\Layout\\tool_fsharp\\tool_fsc.csproj",
"src\\Layout\\tool_msbuild\\tool_msbuild.csproj",
Expand Down
190 changes: 0 additions & 190 deletions src/Installer/core-sdk-tasks/AzurePublisher.cs

This file was deleted.

5 changes: 1 addition & 4 deletions src/Installer/core-sdk-tasks/core-sdk-tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">$(SdkTargetFramework)</TargetFrameworks>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RootNamespace>Microsoft.DotNet.Cli.Build</RootNamespace>
<DefineConstants Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefineConstants);SOURCE_BUILD</DefineConstants>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" />
<PackageReference Include="Microsoft.Build.Tasks.Core" />
<PackageReference Include="Microsoft.Build.Utilities.Core" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NuGet.Versioning" />
<PackageReference Include="NuGet.Packaging" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataLoadContextVersion)" />
<PackageReference Include="WindowsAzure.Storage" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<PackageReference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
Expand Down
9 changes: 8 additions & 1 deletion src/Installer/redist-installer/projects/SdkResolver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<!--
References assets from multiple architectures and can't be built inside the VMR until we have a join point job
that can pull assets from multiple legs. https://github.com/dotnet/source-build/issues/4336
-->
<ExcludeFromDotNetBuild>true</ExcludeFromDotNetBuild>
</PropertyGroup>

<ItemGroup>
Expand All @@ -19,7 +24,9 @@
<ProjectReference Include="$(RepoRoot)src\Resolvers\Microsoft.DotNet.MSBuildSdkResolver\Microsoft.DotNet.MSBuildSdkResolver.csproj" ReferenceOutputAssembly="false" />
</ItemGroup>

<Target Name="GenerateLayout" Condition="'$(OS)' == 'Windows_NT'" BeforeTargets="AfterBuild">
<Target Name="GenerateLayout"
Condition="'$(OS)' == 'Windows_NT' and '$(_SuppressAllTargets)' != 'true'"
BeforeTargets="AfterBuild">
<Message Importance="High" Text="$(MSBuildProjectName) -&gt; $(OutputPath)" />

<RemoveDir Directories="$(OutputPath)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<!--
References assets from multiple architectures and can't be built inside the VMR until we have a join point job
that can pull assets from multiple legs. https://github.com/dotnet/source-build/issues/4336
-->
<ExcludeFromDotNetBuild>true</ExcludeFromDotNetBuild>
</PropertyGroup>

<ItemGroup>
Expand All @@ -20,7 +25,9 @@
<ProjectReference Include="$(RepoRoot)src\Microsoft.DotNet.TemplateLocator\Microsoft.DotNet.TemplateLocator.csproj" ReferenceOutputAssembly="false" />
</ItemGroup>

<Target Name="GenerateLayout" Condition="'$(OS)' == 'Windows_NT'" BeforeTargets="AfterBuild">
<Target Name="GenerateLayout"
Condition="'$(OS)' == 'Windows_NT' and '$(_SuppressAllTargets)' != 'true'"
BeforeTargets="AfterBuild">
<Message Importance="High" Text="$(MSBuildProjectName) -&gt; $(OutputPath)" />

<RemoveDir Directories="$(OutputPath)" />
Expand Down
2 changes: 2 additions & 0 deletions src/Installer/redist-installer/targets/GenerateLayout.targets
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
<!-- Base url for official releases. Used to obtain some assets from older releases when necessary. -->
<OfficialBaseURL>https://dotnetcli.blob.core.windows.net/dotnet/</OfficialBaseURL>
<PublicBaseURL Condition="'$(PublicBaseURL)' == ''">$(OfficialBaseURL)</PublicBaseURL>
<!-- MSBuild removes the '//' slashes when passing PublicBaseURL from the outer to the inner build. -->
<PublicBaseURL Condition="$(PublicBaseURL.StartsWith('file:')) and '$(OS)' != 'Windows_NT'">$([System.Text.RegularExpressions.Regex]::Replace('$(PublicBaseURL)', '%28file:\/{1,}%29%28.+%29', 'file:///%242'))</PublicBaseURL>

<NetRuntimeRid Condition="'$(NetRuntimeRid)' == ''">$(HostRid)</NetRuntimeRid>
<NetRuntimeRid Condition=" ('$(OSName)' == 'win' or '$(OSName)' == 'osx' or '$(OSName)' == 'freebsd') and '$(DotNetBuildSourceOnly)' != 'true' ">$(OSName)-$(Architecture)</NetRuntimeRid>
Expand Down

0 comments on commit 3f04dd3

Please sign in to comment.