Skip to content

Commit 90f6a98

Browse files
authored
[main] Source code updates from dotnet/dotnet (#49035)
2 parents b2f888e + 8d7e281 commit 90f6a98

File tree

14 files changed

+42
-16
lines changed

14 files changed

+42
-16
lines changed

CODEOWNERS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,3 @@
108108
# dotnet-format
109109
/src/BuiltInTools/dotnet-format @dotnet/roslyn-ide
110110
/test/dotnet-format.UnitTests @dotnet/roslyn-ide
111-
112-
# Area: VMR & SourceBuild
113-
/eng/DotNetBuild.props @dotnet/source-build @dotnet/product-construction

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
Condition="'$(RunTestsAsTool)' == 'true' And '$(CanRunTestAsTool)' == 'true'"/>
5555

5656
<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
57-
<!-- We cannot use live shims when building tool packs in VMR - only package for current arch is available. -->
57+
<!-- Don't use live shims when building tool packs in .NET product build mode as only packages for the current arch are available. -->
5858
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
5959
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
6060
and '$(MSBuildProjectName)' != 'sdk-tasks'

eng/Publishing.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<Artifact Update="$(ArtifactsShippingPackagesDir)dotnet-sdk-pgo-*" Visibility="External" />
3636
</ItemGroup>
3737

38-
<!-- temporarily remove the .Msi workload pack nugets in the SDK official build until we switch to the VMR, but keep the manifest .Msi packages -->
38+
<!-- Temporarily remove the .Msi workload pack nugets in non .NET product build mode (until the repo official build gets removed), but keep the manifest .Msi packages. -->
3939
<ItemGroup Condition="'$(DotNetBuild)' != 'true'">
4040
<MsiPackages Include="$(ArtifactsShippingPackagesDir)*.Msi.*.nupkg" />
4141
<MsiPackages Remove="$(ArtifactsShippingPackagesDir)*.Manifest-*.Msi.*.nupkg" />

eng/restore-toolset.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function InitializeCustomSDKToolset {
99
}
1010

1111
# The following frameworks and tools are used only for testing.
12-
# Do not attempt to install them in source build.
12+
# Do not attempt to install them in product build.
1313
if ($productBuild) {
1414
return
1515
}

eng/restore-toolset.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function InitializeCustomSDKToolset {
66
fi
77

88
# The following frameworks and tools are used only for testing.
9-
# Do not attempt to install them in source build.
9+
# Do not attempt to install them in product build.
1010
if [[ $product_build == true ]]; then
1111
return
1212
fi

src/BuiltInTools/dotnet-watch/dotnet-watch.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515

1616
<!-- Avoid https://github.com/dotnet/arcade/issues/9305 -->
1717
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
18+
19+
<!--
20+
Disable CS9057 in source-only dev/ci builds. This is necessary because dotnet-watch distributes some ASP.NET Core
21+
analyzers. These analyzers get built with a dependency on the live version of Microsoft.CodeAnalysis. In a dev/ci
22+
build, the assembly version associated with Microsoft.CodeAnalysis in that case is 42.42.42.4242, set by Arcade in
23+
dev/ci builds. So when building dotnet-watch with its analyzer dependencies, it will cause CS9057 because the
24+
analyzer assembly version is not the same as the compiler assembly version being used by the sdk that the project
25+
is being built with. But this is fine because the analyzer is just being used here to distribute it with the tool.
26+
-->
27+
<NoWarn Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(OfficialBuild)' != 'true'">$(NoWarn);CS9057</NoWarn>
1828
</PropertyGroup>
1929

2030
<ItemGroup>

src/Layout/redist/redist.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
<ProjectReference Include="..\finalizer\finalizer.csproj" Condition="'$(OS)' == 'Windows_NT'" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" Private="false" />
7878
</ItemGroup>
7979

80-
<!-- In the VMR build we explicitly build workloads in build pass 2.
81-
In the SDK official build we build workloads as part of win-x64 -->
80+
<!-- In .NET product build mode, explicitly build workloads in build pass 2.
81+
In the SDK official build, build workloads as part of win-x64. -->
8282
<ItemGroup Condition="'$(OS)' == 'Windows_NT' and '$(SkipBuildingInstallers)' != 'true' and '$(DotNetBuild)' != 'true' and '$(BuildWorkloads)' == 'true'">
8383
<ProjectReference Include="$(RepoRoot)src\Workloads\VSInsertion\workloads.csproj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" Private="false" />
8484
</ItemGroup>

src/Layout/redist/targets/GenerateBundledVersions.targets

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,28 @@
1515
Overwrite="true"
1616
Encoding="ASCII" />
1717

18+
<!-- The Version.Details file doesn't contain live information when building the
19+
.NET product inside the orchestrator. Therefore don't read from it in that mode. -->
1820
<GetDependencyInfo
1921
VersionDetailsXmlFile="$(RepositoryEngineeringDir)Version.Details.xml"
2022
DependencyName="Microsoft.NETCore.App.Ref"
21-
Condition="'$(DotNetBuild)' != 'true'">
23+
Condition="'$(DotNetBuildOrchestrator)' != 'true'">
2224
<Output TaskParameter="DependencyVersion" PropertyName="DepRuntimeVersion" />
2325
<Output TaskParameter="DependencyCommit" PropertyName="DepRuntimeCommit" />
2426
</GetDependencyInfo>
2527

2628
<GetDependencyInfo
2729
VersionDetailsXmlFile="$(RepositoryEngineeringDir)Version.Details.xml"
2830
DependencyName="Microsoft.AspNetCore.App.Ref"
29-
Condition="'$(DotNetBuild)' != 'true'">
31+
Condition="'$(DotNetBuildOrchestrator)' != 'true'">
3032
<Output TaskParameter="DependencyVersion" PropertyName="DepAspNetCoreVersion" />
3133
<Output TaskParameter="DependencyCommit" PropertyName="DepAspNetCoreCommit" />
3234
</GetDependencyInfo>
3335

3436
<GetDependencyInfo
3537
VersionDetailsXmlFile="$(RepositoryEngineeringDir)Version.Details.xml"
3638
DependencyName="Microsoft.WindowsDesktop.App.Ref"
37-
Condition="'$(DotNetBuild)' != 'true'">
39+
Condition="'$(DotNetBuildOrchestrator)' != 'true'">
3840
<Output TaskParameter="DependencyVersion" PropertyName="DepWindowsDesktopVersion" />
3941
<Output TaskParameter="DependencyCommit" PropertyName="DepWindowsDesktopCommit" />
4042
</GetDependencyInfo>

src/Layout/redist/targets/GenerateMSIs.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<!-- Directory for the zipped up light command package -->
4242
<LightCommandPackagesDir>$(ArtifactsNonShippingPackagesDir)</LightCommandPackagesDir>
4343

44-
<!-- for local SDK builds we allow skipping the workload manifest msi generation to save build time, the sdk bundle won't contain the manifest msis in that case. -->
44+
<!-- For local non .NET SDK product builds, allow skipping the workload manifest msi generation to save build time. The sdk bundle won't contain the manifest msis in that case. -->
4545
<AllowEmptyBuiltinWorkloadManifestMsi Condition="'$(DotNetBuild)' != 'true' and '$(BuildWorkloads)' != 'true' and '$(OfficialBuild)' != 'true'">true</AllowEmptyBuiltinWorkloadManifestMsi>
4646
</PropertyGroup>
4747

src/WebSdk/Web/Tasks/Microsoft.NET.Sdk.Web.Tasks.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@
1111

1212
<PropertyGroup>
1313
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
14+
15+
<!--
16+
Disable CS9057 in source-only dev/ci builds. This is necessary because the SDK distributes Microsoft.AspNetCore.Analyzers
17+
with its Microsoft.NET.Sdk.Web.Tasks package. Microsoft.AspNetCore.Analyzers gets built with a dependency on the live
18+
version of Microsoft.CodeAnalysis. In a dev/ci build, the assembly version associated with Microsoft.CodeAnalysis in
19+
that case is 42.42.42.4242, set by Arcade in dev/ci builds. So when building Microsoft.NET.Sdk.Web.Tasks with its
20+
analyzer dependencies, it will cause CS9057 because the analyzer assembly version is not the same as the compiler
21+
assembly version being used by the sdk that the project is being built with. But this is fine because the analyzer
22+
is just being used here to distribute it with the Microsoft.NET.Sdk.Web.Tasks package.
23+
-->
24+
<NoWarn Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(OfficialBuild)' != 'true'">$(NoWarn);CS9057</NoWarn>
1425
</PropertyGroup>
1526

1627
<ItemGroup>

0 commit comments

Comments
 (0)