Merge branch 'release/6.0.4xx' of https://github.com/dotnet/installer into merge/release/6.0.1xx-to-release/6.0.4xx

This commit is contained in:
Jason Zhai 2024-07-09 22:44:07 -07:00
commit a432216985
54 changed files with 464 additions and 1311 deletions

View file

@ -36,7 +36,7 @@ variables:
value: ''
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- name: _InternalRuntimeDownloadArgs
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
/p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64)
- name: DncEngPublicBuildPool
@ -272,7 +272,7 @@ extends:
_TestArg: ''
Build_Linux_musl_Debug_x64:
_BuildConfig: Debug
_DockerParameter: '--docker alpine.3.13'
_DockerParameter: '--docker alpine.3.15'
_LinuxPortable: ''
_RuntimeIdentifier: '--runtime-id linux-musl-x64'
_BuildArchitecture: 'x64'
@ -317,7 +317,7 @@ extends:
_TestArg: ''
Build_Linux_musl_Release_x64:
_BuildConfig: Release
_DockerParameter: '--docker alpine.3.13'
_DockerParameter: '--docker alpine.3.15'
_LinuxPortable: ''
_RuntimeIdentifier: '--runtime-id linux-musl-x64'
_BuildArchitecture: 'x64'
@ -415,11 +415,6 @@ extends:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml@self
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml@self
parameters:
dependsOn: Source_Build_Create_Tarball
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates-official/job/publish-build-assets.yml@self
parameters:
@ -429,6 +424,8 @@ extends:
- Darwin
- Source_Build_Managed
- Source_Build_Create_Tarball
- PGO_Linux
- PGO_Windows_NT
publishUsingPipelines: true
pool:
name: $(DncEngInternalBuildPool)

View file

@ -34,7 +34,7 @@ variables:
value: ''
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- name: _InternalRuntimeDownloadArgs
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
/p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64)
@ -228,7 +228,7 @@ stages:
_TestArg: ''
Build_Linux_musl_Debug_x64:
_BuildConfig: Debug
_DockerParameter: '--docker alpine.3.13'
_DockerParameter: '--docker alpine.3.15'
_LinuxPortable: ''
_RuntimeIdentifier: '--runtime-id linux-musl-x64'
_BuildArchitecture: 'x64'
@ -273,7 +273,7 @@ stages:
_TestArg: ''
Build_Linux_musl_Release_x64:
_BuildConfig: Release
_DockerParameter: '--docker alpine.3.13'
_DockerParameter: '--docker alpine.3.15'
_LinuxPortable: ''
_RuntimeIdentifier: '--runtime-id linux-musl-x64'
_BuildArchitecture: 'x64'
@ -367,11 +367,6 @@ stages:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball-pr.yml
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build-pr.yml
parameters:
dependsOn: Source_Build_Create_Tarball
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
@ -381,6 +376,8 @@ stages:
- Darwin
- Source_Build_Managed
- Source_Build_Create_Tarball
- PGO_Linux
- PGO_Windows_NT
publishUsingPipelines: true
pool:
${{ if eq(variables['System.TeamProject'], 'internal') }}:

View file

@ -13,13 +13,13 @@
<add key="darc-pub-dotnet-emsdk-8601068" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-86010681/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-emsdk -->
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
<add key="darc-pub-DotNet-msbuild-Trusted-d679d20" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-d679d209/nuget/v3/index.json" />
<add key="darc-pub-DotNet-msbuild-Trusted-a400405" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-a400405b/nuget/v3/index.json" />
<!-- End: Package sources from DotNet-msbuild-Trusted -->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-int-dotnet-runtime-e77011b" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-e77011b3/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-templating -->
<add key="darc-int-dotnet-templating-c86b755" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-c86b7556/nuget/v3/index.json" />
<add key="darc-int-dotnet-templating-89f5155" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-89f5155b/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-templating -->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
<add key="darc-int-dotnet-windowsdesktop-ef2ca68" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-ef2ca68f/nuget/v3/index.json" />
@ -37,25 +37,23 @@
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<!-- Temporary feed for Xamarin workload manifest -->
<add key="xamarin" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json" />
<!-- Remove after RTM. Working around lack of automated creation of isolated feeds for nuget client -->
<add key="darc-pub-nuget-nuget.client-078701b" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-nuget-nuget.client-078701b/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-aspnetcore -->
<add key="darc-int-dotnet-aspnetcore-fedc545" value="true" />
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
<!-- End: Package sources from DotNet-msbuild-Trusted -->
<!-- Begin: Package sources from dotnet-aspnetcore -->
<add key="darc-int-dotnet-aspnetcore-fedc545" value="true" />
<!-- End: Package sources from dotnet-aspnetcore -->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-int-dotnet-runtime-e77011b" value="true" />
<!-- End: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-templating -->
<add key="darc-int-dotnet-templating-c86b755" value="true" />
<add key="darc-int-dotnet-templating-89f5155" value="true" />
<!-- End: Package sources from dotnet-templating -->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
<add key="darc-int-dotnet-windowsdesktop-ef2ca68" value="true" />
<!-- End: Package sources from dotnet-windowsdesktop -->
<!-- End: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
<!-- End: Package sources from dotnet-windowsdesktop -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->

View file

@ -77,40 +77,40 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore</Uri>
<Sha>fedc545ce86467b7d3413d906f1ab02fb3db12ff</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.2.1" Version="1.0.2-beta4.22064.3">
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.2.1" Version="1.0.2-beta4.22207.1">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>c40ef7e056b48e011c43a21354d6790ba6b8b4fc</Sha>
<Sha>9388790ba9ed8fef11584b2c74fe6789782a1592</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.5.0" Version="1.0.2-beta4.22064.3">
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.5.0" Version="1.0.2-beta4.22207.1">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>c40ef7e056b48e011c43a21354d6790ba6b8b4fc</Sha>
<Sha>9388790ba9ed8fef11584b2c74fe6789782a1592</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.6.0" Version="1.0.2-beta4.22064.3">
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.6.0" Version="1.0.2-beta4.22207.1">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>c40ef7e056b48e011c43a21354d6790ba6b8b4fc</Sha>
<Sha>9388790ba9ed8fef11584b2c74fe6789782a1592</Sha>
<SourceBuild RepoName="test-templates" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Common.ItemTemplates" Version="6.0.132" CoherentParentDependency="Microsoft.NET.Sdk">
<Dependency Name="Microsoft.DotNet.Common.ItemTemplates" Version="6.0.424" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-templating</Uri>
<Sha>c86b7556cbdc3e9a5a5226547490713e2e948401</Sha>
<Sha>89f5155bcd844b1a02d2be6b17caa0fb2dcf17bc</Sha>
</Dependency>
<Dependency Name="Microsoft.TemplateEngine.Cli" Version="6.0.132-servicing.24314.6" CoherentParentDependency="Microsoft.NET.Sdk">
<Dependency Name="Microsoft.TemplateEngine.Cli" Version="6.0.424-rtm.24314.8" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-templating</Uri>
<Sha>c86b7556cbdc3e9a5a5226547490713e2e948401</Sha>
<Sha>89f5155bcd844b1a02d2be6b17caa0fb2dcf17bc</Sha>
<SourceBuild RepoName="templating" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Common.ProjectTemplates.6.0" Version="6.0.132" CoherentParentDependency="Microsoft.NET.Sdk">
<Dependency Name="Microsoft.DotNet.Common.ProjectTemplates.6.0" Version="6.0.424" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-templating</Uri>
<Sha>c86b7556cbdc3e9a5a5226547490713e2e948401</Sha>
<Sha>89f5155bcd844b1a02d2be6b17caa0fb2dcf17bc</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk" Version="6.0.132-servicing.24315.1">
<Dependency Name="Microsoft.NET.Sdk" Version="6.0.424-servicing.24315.2">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-sdk</Uri>
<Sha>53a7fb7b59ad63d09ce5182e2baaac1bd978f5d9</Sha>
<Sha>d1ba1897fb2799cf7a51bab3492c933a4fdad702</Sha>
<SourceBuild RepoName="sdk" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.MSBuildSdkResolver" Version="6.0.132-servicing.24315.1">
<Dependency Name="Microsoft.DotNet.MSBuildSdkResolver" Version="6.0.424-servicing.24315.2">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-sdk</Uri>
<Sha>53a7fb7b59ad63d09ce5182e2baaac1bd978f5d9</Sha>
<Sha>d1ba1897fb2799cf7a51bab3492c933a4fdad702</Sha>
</Dependency>
<!-- For coherency purposes, these versions should be gated by the versions of winforms and wpf routed via windowsdesktop -->
<Dependency Name="Microsoft.Dotnet.WinForms.ProjectTemplates" Version="6.0.32-servicing.24314.5" CoherentParentDependency="Microsoft.WindowsDesktop.App.Runtime.win-x64">
@ -121,44 +121,44 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-wpf</Uri>
<Sha>798cc6d4922db482f84fb72a8244f0da898bc5d6</Sha>
</Dependency>
<Dependency Name="Microsoft.FSharp.Compiler" Version="12.0.0-beta.21522.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Dependency Name="Microsoft.FSharp.Compiler" Version="12.0.5-beta.22513.8" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/fsharp</Uri>
<Sha>6d626ff0752a77d339f609b4d361787dc9ca93a5</Sha>
<Sha>5d69143fbe992d8fa33d5b83d5fdd5f4ed7bb4fc</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.fsharp" Version="6.0.1-beta.21522.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Dependency Name="Microsoft.SourceBuild.Intermediate.fsharp" Version="6.0.7-beta.22513.8" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/fsharp</Uri>
<Sha>6d626ff0752a77d339f609b4d361787dc9ca93a5</Sha>
<Sha>5d69143fbe992d8fa33d5b83d5fdd5f4ed7bb4fc</Sha>
<SourceBuild RepoName="fsharp" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.Test.Sdk" Version="17.0.3-release-20230412-05" CoherentParentDependency="Microsoft.NET.Sdk">
<Dependency Name="Microsoft.NET.Test.Sdk" Version="17.3.3-release-20230405-02" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/microsoft/vstest</Uri>
<Sha>cc7fb0593127e24f55ce016fb3ac85b5b2857fec</Sha>
<Sha>6e76d580fcc69954441344175bd1b0ab2e432026</Sha>
<SourceBuildTarball RepoName="vstest" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-1.21519.4" CoherentParentDependency="Microsoft.NET.Sdk">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.200-1.24270.5" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/linker</Uri>
<Sha>d0662ed8db919642177ddfd06a1c33895a69015f</Sha>
<Sha>e66cbcaa36aa719936a46160198c9012c6e174e4</Sha>
<SourceBuild RepoName="linker" ManagedOnly="true" />
<RepoName>linker</RepoName>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.0.1-1.22181.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.3.1-3.22526.13" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>487283bcd8d66693091f2800dcf1c8ae37cccdee</Sha>
<Sha>41a5af9d2c459a06c0795bf21a1c046200f375bf</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Build" Version="17.0.3" CoherentParentDependency="Microsoft.NET.Sdk">
<Dependency Name="Microsoft.Build" Version="17.3.4" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>d679d209277a156cdc0963c993585ffa5744dc5f</Sha>
<Sha>a400405ba8c43976eda92a70d4adf72f9d292a22</Sha>
<SourceBuildTarball RepoName="msbuild" ManagedOnly="true" />
</Dependency>
<Dependency Name="NuGet.Build.Tasks" Version="6.0.6-rc.4" CoherentParentDependency="Microsoft.NET.Sdk">
<Dependency Name="NuGet.Build.Tasks" Version="6.3.4-rc.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted</Uri>
<Sha>451e9bc27184dc49d04e975122c9e7189d525872</Sha>
<Sha>5ec7c4dd0086f968a8bc5a20d5cc77b1454469f3</Sha>
<SourceBuildTarball RepoName="nuget-client" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.ApplicationInsights" Version="2.19.0">
<Dependency Name="Microsoft.ApplicationInsights" Version="2.0.0">
<Uri>https://github.com/Microsoft/ApplicationInsights-dotnet</Uri>
<Sha>93f745cfef8541f09862aae9bc8c04554bca38c7</Sha>
<Sha>53b80940842204f78708a538628288ff5d741a1d</Sha>
</Dependency>
<!-- Temporarily pinning Microsoft.Web.Xdt until strict coherency is enabled by default -->
<Dependency Name="Microsoft.Web.Xdt" Version="5.0.0-preview.21431.1" CoherentParentDependency="Microsoft.NET.Sdk" Pinned="true">
@ -166,13 +166,13 @@
<Sha>698fdad58fa64a55f16cd9562c90224cc498ed02</Sha>
<SourceBuildTarball RepoName="xdt" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Manifest-6.0.100" Version="6.0.32" CoherentParentDependency="VS.Redist.Common.NetCore.SharedFramework.x64.6.0">
<Dependency Name="Microsoft.NET.Workload.Emscripten.Manifest-6.0.400" Version="6.0.32" CoherentParentDependency="VS.Redist.Common.NetCore.SharedFramework.x64.6.0">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>8601068126449af799f8e07ca358dbbd4b3fcab4</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build" Version="6.0.0-servicing.22419.2">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build" Version="0.1.0-alpha.1.21519.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/source-build</Uri>
<Sha>7649ca7106e7e91ac06f169626bf01a77c2258eb</Sha>
<Sha>10d0f7e94aa45889155c312f51cfc01bf326b853</Sha>
<SourceBuild RepoName="source-build" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Cli.CommandLine" Version="1.0.0-preview.21310.2">

View file

@ -7,8 +7,8 @@
<PropertyGroup>
<VersionMajor>6</VersionMajor>
<VersionMinor>0</VersionMinor>
<VersionSDKMinor>1</VersionSDKMinor>
<VersionFeature>33</VersionFeature>
<VersionSDKMinor>4</VersionSDKMinor>
<VersionFeature>25</VersionFeature>
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature)</VersionPrefix>
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
<MajorMinorVersion>$(VersionMajor).$(VersionMinor)</MajorMinorVersion>
@ -31,11 +31,11 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/templating -->
<MicrosoftDotNetCommonItemTemplatesPackageVersion>6.0.132</MicrosoftDotNetCommonItemTemplatesPackageVersion>
<MicrosoftDotNetCommonItemTemplatesPackageVersion>6.0.424</MicrosoftDotNetCommonItemTemplatesPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/test-templates -->
<MicrosoftDotNetTestProjectTemplates60PackageVersion>1.0.2-beta4.22064.3</MicrosoftDotNetTestProjectTemplates60PackageVersion>
<MicrosoftDotNetTestProjectTemplates60PackageVersion>1.0.2-beta4.22207.1</MicrosoftDotNetTestProjectTemplates60PackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- NUnit3.DotNetNew.Template versions do not 'flow in' -->
@ -55,8 +55,8 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/sdk -->
<MicrosoftNETSdkPackageVersion>6.0.132-servicing.24315.1</MicrosoftNETSdkPackageVersion>
<MicrosoftDotNetMSBuildSdkResolverPackageVersion>6.0.132-servicing.24315.1</MicrosoftDotNetMSBuildSdkResolverPackageVersion>
<MicrosoftNETSdkPackageVersion>6.0.424-servicing.24315.2</MicrosoftNETSdkPackageVersion>
<MicrosoftDotNetMSBuildSdkResolverPackageVersion>6.0.424-servicing.24315.2</MicrosoftDotNetMSBuildSdkResolverPackageVersion>
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
<MicrosoftDotnetToolsetInternalPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftDotnetToolsetInternalPackageVersion>
<MicrosoftDotnetTemplateLocatorPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftDotnetTemplateLocatorPackageVersion>
@ -92,12 +92,12 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/NuGet/NuGet.Client -->
<NuGetBuildTasksPackageVersion>6.0.6-rc.4</NuGetBuildTasksPackageVersion>
<NuGetBuildTasksPackageVersion>6.3.4-rc.2</NuGetBuildTasksPackageVersion>
<NuGetVersioningPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetVersioningPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/msbuild -->
<MicrosoftBuildPackageVersion>17.0.3</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageVersion>17.3.4</MicrosoftBuildPackageVersion>
</PropertyGroup>
<PropertyGroup>
<HostFxrVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</HostFxrVersion>
@ -115,14 +115,14 @@
<MicrosoftDotNetWpfProjectTemplates60PackageVersion>$(MicrosoftDotNetWpfProjectTemplatesPackageVersion)</MicrosoftDotNetWpfProjectTemplates60PackageVersion>
<NUnit3Templates60PackageVersion>$(NUnit3DotNetNewTemplatePackageVersion)</NUnit3Templates60PackageVersion>
<MicrosoftDotNetCommonItemTemplates60PackageVersion>$(MicrosoftDotNetCommonItemTemplatesPackageVersion)</MicrosoftDotNetCommonItemTemplates60PackageVersion>
<MicrosoftDotNetCommonProjectTemplates60PackageVersion>6.0.132</MicrosoftDotNetCommonProjectTemplates60PackageVersion>
<MicrosoftDotNetCommonProjectTemplates60PackageVersion>6.0.424</MicrosoftDotNetCommonProjectTemplates60PackageVersion>
<AspNetCorePackageVersionFor60Templates>$(MicrosoftAspNetCoreAppRuntimePackageVersion)</AspNetCorePackageVersionFor60Templates>
</PropertyGroup>
<!-- infrastructure and test only dependencies -->
<PropertyGroup>
<VersionToolsVersion>2.2.0-beta.19072.10</VersionToolsVersion>
<DotnetDebToolVersion>2.0.0</DotnetDebToolVersion>
<MicrosoftNETTestSdkVersion>17.0.3-release-20230412-05</MicrosoftNETTestSdkVersion>
<MicrosoftNETTestSdkVersion>17.3.3-release-20230405-02</MicrosoftNETTestSdkVersion>
</PropertyGroup>
<!-- dependencies for source-build tarball -->
<PropertyGroup>
@ -148,15 +148,15 @@
</PropertyGroup>
<!-- Workload manifest package versions -->
<PropertyGroup>
<MauiWorkloadManifestVersion>6.0.101-preview.9.1805</MauiWorkloadManifestVersion>
<XamarinAndroidWorkloadManifestVersion>31.0.101-preview.9.16</XamarinAndroidWorkloadManifestVersion>
<XamarinIOSWorkloadManifestVersion>15.0.101-preview.9.31</XamarinIOSWorkloadManifestVersion>
<XamarinMacCatalystWorkloadManifestVersion>15.0.101-preview.9.31</XamarinMacCatalystWorkloadManifestVersion>
<XamarinMacOSWorkloadManifestVersion>12.0.101-preview.9.31</XamarinMacOSWorkloadManifestVersion>
<XamarinTvOSWorkloadManifestVersion>15.0.101-preview.9.31</XamarinTvOSWorkloadManifestVersion>
<MonoWorkloadManifestVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MonoWorkloadManifestVersion>
<MicrosoftNETWorkloadEmscriptenManifest60100Version>6.0.32</MicrosoftNETWorkloadEmscriptenManifest60100Version>
<EmscriptenWorkloadManifestVersion>$(MicrosoftNETWorkloadEmscriptenManifest60100Version)</EmscriptenWorkloadManifestVersion>
<MauiWorkloadManifestVersion>6.0.312</MauiWorkloadManifestVersion>
<XamarinAndroidWorkloadManifestVersion>32.0.301</XamarinAndroidWorkloadManifestVersion>
<XamarinIOSWorkloadManifestVersion>15.4.303</XamarinIOSWorkloadManifestVersion>
<XamarinMacCatalystWorkloadManifestVersion>15.4.303</XamarinMacCatalystWorkloadManifestVersion>
<XamarinMacOSWorkloadManifestVersion>12.3.303</XamarinMacOSWorkloadManifestVersion>
<XamarinTvOSWorkloadManifestVersion>15.4.303</XamarinTvOSWorkloadManifestVersion>
<MonoWorkloadManifestVersion>6.0.5</MonoWorkloadManifestVersion>
<MicrosoftNETWorkloadEmscriptenManifest60400Version>6.0.32</MicrosoftNETWorkloadEmscriptenManifest60400Version>
<EmscriptenWorkloadManifestVersion>$(MicrosoftNETWorkloadEmscriptenManifest60400Version)</EmscriptenWorkloadManifestVersion>
</PropertyGroup>
<PropertyGroup>
<!-- pinned dependency. This package is not being produced outside of the 2.0 branch of corefx and should not change. -->

View file

@ -4,7 +4,7 @@
#
# Dockerfile that creates a container suitable to build dotnet-cli
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-20210714125444-ae5be29
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-20220610131707-f0ea7ba
RUN apk update && apk upgrade && apk add --no-cache curl ncurses

View file

@ -11,6 +11,11 @@ resources:
- main
- release/*
- internal/release/*
exclude:
- release/6.0.3xx
- internal/release/6.0.3xx
- release/6.0.4xx
- internal/release/6.0.4xx
stages:
- build
repositories:

View file

@ -14,6 +14,7 @@
<PackageReference Include="Microsoft.DotNet.MSBuildSdkResolver" Version="$(MicrosoftDotNetMSBuildSdkResolverPackageVersion)" ExcludeAssets="all" GeneratePathProperty="true"/>
<PackageReference Include="runtime.win-x86.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" ExcludeAssets="all" GeneratePathProperty="true" />
<PackageReference Include="runtime.win-x64.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" ExcludeAssets="all" GeneratePathProperty="true" />
<PackageReference Include="runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" ExcludeAssets="all" GeneratePathProperty="true" />
</ItemGroup>
<Target
@ -29,6 +30,7 @@
<ItemGroup>
<_SdkResolverSrc Include="$(Pkgruntime_win-x86_Microsoft_NETCore_DotNetHostResolver)\runtimes\win-x86\native\hostfxr.dll" Arch="x86\" />
<_SdkResolverSrc Include="$(Pkgruntime_win-x64_Microsoft_NETCore_DotNetHostResolver)\runtimes\win-x64\native\hostfxr.dll" Arch="x64\" />
<_SdkResolverSrc Include="$(Pkgruntime_win-arm64_Microsoft_NETCore_DotNetHostResolver)\runtimes\win-arm64\native\hostfxr.dll" Arch="arm64\" />
<_SdkResolverSrc Include="$(PkgMicrosoft_DotNet_MSBuildSdkResolver)\lib\net472\**\*.dll" Arch="" />
<_SdkResolverDst Include="@(_SdkResolverSrc->'$(OutputPath)%(Arch)%(RecursiveDir)%(Filename)%(Extension)')" />
</ItemGroup>

View file

@ -48,14 +48,14 @@ jobs:
_ExcludeOmniSharpTests: true
_OverrideDistroDisablingSha1: false
_RunOnline: true
CentOS7-Offline:
_BootstrapPrep: false
_Container: ${{ parameters.centOS7Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: true
_OverrideDistroDisablingSha1: false
_RunOnline: false
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
CentOS7-Offline:
_BootstrapPrep: false
_Container: ${{ parameters.centOS7Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: true
_OverrideDistroDisablingSha1: false
_RunOnline: false
CentOSStream9-Offline:
_BootstrapPrep: false
_Container: ${{ parameters.centOSStream9Container }}

View file

@ -54,14 +54,14 @@ jobs:
_ExcludeOmniSharpTests: true
_OverrideDistroDisablingSha1: false
_RunOnline: true
CentOS7-Offline:
_BootstrapPrep: false
_Container: ${{ parameters.centOS7Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: true
_OverrideDistroDisablingSha1: false
_RunOnline: false
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
CentOS7-Offline:
_BootstrapPrep: false
_Container: ${{ parameters.centOS7Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: true
_OverrideDistroDisablingSha1: false
_RunOnline: false
CentOSStream9-Offline:
_BootstrapPrep: false
_Container: ${{ parameters.centOSStream9Container }}

View file

@ -11,14 +11,14 @@
should be added to source-build-reference-packages.
-->
<ItemGroup>
<PackageDownload Include="Microsoft.NET.Sdk.Android.Manifest-6.0.100" Version="[$(XamarinAndroidWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.iOS.Manifest-6.0.100" Version="[$(XamarinIOSWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.100" Version="[$(XamarinMacCatalystWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.macOS.Manifest-6.0.100" Version="[$(XamarinMacOSWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.Maui.Manifest-6.0.100" Version="[$(MauiWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.tvOS.Manifest-6.0.100" Version="[$(XamarinTvOSWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Workload.Emscripten.Manifest-6.0.100" Version="[$(EmscriptenWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100" Version="[$(MonoWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.Android.Manifest-6.0.300" Version="[$(XamarinAndroidWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.iOS.Manifest-6.0.300" Version="[$(XamarinIOSWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.300" Version="[$(XamarinMacCatalystWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.macOS.Manifest-6.0.300" Version="[$(XamarinMacOSWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.Maui.Manifest-6.0.300" Version="[$(MauiWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.tvOS.Manifest-6.0.300" Version="[$(XamarinTvOSWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Workload.Emscripten.Manifest-6.0.300" Version="[$(EmscriptenWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.300" Version="[$(MonoWorkloadManifestVersion)]" />
</ItemGroup>
<!--
@ -39,4 +39,4 @@
File="$(TargetPackagesPath)/TextOnlyPackageDirectories.txt"
Overwrite="true" />
</Target>
</Project>
</Project>

View file

@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "6.0.131"
"dotnet": "6.0.200"
},
"msbuild-sdks": {
"Microsoft.Build.CentralPackageVersions": "2.0.1",

View file

@ -11,6 +11,7 @@
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="RemoveInternetSourcesFromNuGetConfig" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceFeedsInNuGetConfig" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="UpdateJson" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="UpdateNuGetConfigPackageSourcesMappings" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ValidateUsageAgainstBaseline" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="WriteBuildOutputProps" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="WritePackageUsageData" />
@ -176,6 +177,19 @@
Condition="'$(NuGetConfigFile)' != '' OR '@(NuGetConfigFiles)' != ''"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(RepoCompletedSemaphorePath)UpdateNuGetConfig.complete">
<PropertyGroup>
<PrebuiltNuGetSourceName>prebuilt</PrebuiltNuGetSourceName>
<PreviouslySourceBuiltNuGetSourceName>previously-source-built</PreviouslySourceBuiltNuGetSourceName>
<ReferencePackagesNuGetSourceName>reference-packages</ReferencePackagesNuGetSourceName>
<SourceBuiltNuGetSourceName>source-built</SourceBuiltNuGetSourceName>
<ExtraSourcesNuGetSourceName>ExtraSources</ExtraSourcesNuGetSourceName>
<DotNet5InternalTransportNuGetSourceName>dotnet5-internal-transport</DotNet5InternalTransportNuGetSourceName>
<SourceBuildSources>$(PrebuiltNuGetSourceName);$(PreviouslySourceBuiltNuGetSourceName);$(ReferencePackagesNuGetSourceName);$(SourceBuiltNuGetSourceName)</SourceBuildSources>
<SourceBuildSources Condition="'$(ExtraRestoreSourcePath)' != ''">$(SourceBuildSources);$(ExtraSourcesNuGetSourceName)</SourceBuildSources>
<SourceBuildSources Condition="'$(VSS_NUGET_EXTERNAL_FEED_ENDPOINTS)' != '' and '$(SetUpInternalTransportFeed)' == 'true'">$(SourceBuildSources);$(DotNet5InternalTransportNuGetSourceName)</SourceBuildSources>
</PropertyGroup>
<!-- Update the detected or manually specified NuGetConfigFile, but also allow multiple. -->
<ItemGroup>
<NuGetConfigFiles Include="$(NuGetConfigFile)" />
@ -187,26 +201,26 @@
KeepFeedPrefixes="@(KeepFeedPrefixes)" />
<AddSourceToNuGetConfig NuGetConfigFile="%(NuGetConfigFiles.Identity)"
SourceName="prebuilt"
SourceName="$(PrebuiltNuGetSourceName)"
SourcePath="$(PrebuiltPackagesPath)"
/>
<AddSourceToNuGetConfig NuGetConfigFile="%(NuGetConfigFiles.Identity)"
SourceName="previously-source-built"
SourceName="$(PreviouslySourceBuiltNuGetSourceName)"
SourcePath="$(PrebuiltSourceBuiltPackagesPath)"
/>
<AddSourceToNuGetConfig NuGetConfigFile="%(NuGetConfigFiles.Identity)"
SourceName="reference-packages"
SourceName="$(ReferencePackagesNuGetSourceName)"
SourcePath="$(ReferencePackagesDir)"
/>
<AddSourceToNuGetConfig NuGetConfigFile="%(NuGetConfigFiles.Identity)"
SourceName="source-built"
SourceName="$(SourceBuiltNuGetSourceName)"
SourcePath="$(SourceBuiltPackagesPath)" />
<AddSourceToNuGetConfig NuGetConfigFile="%(NuGetConfigFiles.Identity)"
SourceName="ExtraSources"
SourceName="$(ExtraSourcesNuGetSourceName)"
SourcePath="$(ExtraRestoreSourcePath)"
Condition="'$(ExtraRestoreSourcePath)' != ''" />
@ -219,9 +233,14 @@
'$(VSS_NUGET_EXTERNAL_FEED_ENDPOINTS)' != '' and
'$(SetUpInternalTransportFeed)' == 'true'"
NuGetConfigFile="%(NuGetConfigFiles.Identity)"
SourceName="dotnet5-internal-transport"
SourceName="$(DotNet5InternalTransportNuGetSourceName)"
SourcePath="https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v3/index.json" />
<UpdateNuGetConfigPackageSourcesMappings
NuGetConfigFile="%(NuGetConfigFiles.Identity)"
BuildWithOnlineSources="$(BuildWithOnlineSources)"
SourceBuildSources="$(SourceBuildSources)" />
<!-- Update NuGet.Config files that have deprecated myget feeds -->
<ItemGroup>
<LegacyFeedMapping

View file

@ -35,6 +35,7 @@
<RepositoryReference Include="clicommandlineparser" />
<RepositoryReference Include="command-line-api" />
<RepositoryReference Include="diagnostics" />
<RepositoryReference Include="razor-compiler" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="source-build" />
<RepositoryReference Include="symreader" />

View file

@ -0,0 +1,21 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<BuildCommand>$(StandardSourceBuildCommand) $(StandardSourceBuildArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
</PropertyGroup>
<ItemGroup>
<RepositoryReference Include="arcade" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -39,6 +39,7 @@
<RepositoryReference Include="fsharp" />
<RepositoryReference Include="format" />
<RepositoryReference Include="deployment-tools" />
<RepositoryReference Include="razor-compiler" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

View file

@ -0,0 +1,91 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
namespace Microsoft.DotNet.Build.Tasks
{
/*
* This task updates the package source mappings in the NuGet.Config.
* If package source mappings are used, source-build packages sources will be added with the cumulative package patterns
* for all of the existing package sources. When building offline, the existing package source mappings will be removed;
* otherwise they will be preserved after the source-build sources.
*/
public class UpdateNuGetConfigPackageSourcesMappings : Task
{
[Required]
public string NuGetConfigFile { get; set; }
/// <summary>
/// Whether to work in offline mode (remove all internet sources) or online mode (remove only authenticated sources)
/// </summary>
public bool BuildWithOnlineSources { get; set; }
/// <summary>
/// A list of all source-build specific NuGet sources.
/// </summary>
public string[] SourceBuildSources { get; set; }
public override bool Execute()
{
string xml = File.ReadAllText(NuGetConfigFile);
string newLineChars = FileUtilities.DetectNewLineChars(xml);
XDocument document = XDocument.Parse(xml);
XElement pkgSrcMappingElement = document.Root.Descendants().FirstOrDefault(e => e.Name == "packageSourceMapping");
if (pkgSrcMappingElement == null)
{
return true;
}
// Union all package sources to get the distinct list. These will get added to the source-build sources.
IEnumerable<string> packagePatterns = pkgSrcMappingElement.Descendants()
.Where(e => e.Name == "packageSource")
.SelectMany(e => e.Descendants().Where(e => e.Name == "package"))
.Select(e => e.Attribute("pattern").Value)
.Distinct();
if (!BuildWithOnlineSources)
{
// When building offline remove all packageSourceMappings.
pkgSrcMappingElement?.ReplaceNodes(new XElement("clear"));
}
XElement pkgSrcMappingClearElement = pkgSrcMappingElement.Descendants().FirstOrDefault(e => e.Name == "clear");
foreach (string packageSource in SourceBuildSources)
{
XElement pkgSrc = new XElement("packageSource", new XAttribute("key", packageSource));
foreach (string packagePattern in packagePatterns)
{
pkgSrc.Add(new XElement("package", new XAttribute("pattern", packagePattern)));
}
if (pkgSrcMappingClearElement != null)
{
pkgSrcMappingClearElement.AddAfterSelf(pkgSrc);
}
else
{
pkgSrcMappingElement.AddFirst(pkgSrc);
pkgSrcMappingElement.AddFirst(new XElement("clear"));
}
}
using (var writer = XmlWriter.Create(NuGetConfigFile, new XmlWriterSettings { NewLineChars = newLineChars, Indent = true }))
{
document.Save(writer);
}
return true;
}
}
}

View file

@ -0,0 +1,43 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MichaelSimons <msimons@microsoft.com>
Date: Mon, 6 Dec 2021 18:39:25 +0000
Subject: [PATCH] WebHost delegate nullability
Addresses the following errors:
src/Hosting/Hosting/src/Internal/WebHost.cs(83,56): error CS8621: Nullability of reference types in return type of 'lambda expression' doesn't match the target delegate 'Func<IServiceProvider, IHostApplicationLifetime?>' (possibly because of nullability attributes).
src/Hosting/Hosting/src/Internal/WebHost.cs(86,56): error CS8621: Nullability of reference types in return type of 'lambda expression' doesn't match the target delegate 'Func<IServiceProvider, IApplicationLifetime?>' (possibly because of nullability attributes).
src/Hosting/Hosting/src/Internal/WebHost.cs(88,56): error CS8621: Nullability of reference types in return type of 'lambda expression' doesn't match the target delegate 'Func<IServiceProvider, IApplicationLifetime?>' (possibly because of nullability attributes).
Cherry-pick of WebHost only changes made under https://github.com/dotnet/aspnetcore/commit/13a460820e90c8f3e90eb4fdbbb3de671389bf0c#diff-6ef451f2ae3e04d73dde362bdf9de6b101aef95e3a4f5190e5c96967d683aef9
---
src/Hosting/Hosting/src/Internal/WebHost.cs | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/Hosting/Hosting/src/Internal/WebHost.cs b/src/Hosting/Hosting/src/Internal/WebHost.cs
index ca52bd1f40..643d03e8af 100644
--- a/src/Hosting/Hosting/src/Internal/WebHost.cs
+++ b/src/Hosting/Hosting/src/Internal/WebHost.cs
@@ -79,16 +79,14 @@ namespace Microsoft.AspNetCore.Hosting
_hostingServiceProvider = hostingServiceProvider;
_applicationServiceCollection.AddSingleton<ApplicationLifetime>();
// There's no way to to register multiple service types per definition. See https://github.com/aspnet/DependencyInjection/issues/360
-#pragma warning disable CS8634 // The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'class' constraint.
- _applicationServiceCollection.AddSingleton(services
- => services.GetService<ApplicationLifetime>()! as IHostApplicationLifetime);
+ _applicationServiceCollection.AddSingleton<IHostApplicationLifetime>(services
+ => services.GetService<ApplicationLifetime>()!);
#pragma warning disable CS0618 // Type or member is obsolete
- _applicationServiceCollection.AddSingleton(services
- => services.GetService<ApplicationLifetime>()! as AspNetCore.Hosting.IApplicationLifetime);
- _applicationServiceCollection.AddSingleton(services
- => services.GetService<ApplicationLifetime>()! as Extensions.Hosting.IApplicationLifetime);
+ _applicationServiceCollection.AddSingleton<AspNetCore.Hosting.IApplicationLifetime>(services
+ => services.GetService<ApplicationLifetime>()!);
+ _applicationServiceCollection.AddSingleton<Extensions.Hosting.IApplicationLifetime>(services
+ => services.GetService<ApplicationLifetime>()!);
#pragma warning restore CS0618 // Type or member is obsolete
-#pragma warning restore CS8634 // The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'class' constraint.
_applicationServiceCollection.AddSingleton<HostedServiceExecutor>();
}

View file

@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Wed, 22 Jun 2022 05:50:57 -0500
Subject: [PATCH] Enable work-tree and unsafe-paths to be able to apply in the
checked-in tarball.
---
eng/SourceBuild.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index 6cc8501..a862003 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -15,7 +15,7 @@
</ItemGroup>
<Exec
- Command="git apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
+ Command="git --work-tree=$(RepoRoot) apply --ignore-whitespace --whitespace=nowarn --unsafe-paths &quot;%(SourceBuildPatchFile.FullPath)&quot;"
WorkingDirectory="$(RepoRoot)"
Condition="'@(SourceBuildPatchFile)' != ''" />
</Target>

View file

@ -1,68 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Davis Goodin <dagood@microsoft.com>
Date: Fri, 22 Oct 2021 13:26:33 -0500
Subject: [PATCH] Fix MicrosoftExtensionsVersion
Move it to eng/Versions.props to make it overridable, and rename it to match an
actual package ID.
Update paramater nullability in src/Logging/SimpleConsoleLogger.cs to be
source-compatible with the 6.0 version of these packages.
See https://github.com/dotnet/format/issues/1400
---
Directory.Packages.props | 7 +++----
eng/Versions.props | 1 +
src/Logging/SimpleConsoleLogger.cs | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 6b628c2..9b579ea 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -2,7 +2,6 @@
<!-- <Import Project="eng\Versions.props" /> -->
<PropertyGroup>
- <MicrosoftExtensionsVersion>5.0.0</MicrosoftExtensionsVersion>
<!-- In order tests against the same version of NuGet as the SDK. We have to set this to match. -->
<NuGetVersion>6.0.0-preview.4.221</NuGetVersion>
</PropertyGroup>
@@ -25,9 +24,9 @@
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="$(MicrosoftNETCoreCompilersPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="$(MicrosoftNETCoreCompilersPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis" Version="$(MicrosoftNETCoreCompilersPackageVersion)" />
- <PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsVersion)" />
- <PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(MicrosoftExtensionsVersion)" />
- <PackageVersion Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsVersion)" />
+ <PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionVersion)" />
+ <PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(MicrosoftExtensionsFileSystemGlobbingVersion)" />
+ <PackageVersion Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingVersion)" />
<PackageVersion Include="NuGet.Common" Version="$(NuGetVersion)" />
<PackageVersion Include="NuGet.Configuration" Version="$(NuGetVersion)" />
<PackageVersion Include="NuGet.Frameworks" Version="$(NuGetVersion)" />
diff --git a/eng/Versions.props b/eng/Versions.props
index b1990aa..f6ddbbd 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -15,6 +15,7 @@
<PropertyGroup>
<MicrosoftBuildVersion>16.11.0</MicrosoftBuildVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>3.3.2</MicrosoftCodeAnalysisAnalyzersVersion>
+ <MicrosoftExtensionsDependencyInjectionVersion>5.0.0</MicrosoftExtensionsDependencyInjectionVersion>
<!-- Dependencies from https://github.com/dotnet/roslyn -->
<MicrosoftNETCoreCompilersPackageVersion>4.0.0-6.21526.21</MicrosoftNETCoreCompilersPackageVersion>
<!-- Dependencies from https://github.com/dotnet/command-line-api -->
diff --git a/src/Logging/SimpleConsoleLogger.cs b/src/Logging/SimpleConsoleLogger.cs
index c361f84..fd8015c 100644
--- a/src/Logging/SimpleConsoleLogger.cs
+++ b/src/Logging/SimpleConsoleLogger.cs
@@ -37,7 +37,7 @@ namespace Microsoft.CodeAnalysis.Tools.Logging
_minimalErrorLevel = minimalErrorLevel;
}
- public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
+ public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
{
if (!IsEnabled(logLevel))
{

View file

@ -1,73 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nikola Milosavljevic <nikolam@microsoft.com>
Date: Mon, 26 Jun 2023 23:46:46 +0000
Subject: [PATCH] Add explicit System.Text.Json dependency
Adding an excplicit System.Text.Json dependency to prevent transitive dependency to be picked up
from PSB, via Microsoft.Build package.
Backport: https://github.com/dotnet/format/pull/1887
---
Directory.Packages.props | 1 +
eng/Version.Details.xml | 4 ++++
eng/Versions.props | 2 ++
src/dotnet-format.csproj | 6 ++++++
4 files changed, 13 insertions(+)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 6b628c22..c9f86593 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -36,5 +36,6 @@
<PackageVersion Include="NuGet.Versioning" Version="$(NuGetVersion)" />
<PackageVersion Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />
<PackageVersion Include="System.CommandLine.Rendering" Version="$(SystemCommandLineRenderingVersion)" />
+ <PackageVersion Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index cdfa5f5e..86f02b44 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -13,6 +13,10 @@
<Uri>https://github.com/dotnet/command-line-api</Uri>
<Sha>82273cb56c83b589e8e5b63da0ac9745ffc6e105</Sha>
</Dependency>
+ <Dependency Name="System.Text.Json" Version="6.0.8">
+ <Uri>https://github.com/dotnet/runtime</Uri>
+ <Sha>3241df7f2b0f3e2dada8d07229723c79fdbe4991</Sha>
+ </Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.21524.1">
diff --git a/eng/Versions.props b/eng/Versions.props
index 27582078..bccaf176 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -20,6 +20,8 @@
<!-- Dependencies from https://github.com/dotnet/command-line-api -->
<SystemCommandLineVersion>2.0.0-beta1.21473.1</SystemCommandLineVersion>
<SystemCommandLineRenderingVersion>0.3.0-alpha.21473.1</SystemCommandLineRenderingVersion>
+ <!-- Dependencies from https://github.com/dotnet/runtime -->
+ <SystemTextJsonVersion>6.0.8</SystemTextJsonVersion>
</PropertyGroup>
<!--
Other Dependency versions
diff --git a/src/dotnet-format.csproj b/src/dotnet-format.csproj
index 5f691e6e..d812f06b 100644
--- a/src/dotnet-format.csproj
+++ b/src/dotnet-format.csproj
@@ -54,6 +54,12 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
<PackageReference Include="Microsoft.Extensions.Logging" />
+
+ <!--
+ Explicit System.Text.Json package reference is required for source-build to pick up the live package.
+ Avoids picking up an old version via transitive dependency from Microsoft.Build or Microsoft.CodeAnalysis.Workspaces.MSBuild.
+ -->
+ <PackageReference Include="System.Text.Json" Condition=" '$(DotnetBuildFromSource)' == 'true'" />
</ItemGroup>
<ItemGroup>

View file

@ -1,167 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Davis Goodin <dagood@microsoft.com>
Date: Tue, 19 Oct 2021 16:11:51 -0500
Subject: [PATCH] Disable apphost on downlevel frameworks during source-build
During source-build, disable apphost build for 'fsi' and 'fsc', and
'fsyacc', 'fslex', and 'AssemblyCheck' during the bootstrap build.
Creating an apphost for a net5.0 project while building with a net6.0
SDK downloads the apphost pack as a prebuilt. Stopping the projects from
creating the apphost removes the prebuilt for source-build.
To make disabling the apphost work in the bootstrapping build, add a
check to eng/build.sh to skip the bootstrap build if we're currently
running the "outer" source-build. That gives source-build the ability to
run bootstrapping on its own terms. Now, when eng/SourceBuild.props runs
bootstrapping, it can pass the DotNetBuildFromSource property through
the environment so it takes effect.
See: https://github.com/dotnet/fsharp/issues/12282
PR: https://github.com/dotnet/fsharp/pull/12286
---
eng/SourceBuild.props | 2 +-
eng/build.sh | 51 ++++++++++---------
.../AssemblyCheck/AssemblyCheck.fsproj | 1 +
src/buildtools/fslex/fslex.fsproj | 1 +
src/buildtools/fsyacc/fsyacc.fsproj | 1 +
src/fsharp/fsc/fsc.fsproj | 1 +
src/fsharp/fsi/fsi.fsproj | 1 +
7 files changed, 34 insertions(+), 24 deletions(-)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index 22c929f28..903ee00d3 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -41,7 +41,7 @@
<Exec
Command="./build.sh --bootstrap --skipBuild"
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
- EnvironmentVariables="@(InnerBuildEnv)" />
+ EnvironmentVariables="@(InnerBuildEnv);DotNetBuildFromSource=true" />
</Target>
</Project>
diff --git a/eng/build.sh b/eng/build.sh
index 9a2aa0083..6af422237 100755
--- a/eng/build.sh
+++ b/eng/build.sh
@@ -240,29 +240,34 @@ function BuildSolution {
node_reuse=false
# build bootstrap tools
- bootstrap_config=Proto
- bootstrap_dir=$artifacts_dir/Bootstrap
- if [[ "$force_bootstrap" == true ]]; then
- rm -fr $bootstrap_dir
- fi
- if [ ! -f "$bootstrap_dir/fslex.dll" ]; then
- BuildMessage="Error building tools"
- MSBuild "$repo_root/src/buildtools/buildtools.proj" \
- /restore \
- /p:Configuration=$bootstrap_config
-
- mkdir -p "$bootstrap_dir"
- cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/net5.0 $bootstrap_dir/fslex
- cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/net5.0 $bootstrap_dir/fsyacc
- fi
- if [ ! -f "$bootstrap_dir/fsc.exe" ]; then
- BuildMessage="Error building bootstrap"
- MSBuild "$repo_root/proto.proj" \
- /restore \
- /p:Configuration=$bootstrap_config \
-
-
- cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/net5.0 $bootstrap_dir/fsc
+ # source_build=true means we are currently in the outer/wrapper source-build,
+ # and building bootstrap needs to wait. The source-build targets will run this
+ # script again without setting source_build=true when it is done setting up
+ # the build environment. See 'eng/SourceBuild.props'.
+ if [[ "$source_build" != true ]]; then
+ bootstrap_config=Proto
+ bootstrap_dir=$artifacts_dir/Bootstrap
+ if [[ "$force_bootstrap" == true ]]; then
+ rm -fr $bootstrap_dir
+ fi
+ if [ ! -f "$bootstrap_dir/fslex.dll" ]; then
+ BuildMessage="Error building tools"
+ MSBuild "$repo_root/src/buildtools/buildtools.proj" \
+ /restore \
+ /p:Configuration=$bootstrap_config
+
+ mkdir -p "$bootstrap_dir"
+ cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/net5.0 $bootstrap_dir/fslex
+ cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/net5.0 $bootstrap_dir/fsyacc
+ fi
+ if [ ! -f "$bootstrap_dir/fsc.exe" ]; then
+ BuildMessage="Error building bootstrap"
+ MSBuild "$repo_root/proto.proj" \
+ /restore \
+ /p:Configuration=$bootstrap_config
+
+ cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/net5.0 $bootstrap_dir/fsc
+ fi
fi
if [[ "$skip_build" != true ]]; then
diff --git a/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj b/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj
index 464b6ef78..5c78bbe6d 100644
--- a/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj
+++ b/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj
@@ -4,6 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<ItemGroup>
diff --git a/src/buildtools/fslex/fslex.fsproj b/src/buildtools/fslex/fslex.fsproj
index 1959ce59c..3d63bf6bf 100644
--- a/src/buildtools/fslex/fslex.fsproj
+++ b/src/buildtools/fslex/fslex.fsproj
@@ -5,6 +5,7 @@
<TargetFramework>net5.0</TargetFramework>
<DefineConstants>INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants)</DefineConstants>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<ItemGroup>
diff --git a/src/buildtools/fsyacc/fsyacc.fsproj b/src/buildtools/fsyacc/fsyacc.fsproj
index 5d1b7141f..63b63c5de 100644
--- a/src/buildtools/fsyacc/fsyacc.fsproj
+++ b/src/buildtools/fsyacc/fsyacc.fsproj
@@ -5,6 +5,7 @@
<TargetFramework>net5.0</TargetFramework>
<DefineConstants>INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants)</DefineConstants>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<ItemGroup>
diff --git a/src/fsharp/fsc/fsc.fsproj b/src/fsharp/fsc/fsc.fsproj
index 7fa31fc21..04025c297 100644
--- a/src/fsharp/fsc/fsc.fsproj
+++ b/src/fsharp/fsc/fsc.fsproj
@@ -12,6 +12,7 @@
<OtherFlags>$(OtherFlags) --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
<NGenBinary>true</NGenBinary>
<UseAppHost>true</UseAppHost>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
diff --git a/src/fsharp/fsi/fsi.fsproj b/src/fsharp/fsi/fsi.fsproj
index 9fd9b1333..eace6c166 100644
--- a/src/fsharp/fsi/fsi.fsproj
+++ b/src/fsharp/fsi/fsi.fsproj
@@ -13,6 +13,7 @@
<Win32Resource>fsi.res</Win32Resource>
<NGenBinary>true</NGenBinary>
<UseAppHost>true</UseAppHost>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">

View file

@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Wed, 22 Jun 2022 05:53:06 -0500
Subject: [PATCH] Enable work-tree and unsafe-paths to be able to apply in the
checked-in tarball.
---
eng/SourceBuild.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index 903ee00..4c85819 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -15,7 +15,7 @@
</ItemGroup>
<Exec
- Command="git apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
+ Command="git --work-tree=$(RepoRoot) apply --ignore-whitespace --whitespace=nowarn --unsafe-paths &quot;%(SourceBuildPatchFile.FullPath)&quot;"
WorkingDirectory="$(RepoRoot)"
Condition="'@(SourceBuildPatchFile)' != ''" />
</Target>

View file

@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Logan Bussell <36081148+lbussell@users.noreply.github.com>
Date: Wed, 13 Oct 2021 18:26:09 +0000
Subject: [PATCH] fix tlens Mono.Cecil reference
Pull request for applying the patch: https://github.com/dotnet/linker/pull/2317
---
src/tlens/tlens.csproj | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/tlens/tlens.csproj b/src/tlens/tlens.csproj
index 92b3754..e17f9fb 100644
--- a/src/tlens/tlens.csproj
+++ b/src/tlens/tlens.csproj
@@ -10,7 +10,8 @@
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Mono.Cecil" Version="$(MonoCecilVersion)" />
+ <PackageReference Condition="'$(UseCecilPackage)' == 'true'" Include="Mono.Cecil" Version="$(MonoCecilVersion)" />
+ <ProjectReference Condition="'$(UseCecilPackage)' != 'true'" Include="../../external/cecil/Mono.Cecil.csproj" />
</ItemGroup>
</Project>

View file

@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Wed, 20 Oct 2021 14:44:36 +0000
Subject: [PATCH] Exclude Microsoft.DotNet.ApiCompat from source-build
Backport PR: https://github.com/dotnet/linker/pull/2326
---
eng/Tools.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/Tools.props b/eng/Tools.props
index 494d208..7c32ad5 100644
--- a/eng/Tools.props
+++ b/eng/Tools.props
@@ -2,7 +2,7 @@
<!-- This file is an Arcade extension point that specifies additional tools to restore. -->
<ItemGroup>
- <PackageReference Include="Microsoft.DotNet.ApiCompat" Version="$(MicrosoftDotNetApiCompatVersion)" />
+ <PackageReference Include="Microsoft.DotNet.ApiCompat" Version="$(MicrosoftDotNetApiCompatVersion)" Condition=" '$(DotnetBuildFromSource)' != 'true' "/>
</ItemGroup>
</Project>
\ No newline at end of file

View file

@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Wed, 20 Oct 2021 14:38:14 +0000
Subject: [PATCH 1/2] Upgrade Microsoft.NETFramework.ReferenceAssemblies from
1.0.0 to 1.0.2
Backport PR: https://github.com/dotnet/linker/pull/2326
---
src/ILLink.Tasks/ILLink.Tasks.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ILLink.Tasks/ILLink.Tasks.csproj b/src/ILLink.Tasks/ILLink.Tasks.csproj
index 0ecf5d1..7501ecb 100644
--- a/src/ILLink.Tasks/ILLink.Tasks.csproj
+++ b/src/ILLink.Tasks/ILLink.Tasks.csproj
@@ -53,6 +53,6 @@
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" Condition=" '$(TargetFramework)' == 'net472' " PrivateAssets="All" Publish="True" />
- <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
+ <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.2" />
</ItemGroup>
</Project>

View file

@ -1,36 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Davis Goodin <dagood@microsoft.com>
Date: Mon, 11 Oct 2021 17:09:14 -0500
Subject: [PATCH] Remove prebuilt jnm2.ReferenceAssemblies.net35
This prebuilt package filled a gap in the official 1.0 version of the .NET
Framework reference assembly packages. The gap has been fixed in later versions
of the official packages. Removal fixes a prebuilt dependency by letting the
repo use the official version of the packges, which are produced by SBRP.
https://github.com/dotnet/msbuild/issues/6935
---
src/StringTools/StringTools.csproj | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/StringTools/StringTools.csproj b/src/StringTools/StringTools.csproj
index fef9909..93a4634 100644
--- a/src/StringTools/StringTools.csproj
+++ b/src/StringTools/StringTools.csproj
@@ -20,17 +20,12 @@
<PropertyGroup Condition="'$(TargetFramework)' == 'net35'">
<AssemblyName>Microsoft.NET.StringTools.net35</AssemblyName>
- <!-- Disable Fx install checks as we're building against jnm2's 3.5 reference assemblies -->
- <BypassFrameworkInstallChecks>true</BypassFrameworkInstallChecks>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net35'">
<PackageReference Include="System.Memory" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
</ItemGroup>
- <ItemGroup>
- <PackageReference Include="jnm2.ReferenceAssemblies.net35" PrivateAssets="All" />
- </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net35'">
<Compile Remove="SpanBasedStringBuilder.cs" />

View file

@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Davis Goodin <dagood@microsoft.com>
Date: Tue, 12 Oct 2021 18:14:59 -0500
Subject: [PATCH] Disable BannedApiAnalyzers during source-build
BannedApiAnalyzers has some intentional old dependencies and it's not feasible
to build it during source-build. Remove this usage to remove a prebuilt.
https://github.com/dotnet/msbuild/issues/6961
---
eng/Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/Packages.props b/eng/Packages.props
index 0f478634f..3cc09a008 100644
--- a/eng/Packages.props
+++ b/eng/Packages.props
@@ -45,11 +45,11 @@
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All"/>
+ <GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="$(MicrosoftCodeAnalysisBannedApiAnalyzersVersion)" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.15" PrivateAssets="All" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
- <GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="$(MicrosoftCodeAnalysisBannedApiAnalyzersVersion)" />
</ItemGroup>
</Project>

View file

@ -1,50 +0,0 @@
From b7f0c8d910b5fa110be7f34816c4934f61643d08 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Wed, 20 Oct 2021 15:19:29 -0500
Subject: [PATCH] Restore building all TFMs for source-build
Required for omnisharp, nuget-client, templating, sdk
Background Issue: https://github.com/dotnet/source-build/issues/2542
Patch removal issue: https://github.com/dotnet/source-build/issues/2556
---
src/Build/Microsoft.Build.csproj | 3 +--
src/Directory.Build.props | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj
index f75408633..8dc86355a 100644
--- a/src/Build/Microsoft.Build.csproj
+++ b/src/Build/Microsoft.Build.csproj
@@ -4,8 +4,7 @@
<Import Project="..\Shared\DebuggingSources.proj" />
<PropertyGroup>
- <TargetFrameworks>net6.0</TargetFrameworks>
- <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(FullFrameworkTFM);net6.0</TargetFrameworks>
+ <TargetFrameworks>$(FullFrameworkTFM);net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(MonoBuild)'=='true'">$(RuntimeOutputTargetFrameworks)</TargetFrameworks>
<RootNamespace>Microsoft.Build</RootNamespace>
<AssemblyName>Microsoft.Build</AssemblyName>
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index b0e233194..7e0c7d8c8 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -27,13 +27,12 @@
<!-- Defaults for target frameworks and architecture -->
<LibraryTargetFrameworks>$(FullFrameworkTFM);netstandard2.0</LibraryTargetFrameworks>
- <LibraryTargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netstandard2.0</LibraryTargetFrameworks>
<LibraryTargetFrameworks Condition="'$(MonoBuild)'=='true'">$(FullFrameworkTFM)</LibraryTargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<!-- Target frameworks for Exe and unit test projects (ie projects with runtime output) -->
<RuntimeOutputTargetFrameworks>net6.0</RuntimeOutputTargetFrameworks>
- <RuntimeOutputTargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(DotNetBuildFromSource)' != 'true'">$(FullFrameworkTFM);$(RuntimeOutputTargetFrameworks)</RuntimeOutputTargetFrameworks>
+ <RuntimeOutputTargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(FullFrameworkTFM);$(RuntimeOutputTargetFrameworks)</RuntimeOutputTargetFrameworks>
<RuntimeOutputTargetFrameworks Condition="'$(MonoBuild)' == 'true'">$(FullFrameworkTFM)</RuntimeOutputTargetFrameworks>
<!-- Don't automatically append target framework to output path, since we want to put the Platform Target beforehand, if it's not AnyCPU -->
--
2.31.1

View file

@ -1,104 +0,0 @@
From a75f4b17c3595079f69ea00041182368adea14c9 Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Wed, 20 Oct 2021 21:49:51 +0000
Subject: [PATCH] Remove dependency on MS.VS.Setup.Configuration.Interop
Removes prebuilts.
Background Issue: https://github.com/dotnet/source-build/issues/2542
---
eng/Packages.props | 3 ---
src/Build/Microsoft.Build.csproj | 4 +++-
src/Directory.BeforeCommon.targets | 2 +-
src/Samples/Directory.Build.props | 1 +
src/Tasks/Microsoft.Build.Tasks.csproj | 4 +++-
src/Utilities/Microsoft.Build.Utilities.csproj | 2 +-
6 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/eng/Packages.props b/eng/Packages.props
index 2de607c5d..1668addc9 100644
--- a/eng/Packages.props
+++ b/eng/Packages.props
@@ -46,9 +46,6 @@
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All"/>
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="$(MicrosoftCodeAnalysisBannedApiAnalyzersVersion)" />
- </ItemGroup>
-
- <ItemGroup>
<GlobalPackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.15" PrivateAssets="All" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
</ItemGroup>
diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj
index d08e337c5..3b173aee5 100644
--- a/src/Build/Microsoft.Build.csproj
+++ b/src/Build/Microsoft.Build.csproj
@@ -38,8 +38,10 @@
<PackageReference Include="System.Reflection.Metadata" Condition="'$(MonoBuild)' == 'true'" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Reference Include="System.IO.Compression" />
<PackageReference Include="System.Memory" />
</ItemGroup>
diff --git a/src/Directory.BeforeCommon.targets b/src/Directory.BeforeCommon.targets
index 913c97b12..320bffa56 100644
--- a/src/Directory.BeforeCommon.targets
+++ b/src/Directory.BeforeCommon.targets
@@ -99,7 +99,7 @@
<DefineConstants>$(DefineConstants);FEATURE_DEBUGGER</DefineConstants>
<DefineConstants Condition="'$(MachineIndependentBuild)' != 'true'">$(DefineConstants);FEATURE_WIN32_REGISTRY</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_WORKINGSET</DefineConstants>
- <DefineConstants Condition="'$(MonoBuild)' != 'true' and '$(MachineIndependentBuild)' != 'true' and '$(TargetFrameworkVersion)' != 'v3.5'">$(DefineConstants);FEATURE_VISUALSTUDIOSETUP</DefineConstants>
+ <DefineConstants Condition="'$(MonoBuild)' != 'true' and '$(MachineIndependentBuild)' != 'true' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(DotNetBuildFromSource)' != 'true'">$(DefineConstants);FEATURE_VISUALSTUDIOSETUP</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_MSCOREE</DefineConstants>
</PropertyGroup>
diff --git a/src/Samples/Directory.Build.props b/src/Samples/Directory.Build.props
index 6b9d6cd9f..317ef14a6 100644
--- a/src/Samples/Directory.Build.props
+++ b/src/Samples/Directory.Build.props
@@ -8,6 +8,7 @@
<EnableCentralPackageVersions>false</EnableCentralPackageVersions>
<IsShipping>false</IsShipping>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>
<!-- Import parent props -->
diff --git a/src/Tasks/Microsoft.Build.Tasks.csproj b/src/Tasks/Microsoft.Build.Tasks.csproj
index d8f81bf99..3a5514094 100644
--- a/src/Tasks/Microsoft.Build.Tasks.csproj
+++ b/src/Tasks/Microsoft.Build.Tasks.csproj
@@ -999,8 +999,10 @@
<PackageReference Include="Microsoft.Net.Compilers.Toolset" ExcludeAssets="all" Condition="'$(UsingToolMicrosoftNetCompilers)' == 'false'" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="System.Threading.Tasks.Dataflow" />
<Content Include="$(NuGetPackageRoot)microsoft.net.compilers.toolset\$(MicrosoftNetCompilersToolsetVersion)\tasks\net472\**\*" CopyToOutputDirectory="PreserveNewest" LinkBase="Roslyn" />
diff --git a/src/Utilities/Microsoft.Build.Utilities.csproj b/src/Utilities/Microsoft.Build.Utilities.csproj
index 09634e723..72d838d9d 100644
--- a/src/Utilities/Microsoft.Build.Utilities.csproj
+++ b/src/Utilities/Microsoft.Build.Utilities.csproj
@@ -25,7 +25,7 @@
<PackageReference Include="System.Configuration.ConfigurationManager" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard' and '$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
</ItemGroup>
--
2.31.1

View file

@ -1,293 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Matt Mitchell <mmitche@microsoft.com>
Date: Sat, 23 Oct 2021 16:41:24 -0700
Subject: [PATCH] Remove uneeded source build patches and re-patch
---
build/common.project.props | 16 ++++++----------
build/packages.targets | 3 ++-
.../NuGet.Build.Tasks.Pack.csproj | 4 ++--
.../NuGet.CommandLine.XPlat.csproj | 2 +-
.../SignCommand/CertificateProvider.cs | 4 ++--
src/NuGet.Core/NuGet.Common/NuGet.Common.csproj | 1 -
.../NuGet.Configuration.csproj | 3 +--
.../NuGet.Frameworks/NuGet.Frameworks.csproj | 3 +--
.../NuGet.PackageManagement.csproj | 2 +-
.../Signing/Authoring/SignPackageRequest.cs | 2 ++
.../NuGet.Packaging/Signing/Cms/NativeUtility.cs | 2 ++
.../HttpSource/HttpRequestMessageExtensions.cs | 6 +++---
.../HttpSource/HttpRetryHandler.cs | 2 +-
.../HttpSourceAuthenticationHandler.cs | 2 +-
.../NuGet.Versioning/NuGet.Versioning.csproj | 1 -
15 files changed, 25 insertions(+), 28 deletions(-)
diff --git a/build/common.project.props b/build/common.project.props
index 47b5a6b60..50c40bac5 100644
--- a/build/common.project.props
+++ b/build/common.project.props
@@ -10,24 +10,20 @@
<!-- Common -->
<PropertyGroup>
- <IsBuildOnlyXPLATProjects>$(DotNetBuildFromSource)</IsBuildOnlyXPLATProjects>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<NETFXTargetFrameworkVersion>v4.7.2</NETFXTargetFrameworkVersion>
<NETFXTargetFramework>net472</NETFXTargetFramework>
- <NETCoreTargetFramework>netcoreapp2.1</NETCoreTargetFramework>
- <NETCoreTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</NETCoreTargetFramework>
+ <NETCoreTargetFramework>net6.0</NETCoreTargetFramework>
<NETCoreTestTargetFramework>netcoreapp5.0</NETCoreTestTargetFramework>
- <NetStandardVersion>netstandard2.0</NetStandardVersion>
- <NetStandardVersion Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</NetStandardVersion>
+ <IsBuildOnlyXPLATProjects>$(DotNetBuildFromSource)</IsBuildOnlyXPLATProjects>
+ <NetStandardVersion>netstandard2.0;net6.0</NetStandardVersion>
<TargetFrameworksExe>$(NETFXTargetFramework);$(NETCoreTargetFramework)</TargetFrameworksExe>
<TargetFrameworksExe Condition="'$(IsBuildOnlyXPLATProjects)' == 'true' OR '$(IsXPlat)' == 'true'">$(NETCoreTargetFramework)</TargetFrameworksExe>
- <TargetFrameworksExeForSigning>$(TargetFrameworksExe);netcoreapp5.0</TargetFrameworksExeForSigning>
- <TargetFrameworksExeForSigning Condition=" '$(IsXPlat)' == 'true' ">$(NETCoreTargetFramework);netcoreapp5.0</TargetFrameworksExeForSigning>
- <TargetFrameworksExeForSigning Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworksExe);net6.0</TargetFrameworksExeForSigning>
+ <TargetFrameworksExeForSigning>$(TargetFrameworksExe);net6.0</TargetFrameworksExeForSigning>
+ <TargetFrameworksExeForSigning Condition=" '$(IsXPlat)' == 'true' ">$(NETCoreTargetFramework);net6.0</TargetFrameworksExeForSigning>
<TargetFrameworksLibrary>$(NETFXTargetFramework);$(NetStandardVersion)</TargetFrameworksLibrary>
<TargetFrameworksLibrary Condition="'$(IsBuildOnlyXPLATProjects)' == 'true'">$(NetStandardVersion)</TargetFrameworksLibrary>
- <TargetFrameworksLibraryForSigning>$(TargetFrameworksLibrary);netcoreapp5.0</TargetFrameworksLibraryForSigning>
- <TargetFrameworksLibraryForSigning Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworksLibrary);net6.0</TargetFrameworksLibraryForSigning>
+ <TargetFrameworksLibraryForSigning>$(TargetFrameworksLibrary);net6.0</TargetFrameworksLibraryForSigning>
<TargetFrameworksLibraryForCrossVerificationTests>$(NETFXTargetFramework);netcoreapp5.0</TargetFrameworksLibraryForCrossVerificationTests>
<RepositoryRootDirectory>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'README.md'))\</RepositoryRootDirectory>
<BuildCommonDirectory>$(RepositoryRootDirectory)build\</BuildCommonDirectory>
diff --git a/build/packages.targets b/build/packages.targets
index d9b3006e9..99cb24a16 100644
--- a/build/packages.targets
+++ b/build/packages.targets
@@ -10,6 +10,7 @@
<CryptographyPackagesVersion>5.0.0</CryptographyPackagesVersion>
<NuGetCoreV2Version>2.14.0-rtm-832</NuGetCoreV2Version>
<ProjectSystemManagedVersion>17.0.0-beta1-10402-05</ProjectSystemManagedVersion>
+ <MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion Condition="'$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)' == ''">5.0.1-rtm.21063.7</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
</PropertyGroup>
<!-- Test and package versions -->
@@ -34,7 +35,7 @@
<PackageReference Update="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.2" />
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" />
<PackageReference Update="Microsoft.DataAI.NuGetRecommender.Contracts" Version="2.1.0" />
- <PackageReference Update="Microsoft.Extensions.CommandLineUtils" Version="1.0.1" />
+ <PackageReference Update="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)" />
<PackageReference Update="Microsoft.Internal.VisualStudio.Shell.Framework" Version="$(VSFrameworkVersion)" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.0.0" />
<PackageReference Update="Microsoft.TeamFoundationServer.ExtendedClient" Version="$(VSServicesVersion)" />
diff --git a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
index c94acffd8..f4d083e52 100644
--- a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
+++ b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
@@ -177,7 +177,7 @@
<!-- Build from source can't use ILMerge. -->
<ILMergeSubpath Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">ilmerge\</ILMergeSubpath>
<PackagePathDir Condition="'$(TargetFramework)' == '$(NETFXTargetFramework)' AND '$(IsBuildOnlyXPLATProjects)' != 'true'">Desktop/</PackagePathDir>
- <PackagePathDir Condition="'$(TargetFramework)' == '$(NetStandardVersion)'">CoreCLR/</PackagePathDir>
+ <PackagePathDir Condition="'$(TargetFramework)' == 'netstandard2.0'">CoreCLR/</PackagePathDir>
</PropertyGroup>
<ItemGroup>
<TfmSpecificPackageFile Include="$(OutputPath)\$(ILMergeSubpath)NuGet.Build.Tasks.Pack.dll" Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">
@@ -189,7 +189,7 @@
<TfmSpecificPackageFile Include="$(OutputPath)\$(ILMergeSubpath)NuGet*.dll" Condition="'$(IsBuildOnlyXPLATProjects)' == 'true'">
<PackagePath>$(PackagePathDir)</PackagePath>
</TfmSpecificPackageFile>
- </ItemGroup>
+ </ItemGroup>
</Target>
<Import Project="$(BuildCommonDirectory)common.targets"/>
diff --git a/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj b/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj
index 21015c00a..e306cdee4 100644
--- a/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj
+++ b/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj
@@ -18,7 +18,7 @@
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.Extensions.CommandLineUtils" />
+ <PackageReference Include="Microsoft.Extensions.CommandLineUtils.Sources" />
<PackageReference Include="System.Diagnostics.Debug" />
</ItemGroup>
diff --git a/src/NuGet.Core/NuGet.Commands/SignCommand/CertificateProvider.cs b/src/NuGet.Core/NuGet.Commands/SignCommand/CertificateProvider.cs
index c6ea71243..beac41889 100644
--- a/src/NuGet.Core/NuGet.Commands/SignCommand/CertificateProvider.cs
+++ b/src/NuGet.Core/NuGet.Commands/SignCommand/CertificateProvider.cs
@@ -115,7 +115,7 @@ public static async Task<X509Certificate2Collection> GetCertificatesAsync(Certif
return resultCollection;
}
-
+#pragma warning disable CS1998
private static async Task<X509Certificate2> LoadCertificateFromFileAsync(CertificateSourceOptions options)
{
X509Certificate2 cert;
@@ -154,7 +154,7 @@ private static async Task<X509Certificate2> LoadCertificateFromFileAsync(Certifi
return cert;
}
-
+#pragma warning restore CS1998
private static X509Certificate2Collection LoadCertificateFromStore(CertificateSourceOptions options)
{
X509Certificate2Collection resultCollection = null;
diff --git a/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj b/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj
index e30a079eb..c2b8fe241 100644
--- a/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj
+++ b/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj
@@ -5,7 +5,6 @@
<PropertyGroup>
<Description>Common utilities and interfaces for all NuGet libraries.</Description>
<TargetFrameworks>$(TargetFrameworksLibrary)</TargetFrameworks>
- <TargetFrameworks Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">$(TargetFrameworks);net45</TargetFrameworks>
<TargetFramework />
<NoWarn>$(NoWarn);CS1591;CS1574</NoWarn>
<PackProject>true</PackProject>
diff --git a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj
index bbc5ba480..18b597c74 100644
--- a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj
+++ b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj
@@ -6,7 +6,6 @@
<Description>NuGet's configuration settings implementation.</Description>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TargetFrameworks>$(TargetFrameworksLibrary)</TargetFrameworks>
- <TargetFrameworks Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">$(TargetFrameworks);net45</TargetFrameworks>
<TargetFramework />
<PackProject>true</PackProject>
<Shipping>true</Shipping>
@@ -29,7 +28,7 @@
<Reference Include="System.Xml.Linq" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetFramework)' == '$(NetStandardVersion)' ">
+ <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="System.Security.Cryptography.ProtectedData" />
</ItemGroup>
diff --git a/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj b/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj
index b78b1f2ea..a89b516c6 100644
--- a/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj
+++ b/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj
@@ -4,8 +4,7 @@
<PropertyGroup>
<Description>NuGet's understanding of target frameworks.</Description>
- <TargetFrameworks Condition="'$(IsBuildOnlyXPLATProjects)' == 'true'">$(TargetFrameworksLibrary);netstandard2.0</TargetFrameworks>
- <TargetFrameworks Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">$(TargetFrameworksLibrary);net40</TargetFrameworks>
+ <TargetFrameworks>$(TargetFrameworksLibrary);netstandard2.0</TargetFrameworks>
<TargetFramework />
<NoWarn>$(NoWarn);CS1591;CS1574;CS1573</NoWarn>
<PackProject>true</PackProject>
diff --git a/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj b/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj
index dfbfcaa8d..a6bb51d6b 100644
--- a/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj
+++ b/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj
@@ -35,7 +35,7 @@
<Reference Include="System.Net.Http" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetFramework)' == '$(NetStandardVersion)' ">
+ <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="System.ComponentModel.Composition" />
</ItemGroup>
diff --git a/src/NuGet.Core/NuGet.Packaging/Signing/Authoring/SignPackageRequest.cs b/src/NuGet.Core/NuGet.Packaging/Signing/Authoring/SignPackageRequest.cs
index e0cfae99f..ce19f2d6e 100644
--- a/src/NuGet.Core/NuGet.Packaging/Signing/Authoring/SignPackageRequest.cs
+++ b/src/NuGet.Core/NuGet.Packaging/Signing/Authoring/SignPackageRequest.cs
@@ -98,7 +98,9 @@ protected virtual void Dispose(bool disposing)
Chain?.Dispose();
#if IS_SIGNING_SUPPORTED
+#pragma warning disable CA1416
PrivateKey?.Dispose();
+#pragma warning restore CA1416
#endif
}
diff --git a/src/NuGet.Core/NuGet.Packaging/Signing/Cms/NativeUtility.cs b/src/NuGet.Core/NuGet.Packaging/Signing/Cms/NativeUtility.cs
index 565ac60b7..d57e38a65 100644
--- a/src/NuGet.Core/NuGet.Packaging/Signing/Cms/NativeUtility.cs
+++ b/src/NuGet.Core/NuGet.Packaging/Signing/Cms/NativeUtility.cs
@@ -120,7 +120,9 @@ internal static SignedCms NativeSign(CmsSigner cmsSigner, byte[] data, CngKey pr
signerInfo.cbSize = (uint)Marshal.SizeOf(signerInfo);
signerInfo.pCertInfo = MarshalUtility.PtrToStructure<CERT_CONTEXT>(cmsSigner.Certificate.Handle).pCertInfo;
+#pragma warning disable CA1416
signerInfo.hCryptProvOrhNCryptKey = privateKey.Handle.DangerousGetHandle();
+#pragma warning restore CA1416
signerInfo.HashAlgorithm.pszObjId = cmsSigner.DigestAlgorithm.Value;
if (cmsSigner.SignerIdentifierType == SubjectIdentifierType.SubjectKeyIdentifier)
diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs
index 7c9595268..1ca751850 100644
--- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs
+++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs
@@ -34,7 +34,7 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage request)
clone.Headers.TryAddWithoutValidation(header.Key, header.Value);
}
-#if NET5_0
+#if NET5_0 || NET6_0
var clonedOptions = (IDictionary<string, object>)clone.Options;
foreach (var option in request.Options)
{
@@ -118,7 +118,7 @@ public static void SetConfiguration(this HttpRequestMessage request, HttpRequest
throw new ArgumentNullException(nameof(configuration));
}
-#if NET5_0
+#if NET5_0 || NET6_0
request.Options.Set(new HttpRequestOptionsKey<HttpRequestMessageConfiguration>(NuGetConfigurationKey), configuration);
#else
request.Properties[NuGetConfigurationKey] = configuration;
@@ -128,7 +128,7 @@ public static void SetConfiguration(this HttpRequestMessage request, HttpRequest
private static T GetProperty<T>(this HttpRequestMessage request, string key)
{
-#if NET5_0
+#if NET5_0 || NET6_0
if (request.Options.TryGetValue<T>(new HttpRequestOptionsKey<T>(key), out T result))
#else
object result;
diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs
index c7bcb54bb..30d86fcc9 100644
--- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs
+++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs
@@ -113,7 +113,7 @@ internal HttpRetryHandler(IEnvironmentVariableReader environmentVariableReader)
headerStopwatch = new Stopwatch();
stopwatches.Add(headerStopwatch);
}
-#if NET5_0
+#if NET5_0 || NET6_0
requestMessage.Options.Set(new HttpRequestOptionsKey<List<Stopwatch>>(StopwatchPropertyName), stopwatches);
#else
requestMessage.Properties[StopwatchPropertyName] = stopwatches;
diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs
index b9ab58ce7..ebf738e52 100644
--- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs
+++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs
@@ -98,7 +98,7 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
{
List<Stopwatch> stopwatches = null;
-#if NET5_0
+#if NET5_0 || NET6_0
if (request.Options.TryGetValue(
new HttpRequestOptionsKey<List<Stopwatch>>(HttpRetryHandler.StopwatchPropertyName),
out stopwatches))
diff --git a/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj b/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj
index 180293944..8498664b9 100644
--- a/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj
+++ b/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj
@@ -4,7 +4,6 @@
<PropertyGroup>
<TargetFrameworks>$(TargetFrameworksLibrary)</TargetFrameworks>
- <TargetFrameworks Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">$(TargetFrameworks);net45</TargetFrameworks>
<TargetFramework />
<Description>NuGet's implementation of Semantic Versioning.</Description>
<PackageTags>semver;semantic versioning</PackageTags>

View file

@ -1,43 +0,0 @@
From 7f35d623761748721496abcbae2d6f11d4cf1ca8 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Fri, 22 Oct 2021 21:12:51 -0500
Subject: [PATCH] Re-enable fullfx TFM in NuGet.
---
build/common.project.props | 3 +--
.../NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/build/common.project.props b/build/common.project.props
index 000702f58..b29968eaf 100644
--- a/build/common.project.props
+++ b/build/common.project.props
@@ -18,11 +18,10 @@
<IsBuildOnlyXPLATProjects>$(DotNetBuildFromSource)</IsBuildOnlyXPLATProjects>
<NetStandardVersion>netstandard2.0;net6.0</NetStandardVersion>
<TargetFrameworksExe>$(NETFXTargetFramework);$(NETCoreTargetFramework)</TargetFrameworksExe>
- <TargetFrameworksExe Condition="'$(IsBuildOnlyXPLATProjects)' == 'true' OR '$(IsXPlat)' == 'true'">$(NETCoreTargetFramework)</TargetFrameworksExe>
+ <TargetFrameworksExe Condition="'$(IsXPlat)' == 'true'">$(NETCoreTargetFramework)</TargetFrameworksExe>
<TargetFrameworksExeForSigning>$(TargetFrameworksExe);net6.0</TargetFrameworksExeForSigning>
<TargetFrameworksExeForSigning Condition=" '$(IsXPlat)' == 'true' ">$(NETCoreTargetFramework);net6.0</TargetFrameworksExeForSigning>
<TargetFrameworksLibrary>$(NETFXTargetFramework);$(NetStandardVersion)</TargetFrameworksLibrary>
- <TargetFrameworksLibrary Condition="'$(IsBuildOnlyXPLATProjects)' == 'true'">$(NetStandardVersion)</TargetFrameworksLibrary>
<TargetFrameworksLibraryForSigning>$(TargetFrameworksLibrary);net6.0</TargetFrameworksLibraryForSigning>
<TargetFrameworksLibraryForCrossVerificationTests>$(NETFXTargetFramework);netcoreapp5.0</TargetFrameworksLibraryForCrossVerificationTests>
<RepositoryRootDirectory>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'README.md'))\</RepositoryRootDirectory>
diff --git a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
index f4d083e52..c4eb79b4c 100644
--- a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
+++ b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
@@ -176,7 +176,7 @@
<PropertyGroup>
<!-- Build from source can't use ILMerge. -->
<ILMergeSubpath Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">ilmerge\</ILMergeSubpath>
- <PackagePathDir Condition="'$(TargetFramework)' == '$(NETFXTargetFramework)' AND '$(IsBuildOnlyXPLATProjects)' != 'true'">Desktop/</PackagePathDir>
+ <PackagePathDir Condition="'$(TargetFramework)' == '$(NETFXTargetFramework)'">Desktop/</PackagePathDir>
<PackagePathDir Condition="'$(TargetFramework)' == 'netstandard2.0'">CoreCLR/</PackagePathDir>
</PropertyGroup>
<ItemGroup>
--
2.31.1

View file

@ -0,0 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Logan Bussell <loganbussell@microsoft.com>
Date: Wed, 13 Apr 2022 15:03:44 -0700
Subject: [PATCH] Exclude test projects from source-build
Backport PR: https://github.com/dotnet/razor-compiler/pull/226
---
src/test/Directory.Build.props | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/test/Directory.Build.props b/src/test/Directory.Build.props
index 95172906..047e4619 100644
--- a/src/test/Directory.Build.props
+++ b/src/test/Directory.Build.props
@@ -8,5 +8,6 @@
-->
<IsTestAssetProject>true</IsTestAssetProject>
<IsPackable>false</IsPackable>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Logan Bussell <loganbussell@microsoft.com>
Date: Thu, 14 Apr 2022 16:27:26 -0700
Subject: [PATCH] retarget Razor Syntax Genreator to net6.0
Backport PR: https://github.com/dotnet/razor-compiler/pull/226
---
src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj b/src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj
index 924379ac..362f0e3b 100644
--- a/src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj
+++ b/src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj
@@ -3,6 +3,7 @@
<PropertyGroup>
<Description>Generates Razor syntax nodes from xml. For internal use only.</Description>
<TargetFramework>netcoreapp3.1</TargetFramework>
+ <TargetFramework Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFramework>
<AssemblyName>dotnet-razorsyntaxgenerator</AssemblyName>
<PackageId>RazorSyntaxGenerator</PackageId>
<OutputType>Exe</OutputType>

View file

@ -1,33 +0,0 @@
From 1a415d2019d74bcf009134326d1c25798589de64 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Tue, 19 Oct 2021 11:39:32 -0500
Subject: [PATCH] Apply arcade-powered source-build patches (#55823)
Don't include desktop artifacts that don't exist in source-build.
Source-build doesn't have these artifacts available, even when we eventually will
build desktop TFMs, because Roslyn is one of the first builds in source-build.
Instead Roslyn is picking up reference packages that don't have the `lib` directory
which is causing a build failure. This disables the attempt to grab these desktop
artifacts so source-build just skips them instead.
Backported to roslyn with https://github.com/dotnet/roslyn/pull/55823
---
.../DesktopCompilerArtifacts.targets | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/NuGet/Microsoft.Net.Compilers.Toolset/DesktopCompilerArtifacts.targets b/src/NuGet/Microsoft.Net.Compilers.Toolset/DesktopCompilerArtifacts.targets
index c8b87ab6958..107ff051b51 100644
--- a/src/NuGet/Microsoft.Net.Compilers.Toolset/DesktopCompilerArtifacts.targets
+++ b/src/NuGet/Microsoft.Net.Compilers.Toolset/DesktopCompilerArtifacts.targets
@@ -20,7 +20,7 @@
VS training data to the assemblies they produce.
-->
- <Target Name="InitializeDesktopCompilerArtifacts">
+ <Target Name="InitializeDesktopCompilerArtifacts" Condition="'$(DotNetBuildFromSource)' != 'true'">
<ItemGroup>
<!-- The Roslyn built binaries must be taken from these locations because this is the location where signing occurs -->
--
2.31.1

View file

@ -1,25 +0,0 @@
From 7260c572b1ce424f7ff3a64aa3227417c6a7a676 Mon Sep 17 00:00:00 2001
From: Logan Bussell <36081148+lbussell@users.noreply.github.com>
Date: Fri, 8 Oct 2021 00:56:41 +0000
Subject: [PATCH] remove Microsoft.DotNet prebuilts
Pull request for applying this patch: https://github.com/dotnet/roslyn/pull/57159
---
eng/Tools.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/Tools.props b/eng/Tools.props
index 1579b510558..944448855ee 100644
--- a/eng/Tools.props
+++ b/eng/Tools.props
@@ -1,6 +1,6 @@
<Project>
- <ItemGroup>
+ <ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<!--
This package would normally be restored by the Arcade SDK, but it is not included during restore operations
if the -package flag is not also provided during the build. Roslyn separates the restore operation from the
--
2.30.2

View file

@ -1,41 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Davis Goodin <dagood@microsoft.com>
Date: Tue, 19 Oct 2021 19:38:52 -0500
Subject: [PATCH] Disable apphost build of 'csi', 'vbi' for source-build
Creating an apphost for a netcoreapp3.1 project uses the apphost pack as a
prebuilt. Stopping these projects from creating the apphost removes the prebuilt
for source-build.
See: https://github.com/dotnet/roslyn/issues/57233
PR: https://github.com/dotnet/roslyn/pull/57306
---
src/Interactive/csi/csi.csproj | 1 +
src/Interactive/vbi/vbi.vbproj | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/Interactive/csi/csi.csproj b/src/Interactive/csi/csi.csproj
index 3970bb4e9ea..e96beb550d2 100644
--- a/src/Interactive/csi/csi.csproj
+++ b/src/Interactive/csi/csi.csproj
@@ -6,6 +6,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>CSharpInteractive</RootNamespace>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\..\Compilers\Core\Portable\Microsoft.CodeAnalysis.csproj" />
diff --git a/src/Interactive/vbi/vbi.vbproj b/src/Interactive/vbi/vbi.vbproj
index 5bbdf7f03a7..5f732d71534 100644
--- a/src/Interactive/vbi/vbi.vbproj
+++ b/src/Interactive/vbi/vbi.vbproj
@@ -6,6 +6,7 @@
<OutputType>Exe</OutputType>
<StartupObject>Sub Main</StartupObject>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
<RootNamespace></RootNamespace>
</PropertyGroup>
<ItemGroup Label="Project References">

View file

@ -1,26 +0,0 @@
From 752ab8ab199bd1d99353658cb676a6612508333b Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Wed, 8 Sep 2021 21:31:01 +0000
Subject: [PATCH] Drop vstest.console netcoreapp2.1 support
Workaround for https://github.com/microsoft/vstest/issues/3044
---
src/vstest.console/vstest.console.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vstest.console/vstest.console.csproj b/src/vstest.console/vstest.console.csproj
index 1343e6d9..7c555591 100644
--- a/src/vstest.console/vstest.console.csproj
+++ b/src/vstest.console/vstest.console.csproj
@@ -8,7 +8,7 @@
<PropertyGroup>
<AssemblyName>vstest.console</AssemblyName>
<TargetFrameworks>netcoreapp2.1;net451</TargetFrameworks>
- <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netcoreapp2.1;net6.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<WarningsAsErrors>true</WarningsAsErrors>
<OutputType>Exe</OutputType>
<IsTestProject>false</IsTestProject>
--
2.29.2

View file

@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Wed, 22 Jun 2022 05:57:36 -0500
Subject: [PATCH] Enable work-tree and unsafe-paths to be able to apply in the
checked-in tarball.
---
eng/SourceBuild.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index b365645..36a7ba9 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -24,7 +24,7 @@
</ItemGroup>
<Exec
- Command="git apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
+ Command="git --work-tree=$(InnerSourceBuildRepoRoot) apply --ignore-whitespace --whitespace=nowarn --unsafe-paths &quot;%(SourceBuildPatchFile.FullPath)&quot;"
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
Condition="'@(SourceBuildPatchFile)' != ''" />
</Target>

View file

@ -1,40 +0,0 @@
From 071dfef93e5431a415bd9298f2ed8aaf9a22524f Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Mon, 11 Oct 2021 19:35:15 +0000
Subject: [PATCH] Don't publish for win runtime identifier in source-build
See https://github.com/microsoft/vstest/pull/3096
---
src/testhost.x86/testhost.x86.csproj | 2 +-
src/testhost/testhost.csproj | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/testhost.x86/testhost.x86.csproj b/src/testhost.x86/testhost.x86.csproj
index 7eb5cd15..09856522 100644
--- a/src/testhost.x86/testhost.x86.csproj
+++ b/src/testhost.x86/testhost.x86.csproj
@@ -19,7 +19,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1' AND '$(TargetFramework)' != 'netcoreapp1.0' AND '$(TargetFramework)' != 'net6.0' ">
- <RuntimeIdentifier>win7-x86</RuntimeIdentifier>
+ <RuntimeIdentifier Condition="'$(DotNetBuildFromSource)' != 'true'">win7-x86</RuntimeIdentifier>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<TargetName Condition="'$(TargetFramework)' != 'net451'">$(AssemblyName.Replace('.x86', '')).$(TargetFramework).x86</TargetName>
</PropertyGroup>
diff --git a/src/testhost/testhost.csproj b/src/testhost/testhost.csproj
index a780e4e9..ba0fd259 100644
--- a/src/testhost/testhost.csproj
+++ b/src/testhost/testhost.csproj
@@ -16,7 +16,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1' AND '$(TargetFramework)' != 'netcoreapp1.0' AND '$(TargetFramework)' != 'net6.0' ">
- <RuntimeIdentifier>win7-x64</RuntimeIdentifier>
+ <RuntimeIdentifier Condition="'$(DotNetBuildFromSource)' != 'true'">win7-x64</RuntimeIdentifier>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<TargetName Condition="'$(TargetFramework)' != 'net451'">$(AssemblyName).$(TargetFramework)</TargetName>
</PropertyGroup>
--
2.31.1

View file

@ -14,6 +14,7 @@
<PackageReference Include="microsoft.dotnet.templateLocator" Version="$(MicrosoftDotnetTemplateLocatorPackageVersion)" ExcludeAssets="all" GeneratePathProperty="true"/>
<PackageReference Include="runtime.win-x86.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" ExcludeAssets="all" GeneratePathProperty="true" />
<PackageReference Include="runtime.win-x64.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" ExcludeAssets="all" GeneratePathProperty="true" />
<PackageReference Include="runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" ExcludeAssets="all" GeneratePathProperty="true" />
</ItemGroup>
<Target
@ -29,6 +30,7 @@
<ItemGroup>
<_VSTemplateLocatorSrc Include="$(Pkgruntime_win-x86_Microsoft_NETCore_DotNetHostResolver)\runtimes\win-x86\native\hostfxr.dll" Arch="x86\" />
<_VSTemplateLocatorSrc Include="$(Pkgruntime_win-x64_Microsoft_NETCore_DotNetHostResolver)\runtimes\win-x64\native\hostfxr.dll" Arch="x64\" />
<_VSTemplateLocatorSrc Include="$(Pkgruntime_win-arm64_Microsoft_NETCore_DotNetHostResolver)\runtimes\win-arm64\native\hostfxr.dll" Arch="arm64\" />
<_VSTemplateLocatorSrc Include="$(Pkgmicrosoft_dotnet_templateLocator)\lib\net472\**\*.dll" Arch="" />
<_VSTemplateLocatorDst Include="@(_VSTemplateLocatorSrc->'$(OutputPath)VSTemplateLocator\%(Arch)%(RecursiveDir)%(Filename)%(Extension)')" />
</ItemGroup>

View file

@ -14,7 +14,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NuGet.Versioning" Version="$(NuGetVersioningPackageVersion)" />
<PackageReference Include="NuGet.Packaging" Version="$(NuGetVersioningPackageVersion)" />
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
<PackageReference Include="System.Reflection.Metadata" Version="6.0.1" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" Condition="'$(DotNetBuildFromSource)' != 'true'" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>

View file

@ -31,7 +31,6 @@ target_link_libraries(Finalizer shell32.lib)
target_link_libraries(Finalizer advapi32.lib)
target_link_libraries(Finalizer version.lib)
target_link_libraries(Finalizer msi.lib)
target_link_libraries(Finalizer pathcch.lib)
# Add WiX libraries
target_link_libraries(Finalizer wcautil.lib)

View file

@ -38,6 +38,39 @@ LExit:
return hr;
}
extern "C" HRESULT StrTrimBackslash(LPWSTR* ppwz, LPCWSTR wzSource)
{
HRESULT hr = S_OK;
LPWSTR sczResult = NULL;
int i = lstrlenW(wzSource);
if (0 < i)
{
for (i = i - 1; i > 0; --i)
{
if (L'\\' != wzSource[i])
{
break;
}
}
++i;
}
hr = StrAllocString(&sczResult, wzSource, i);
ExitOnFailure(hr, "Failed to copy result string");
// Output result
*ppwz = sczResult;
sczResult = NULL;
LExit:
ReleaseStr(sczResult);
return hr;
}
extern "C" HRESULT DeleteWorkloadRecords(LPWSTR sczSdkFeatureBandVersion, LPWSTR sczArchitecture)
{
HRESULT hr = S_OK;
@ -112,7 +145,7 @@ extern "C" HRESULT DeleteWorkloadRecords(LPWSTR sczSdkFeatureBandVersion, LPWSTR
ExitOnFailure(hr, "Failed to get size of key name.");
// Need to remove trailing backslash otherwise PathFile returns an empty string.
hr = PathCchRemoveBackslash(sczKeyName, cbKeyName);
hr = StrTrimBackslash(&sczKeyName, sczKeyName);
ExitOnFailure(hr, "Failed to remove backslash.");
hr = StrAllocString(&sczSubKey, PathFile(sczKeyName), 0);
@ -363,7 +396,17 @@ extern "C" HRESULT DetectSdk(LPWSTR sczSdkFeatureBandVersion, LPWSTR sczArchitec
LogStringLine(REPORT_STANDARD, "Scanning %ls", sczInstalledSdkVersionsKeyName);
hr = RegOpen(HKEY_LOCAL_MACHINE, sczInstalledSdkVersionsKeyName, KEY_READ, &hkInstalledSdkVersionsKey);
ExitOnFailure(hr, "Failed to read installed versions key.");
// When the last SDK is removed the registry key should no longer exist so we can just exit
if (E_FILENOTFOUND == hr)
{
LogStringLine(REPORT_STANDARD, "Registry key not found: %ls.", sczInstalledSdkVersionsKeyName);
hr = S_OK;
*pbInstalled = FALSE;
goto LExit;
}
ExitOnFailure(hr, "Failed to open registry key: %ls.", sczInstalledSdkVersionsKeyName);
for (DWORD dwSdkVersionsValueIndex = 0;; ++dwSdkVersionsValueIndex)
{
@ -427,9 +470,10 @@ int wmain(int argc, wchar_t* argv[])
hr = ::DetectSdk(sczFeatureBandVersion, argv[3], &bSdkFeatureBandInstalled);
ExitOnFailure(hr, "Failed to detect installed SDKs.");
if (!bSdkFeatureBandInstalled)
// If the feature band is still present, do not remove workloads.
if (bSdkFeatureBandInstalled)
{
LogStringLine(REPORT_STANDARD, "SDK with feature band %ls could not be found.", sczFeatureBandVersion);
LogStringLine(REPORT_STANDARD, "Detected SDK with feature band %ls.", sczFeatureBandVersion);
goto LExit;
}

View file

@ -1,7 +1,13 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<BundledManifests Include="Microsoft.NET.Workload.Mono.ToolChain" FeatureBand="6.0.100" Version="$(MonoWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Workload.Emscripten" FeatureBand="6.0.100" Version="$(EmscriptenWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Sdk.Android" FeatureBand="6.0.300" Version="$(XamarinAndroidWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Sdk.iOS" FeatureBand="6.0.300" Version="$(XamarinIOSWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Sdk.MacCatalyst" FeatureBand="6.0.300" Version="$(XamarinMacCatalystWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Sdk.macOS" FeatureBand="6.0.300" Version="$(XamarinMacOSWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Sdk.Maui" FeatureBand="6.0.300" Version="$(MauiWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Sdk.tvOS" FeatureBand="6.0.300" Version="$(XamarinTvOSWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Workload.Mono.ToolChain" FeatureBand="6.0.300" Version="$(MonoWorkloadManifestVersion)" />
<BundledManifests Include="Microsoft.NET.Workload.Emscripten" FeatureBand="6.0.300" Version="$(EmscriptenWorkloadManifestVersion)" />
</ItemGroup>
<!-- Calculate NuGet package IDs for bundled manifests -->
@ -76,19 +82,19 @@
<ItemGroup>
<ManifestContent Include="%(BundledManifests.RestoredNupkgContentPath)\data\*"
Condition="Exists('%(RestoredNupkgContentPath)\data')"
DestinationPath="$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())"
DestinationPath="%(FeatureBand)/$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())"
RestoredNupkgContentPath="%(RestoredNupkgContentPath)"
WorkloadManifestId="%(Identity)"/>
<ManifestContent Include="%(BundledManifests.RestoredNupkgContentPath)\data\localize\*"
Condition="Exists('%(RestoredNupkgContentPath)\data\localize')"
DestinationPath="$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/localize"/>
DestinationPath="%(BundledManifests.FeatureBand)/$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/localize"/>
</ItemGroup>
<Error Text="No workload manifest content found." Condition="'@(ManifestContent->Count())' == '0'" />
<Copy SourceFiles="@(ManifestContent)"
DestinationFolder="$(RedistLayoutPath)sdk-manifests/$(CliProductBandVersion)00/%(DestinationPath)"/>
DestinationFolder="$(RedistLayoutPath)sdk-manifests/%(DestinationPath)"/>
</Target>
</Project>

View file

@ -41,8 +41,10 @@
<RemainingFiles Include="$(SdkOutputDirectory)**\*" Exclude="$(SdkOutputDirectory)FSharp\FSharp.Build.dll;@(RoslynFiles);@(FSharpFiles)" />
<!-- Removing Full CLR built TestHost assemblies from getting Crossgen as it is throwing error -->
<!-- Removing Full CLR built TestHost assemblies from getting Crossgen as it is throwing error, and they need to stay their original architecture. -->
<RemainingFiles Remove="$(SdkOutputDirectory)TestHost*\**\*" />
<!-- Removing Full CLR built DumpMiniTool executables from Crossgen, because they need to stay their original architecture to allow creating dumps with a given bitness. -->
<RemainingFiles Remove="$(SdkOutputDirectory)Extensions\dump*\**\*" />
<RemainingFiles Remove="$(SdkOutputDirectory)Sdks\**\*" />
<RemainingFiles Remove="$(SdkOutputDirectory)**\Microsoft.TestPlatform.Extensions.EventLogCollector.dll" />

View file

@ -305,6 +305,7 @@ Copyright (c) .NET Foundation. All rights reserved.
AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**"
AppHostPackVersion="$(_NETCoreAppPackageVersion)"
AppHostRuntimeIdentifiers="@(NetCoreAppHostRids, '%3B')"
ExcludedRuntimeIdentifiers="android"
/>
<KnownCrossgen2Pack Include="Microsoft.NETCore.App.Crossgen2"
@ -370,6 +371,7 @@ Copyright (c) .NET Foundation. All rights reserved.
TargetingPackVersion="$(MicrosoftAspNetCoreAppRefPackageVersion)"
RuntimePackNamePatterns="Microsoft.AspNetCore.App.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(AspNetCoreRuntimePackRids, '%3B')"
RuntimePackExcludedRuntimeIdentifiers="android"
/>
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref"

View file

@ -123,6 +123,12 @@
<Arm64AppHostRid>win-arm64</Arm64AppHostRid>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('WINDOWS')) And '$(Architecture)' == 'arm64'">
<AlternateAppHostRid>win-x86</AlternateAppHostRid>
<x64AppHostRid>win-x64</x64AppHostRid>
<ArmAppHostRid>win-arm</ArmAppHostRid>
</PropertyGroup>
<ItemGroup>
<BundledLayoutComponent Include="CombinedSharedHostAndFrameworkArchive">
<BaseUrl>$(CoreSetupRootUrl)$(CoreSetupBlobVersion)</BaseUrl>
@ -180,6 +186,13 @@
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
</BundledLayoutPackage>
<BundledLayoutPackage Include="MicrosoftNetCoreAppHostPackNupkg_x64" Condition="'$(x64AppHostRid)' != ''">
<PackageName>Microsoft.NETCore.App.Host.$(x64AppHostRid)</PackageName>
<PackageVersion>$(MicrosoftNETCoreAppHostPackageVersion)</PackageVersion>
<TargetFramework>$(TargetFramework)</TargetFramework>
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
</BundledLayoutPackage>
<BundledInstallerComponent Include="DownloadedRuntimeDepsInstallerFile"
Condition="('$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true') And '$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
<BaseUrl>$(CoreSetupRootUrl)$(CoreSetupBlobVersion)</BaseUrl>
@ -459,7 +472,7 @@
<Target Name="GenerateVersionFile"
DependsOnTargets="SetupBundledComponents;GetCommitHash;GenerateFullNuGetVersion">
<WriteLinesToFile File="$(SdkOutputDirectory).version"
Lines="$(GitCommitHash);$(Version);$(Rid)"
Lines="$(GitCommitHash);$(Version);$(Rid);$(FullNugetVersion)"
Overwrite="true" />
<!-- This is a hack to make the full nuget version available during the publishing step -->
@ -468,6 +481,29 @@
Overwrite="true" />
</Target>
<Target Name="FixNewtonsoftInTesthostDepsJson" >
<!-- Patch version of Newtonsoft.Json in testhost.deps.json, because it is picked up by
compliance checking scripts as a false-positive vulnerability. -->
<ItemGroup>
<NewtonSoftJsonVersionReplacement Include="%22Newtonsoft.Json%22: %2213.0.0.0%22">
<ReplacementString>"Newtonsoft.Json": "13.0.1.0"</ReplacementString>
</NewtonSoftJsonVersionReplacement>
<NewtonSoftJsonVersionReplacement Include="Newtonsoft.Json/13.0.0.0">
<ReplacementString>Newtonsoft.Json/13.0.1.0</ReplacementString>
</NewtonSoftJsonVersionReplacement>
</ItemGroup>
<ItemGroup>
<TestHostDepsJsonPath Include="$(OutputPath)/**/testhost.deps.json" />
</ItemGroup>
<ReplaceFileContents
InputFiles="@(TestHostDepsJsonPath)"
DestinationFiles="@(TestHostDepsJsonPath)"
ReplacementItems="@(NewtonSoftJsonVersionReplacement)" />
</Target>
<Target Name="CopyIncludedWorkloadManifestFile" >
<ItemGroup>
@ -560,6 +596,7 @@
LayoutWorkloadUserLocalMarker;
LayoutBundledTools;
RetargetTools;
FixNewtonsoftInTesthostDepsJson;
CrossgenLayout;
LayoutAppHostTemplate;
GeneratePrecomputedRarCache;

View file

@ -414,7 +414,7 @@
<Target Name="GenerateTemplatesNupkgs"
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateTemplatesMsis;SignTemplatesMsis;SetupTemplatesNupkgs"
Condition="$(ProductMonikerRid.StartsWith('win')) And !$(Architecture.StartsWith('arm'))"
Condition="$(ProductMonikerRid.StartsWith('win')) And '$(Architecture)' != 'arm' "
Inputs="@(TemplatesNupkgComponent->'%(MSIInstallerFile)');
$(TemplatesInstallerNuspecFile);
$(GenerateNupkgPowershellScript)"

View file

@ -22,6 +22,5 @@ first_run() {
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true
}
INSTALL_TEMP_HOME=/tmp/dotnet-installer
[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME
INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically
HOME=$INSTALL_TEMP_HOME first_run

View file

@ -12,7 +12,7 @@ first_run() {
$INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true
}
[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME
INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically
HOME=$INSTALL_TEMP_HOME first_run
exit 0

View file

@ -40,8 +40,8 @@
<Text Name="FilesInUseLabel" X="11" Y="121" Width="-11" Height="34" FontId="3" DisablePrefix="yes">#(loc.FilesInUseLabel)</Text>
<Text Name="FilesInUseText" X="11" Y="150" Width="-11" Height="-86" FontId="3" DisablePrefix="yes" HexStyle="0x0000000C"></Text>
<Button Name="FilesInUseCloseRadioButton" X="300" Y="-65" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseCloseRadioButton)</Button>
<Button Name="FilesInUseDontCloseRadioButton" X="300" Y="-45" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseDontCloseRadioButton)</Button>
<Button Name="FilesInUseCloseRadioButton" X="165" Y="-65" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseCloseRadioButton)</Button>
<Button Name="FilesInUseDontCloseRadioButton" X="165" Y="-45" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseDontCloseRadioButton)</Button>
<Button Name="FilesInUseOkButton" X="-133" Y="-11" Width="99" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FilesInUseOkButton)</Button>
<Button Name="FilesInUseCancelButton" X="-32" Y="-11" Width="99" Height="23" TabStop="yes" FontId="0">#(loc.FilesInUseCancelButton)</Button>

View file

@ -151,7 +151,31 @@
<Variable Name="WINFORMSANDWPFVERSION" Type="string" Value="$(var.WinFormsAndWpfVersion)" bal:Overridable="no" />
<Variable Name="DOTNETHOMESIMILARITYCHECKOVERRIDE" Type="string" Value="" bal:Overridable="yes" />
<Chain DisableSystemRestore="yes" ParallelCache="yes">
<Chain DisableSystemRestore="yes" ParallelCache="yes">
<!--
The finalizer is not an actual installation package. We "detect" the EXE
based on the action the bundle is performing to ensure that it runs the uninstall
command only when the bundle is being removed. The package is always installable because the bundle
will remove the package (execute its UninstallCommand) if it is not installable when then bundle is
being installed.
The finalizer is first in the chain to ensure it executes last during an uninstall. When the
SDK is upgraded, the old SDK will be removed before the finalizer executes. This ensures that the
finalizer detects the new SDK and does nothing because the feature band matches.
For an install+uninstall scenario, because the SDK MSI is removed prior to the finalizer, it will
detect that there are no matching feature bands and then clean up workloads associated with
the feature band.
-->
<ExePackage SourceFile="$(var.FinalizerExeSourcePath)"
Cache="always"
DetectCondition="WixBundleAction >= 3"
Id="Finalizer"
InstallCondition="WixBundleAction >= 4"
UninstallCommand="&quot;[WixBundleLog_Finalizer]&quot; $(var.NugetVersion) $(var.Platform)"
Vital="no" />
<MsiPackage SourceFile="$(var.SharedFXMsiSourcePath)">
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
</MsiPackage>
@ -208,19 +232,7 @@
<PackageGroupRef Id="PG_AspNetCoreSharedFramework_arm64"/>
<?endif?>
<!--
The finalizer is not an actual installation package. We "detect" the EXE
based on the action the bundle is performing to ensure that it runs the uninstall
command only when the bundle is being removed. The package is always installable because the bundle
will remove (execute the uninstall command) the package if it is not installable when then bundle is
being installed.
-->
<ExePackage SourceFile="$(var.FinalizerExeSourcePath)"
DetectCondition="WixBundleAction >= 3"
Id="Finalizer"
InstallCondition="WixBundleAction >= 4"
UninstallCommand="&quot;[WixBundleLog_Finalizer]&quot; $(var.NugetVersion) $(var.Platform)"
Vital="no" />
</Chain>
</Bundle>

View file

@ -34,7 +34,7 @@ namespace EndToEnd.Tests
File.Exists(manifestFile).Should().BeTrue();
using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read);
Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream);
Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream, manifestFile);
readManifest.ShouldNotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid");
}