Merge pull request #14986 from dotnet-maestro-bot/merge/release/7.0.1xx-to-release/7.0.2xx
[automated] Merge branch 'release/7.0.1xx' => 'release/7.0.2xx'
This commit is contained in:
commit
0bc9641ed1
33 changed files with 309 additions and 137 deletions
|
@ -20,6 +20,8 @@ variables:
|
|||
- name: PostBuildSign
|
||||
value: true
|
||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- name: Codeql.Enabled
|
||||
value: true
|
||||
- group: DotNet-DotNetCli-Storage
|
||||
- group: DotNet-Installer-SDLValidation-Params
|
||||
- name: _PublishUsingPipelines
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
|
||||
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Architecture>
|
||||
<Architecture Condition="'$(Architecture)' == '' AND ('$(BuildArchitecture)' == 'arm64' OR '$(BuildArchitecture)' == 'arm')">$(BuildArchitecture)</Architecture>
|
||||
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 's390x'">$(BuildArchitecture)</Architecture>
|
||||
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'ppc64le'">$(BuildArchitecture)</Architecture>
|
||||
<Architecture Condition="'$(Architecture)' == ''">x64</Architecture>
|
||||
|
|
|
@ -12,9 +12,11 @@ Global
|
|||
Debug|x86 = Debug|x86
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|arm64 = Debug|arm64
|
||||
Debug|arm = Debug|arm
|
||||
Release|x86 = Release|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|arm64 = Release|arm64
|
||||
Release|arm = Release|arm
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|x86.ActiveCfg = Debug|x86
|
||||
|
@ -23,12 +25,16 @@ Global
|
|||
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|x64.Build.0 = Debug|x64
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|arm64.ActiveCfg = Debug|arm64
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|arm64.Build.0 = Debug|arm64
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|arm.ActiveCfg = Debug|arm
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|arm.Build.0 = Debug|arm
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|x86.ActiveCfg = Release|x86
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|x86.Build.0 = Release|x86
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|x64.ActiveCfg = Release|x64
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|x64.Build.0 = Release|x64
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|arm64.ActiveCfg = Release|arm64
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|arm64.Build.0 = Release|arm64
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|arm.ActiveCfg = Release|arm
|
||||
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|arm.Build.0 = Release|arm
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
<!-- Begin: Package sources from dotnet-aspnetcore -->
|
||||
<!-- End: Package sources from dotnet-aspnetcore -->
|
||||
<!-- Begin: Package sources from dotnet-runtime -->
|
||||
<!-- Begin: Package sources from dotnet-sdk -->
|
||||
<!-- End: Package sources from dotnet-sdk -->
|
||||
<!-- Begin: Package sources from dotnet-windowsdesktop -->
|
||||
<!-- End: Package sources from dotnet-windowsdesktop -->
|
||||
<!-- End: Package sources from dotnet-runtime -->
|
||||
|
|
|
@ -43,8 +43,8 @@ Please see the [dotnet/source-build](https://github.com/dotnet/source-build) rep
|
|||
|
||||
## Support
|
||||
|
||||
.NET Source-Build is supported on the oldest available .NET SDK feature update, and on Linux only.
|
||||
For example, if both .NET 6.0.1XX and 6.0.2XX feature updates are available from [dotnet.microsoft.com](https://dotnet.microsoft.com/en-us/download/dotnet/6.0), Source-Build will only support 6.0.1XX.
|
||||
.NET Source-Build is supported on the oldest available .NET SDK feature update for each major release, and on Linux only.
|
||||
For example, if .NET 6.0.1xx, 6.0.2xx, and 7.0.1xx feature updates are available from [dotnet.microsoft.com](https://dotnet.microsoft.com/en-us/download/dotnet/6.0), Source-Build will support 6.0.1xx and 7.0.1xx.
|
||||
For the latest information about Source-Build support for new .NET versions, please check our [GitHub Discussions page](https://github.com/dotnet/source-build/discussions) for announcements.
|
||||
|
||||
## Prerequisites
|
||||
|
@ -79,7 +79,7 @@ The dependencies for building .NET from source can be found [here](https://githu
|
|||
```
|
||||
|
||||
This builds the entire .NET SDK from source.
|
||||
The resulting SDK is placed at `artifacts/x64/Release/dotnet-sdk-6.0.100-fedora.33-x64.tar.gz`.
|
||||
The resulting SDK is placed at `artifacts/x64/Release/dotnet-sdk-7.0.100-your-RID.tar.gz`.
|
||||
|
||||
Optionally add the `--online` flag to add online NuGet restore sources to the build.
|
||||
This is useful for testing unsupported releases that don't yet build without downloading pre-built binaries from the internet.
|
||||
|
@ -90,7 +90,7 @@ The dependencies for building .NET from source can be found [here](https://githu
|
|||
|
||||
```bash
|
||||
mkdir -p $HOME/dotnet
|
||||
tar zxf artifacts/x64/Release/dotnet-sdk-6.0.100-fedora.33-x64.tar.gz -C $HOME/dotnet
|
||||
tar zxf artifacts/x64/Release/dotnet-sdk-7.0.100-your-RID.tar.gz -C $HOME/dotnet
|
||||
ln -s $HOME/dotnet/dotnet /usr/bin/dotnet
|
||||
```
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
<ItemGroup Condition=" '$(ArcadeBuildTarball)' != 'true' ">
|
||||
<ProjectToBuild Include="$(RepoRoot)Microsoft.DotNet.Cli.sln" />
|
||||
<ProjectToBuild Condition="'$(OS)' == 'Windows_NT' And ('$(Architecture)' == 'x86' Or '$(Architecture)' == 'x64' Or '$(Architecture)' == 'arm64')"
|
||||
<ProjectToBuild Condition="'$(OS)' == 'Windows_NT' And ('$(Architecture)' == 'x86' Or '$(Architecture)' == 'x64' Or '$(Architecture)' == 'arm64' Or '$(Architecture)' == 'arm')"
|
||||
Include="$(RepoRoot)eng\version.csproj;
|
||||
$(RepoRoot)eng\native.proj" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -7,12 +7,9 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(PostBuildSign)' != 'true'">
|
||||
<ItemsToSign Remove="@(ItemsToSign)" />
|
||||
<ItemsToSign Include="$(ArtifactsShippingPackagesDir)*.zip" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
|
||||
<ItemsToSign Include="$(ArtifactsShippingPackagesDir)*.exe" />
|
||||
<ItemsToSign Include="$(ArtifactsShippingPackagesDir)*.msi" />
|
||||
<ItemsToSign Include="$(ArtifactsNonShippingPackagesDir)*.msi" />
|
||||
<ItemsToSign Include="$(ArtifactsNonShippingPackagesDir)*.zip" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
|
||||
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.wixpack.zip" />
|
||||
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.exe" />
|
||||
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.zip" />
|
||||
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.msi" />
|
||||
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.nupkg" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -202,9 +202,9 @@
|
|||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>f36ea231c234560514ede4c2747897a737ced28f</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="7.0.0-alpha.1.22513.3">
|
||||
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="7.0.0-alpha.1.22531.3">
|
||||
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
|
||||
<Sha>29cef6e67cbd7989db409037f0c1fe0af21384ad</Sha>
|
||||
<Sha>4f5672e90b7f908d96aad61a40b0e9b352518b1c</Sha>
|
||||
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.SourceLink.GitHub" Version="1.2.0-beta-22429-01" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<MajorMinorVersion>$(VersionMajor).$(VersionMinor)</MajorMinorVersion>
|
||||
<CliProductBandVersion>$(MajorMinorVersion).$(VersionSDKMinor)</CliProductBandVersion>
|
||||
<!-- Enable to remove prerelease label. -->
|
||||
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
|
||||
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">true</StabilizePackageVersion>
|
||||
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
|
||||
</PropertyGroup>
|
||||
<!-- Restore feeds -->
|
||||
|
@ -193,17 +193,17 @@
|
|||
or minor release, prebuilts may be needed. When the release is mature, prebuilts are not
|
||||
necessary, and this property is removed from the file.
|
||||
-->
|
||||
<PrivateSourceBuiltArtifactsPackageVersion>7.0.100-rc.2</PrivateSourceBuiltArtifactsPackageVersion>
|
||||
<PrivateSourceBuiltArtifactsPackageVersion>7.0.100</PrivateSourceBuiltArtifactsPackageVersion>
|
||||
</PropertyGroup>
|
||||
<!-- Workload manifest package versions -->
|
||||
<PropertyGroup>
|
||||
<MauiFeatureBand>7.0.100-rc.1</MauiFeatureBand>
|
||||
<MauiWorkloadManifestVersion>7.0.0-rc.1.6430</MauiWorkloadManifestVersion>
|
||||
<XamarinAndroidWorkloadManifestVersion>33.0.0-rc.1.136</XamarinAndroidWorkloadManifestVersion>
|
||||
<XamarinIOSWorkloadManifestVersion>15.4.1006-rc.1</XamarinIOSWorkloadManifestVersion>
|
||||
<XamarinMacCatalystWorkloadManifestVersion>15.4.1006-rc.1</XamarinMacCatalystWorkloadManifestVersion>
|
||||
<XamarinMacOSWorkloadManifestVersion>12.3.1006-rc.1</XamarinMacOSWorkloadManifestVersion>
|
||||
<XamarinTvOSWorkloadManifestVersion>15.4.1006-rc.1</XamarinTvOSWorkloadManifestVersion>
|
||||
<MauiFeatureBand>7.0.100</MauiFeatureBand>
|
||||
<MauiWorkloadManifestVersion>7.0.49</MauiWorkloadManifestVersion>
|
||||
<XamarinAndroidWorkloadManifestVersion>33.0.4</XamarinAndroidWorkloadManifestVersion>
|
||||
<XamarinIOSWorkloadManifestVersion>16.0.1478</XamarinIOSWorkloadManifestVersion>
|
||||
<XamarinMacCatalystWorkloadManifestVersion>15.4.2372</XamarinMacCatalystWorkloadManifestVersion>
|
||||
<XamarinMacOSWorkloadManifestVersion>12.3.2372</XamarinMacOSWorkloadManifestVersion>
|
||||
<XamarinTvOSWorkloadManifestVersion>16.0.1478</XamarinTvOSWorkloadManifestVersion>
|
||||
<MonoWorkloadManifestVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MonoWorkloadManifestVersion>
|
||||
<MicrosoftNETWorkloadEmscriptennet6Manifest70100Version>7.0.0</MicrosoftNETWorkloadEmscriptennet6Manifest70100Version>
|
||||
<MicrosoftNETWorkloadEmscriptennet7Manifest70100Version>7.0.0</MicrosoftNETWorkloadEmscriptennet7Manifest70100Version>
|
||||
|
|
|
@ -4,7 +4,19 @@ resources:
|
|||
pipelines:
|
||||
- pipeline: installer-build-resource
|
||||
source: dotnet-installer-official-ci
|
||||
trigger: true
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- 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
|
||||
|
||||
stages:
|
||||
- stage: build
|
||||
|
|
|
@ -6,11 +6,20 @@ jobs:
|
|||
displayName: Source-Build Create Tarball
|
||||
pool:
|
||||
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
||||
name: NetCore-Svc-Public
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
|
||||
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
|
||||
name: NetCore-Public-XL
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
|
||||
${{ else }}:
|
||||
name: NetCore-Svc-Public
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
|
||||
${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
||||
name: NetCore1ESPool-Svc-Internal
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
|
||||
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
|
||||
name: NetCore1ESPool-Internal-XL
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
|
||||
${{ else }}:
|
||||
name: NetCore1ESPool-Svc-Internal
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
|
||||
|
||||
variables:
|
||||
- name: _BuildConfig
|
||||
value: Release
|
||||
|
|
|
@ -17,10 +17,13 @@ parameters:
|
|||
poolInternalAmd64:
|
||||
name: NetCore1ESPool-Svc-Internal
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
|
||||
poolInternalAmd64PR:
|
||||
name: NetCore1ESPool-Internal-XL
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
|
||||
poolInternalArm64:
|
||||
name: Docker-Linux-Arm-Internal
|
||||
poolPublicAmd64:
|
||||
name: NetCore-Svc-Public
|
||||
name: NetCore-Public-XL
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
|
||||
|
||||
jobs:
|
||||
|
@ -68,24 +71,24 @@ jobs:
|
|||
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
||||
${{ parameters.poolPublicAmd64 }}
|
||||
${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
||||
${{ parameters.poolInternalAmd64 }}
|
||||
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
|
||||
${{ parameters.poolInternalAmd64PR }}
|
||||
${{ else }}:
|
||||
${{ parameters.poolInternalAmd64 }}
|
||||
|
||||
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
||||
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
|
||||
parameters:
|
||||
architecture: arm64
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
|
||||
excludeSdkContentTests: true
|
||||
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
|
||||
matrix:
|
||||
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
|
||||
Debian11-Offline:
|
||||
_BootstrapPrep: true
|
||||
_Container: ${{ parameters.debian11Arm64Container }}
|
||||
_EnablePoison: false
|
||||
_ExcludeOmniSharpTests: false
|
||||
_RunOnline: false
|
||||
Debian11-Offline:
|
||||
_BootstrapPrep: true
|
||||
_Container: ${{ parameters.debian11Arm64Container }}
|
||||
_EnablePoison: false
|
||||
_ExcludeOmniSharpTests: false
|
||||
_RunOnline: false
|
||||
name: Build_Tarball_arm64
|
||||
pool: ${{ parameters.poolInternalArm64 }}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<PropertyGroup>
|
||||
<Platform Condition="'$(Platform)' == 'AnyCPU'"></Platform>
|
||||
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
|
||||
<Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Platform>
|
||||
<Platform Condition="'$(Platform)' == '' AND ('$(BuildArchitecture)' == 'arm64' OR '$(BuildArchitecture)' == 'arm')">$(BuildArchitecture)</Platform>
|
||||
<Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 's390x'">$(BuildArchitecture)</Platform>
|
||||
<Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 'ppc64le'">$(BuildArchitecture)</Platform>
|
||||
<Platform Condition="'$(Platform)' == ''">x64</Platform>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"tools": {
|
||||
"dotnet": "7.0.100-rc.2.22477.23"
|
||||
"dotnet": "7.0.100"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.Build.CentralPackageVersions": "2.0.1",
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
|
||||
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
|
||||
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
|
||||
|
||||
<!-- CS0618 - Caused from deprecated IOperation.Children in
|
||||
Microsoft.CodeAnalysis 4.3.0, but aspnetcore references version 4.2.0.
|
||||
Requires https://github.com/dotnet/source-build/issues/2482 -->
|
||||
<RepoNoWarns>CS0618</RepoNoWarns>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
<RepositoryReference Include="runtime" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64'">
|
||||
<!-- Originally used to capture arm platforms. Now with support, left as an extension point for bringing up new architectures in the future. -->
|
||||
<When Condition="'true' == 'false'">
|
||||
<ItemGroup>
|
||||
<RepositoryReference Include="runtime" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
|
||||
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
|
||||
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
|
||||
|
||||
<!-- NU1507 - https://github.com/dotnet/razor-compiler/issues/242
|
||||
Occurs when using NuGet central package management without defining any Package Source Mappings. -->
|
||||
<RepoNoWarns>NU1507</RepoNoWarns>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<BuildCommandArgs>$(StandardSourceBuildArgs.Replace('-bl', '-nobl'))</BuildCommandArgs>
|
||||
|
||||
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
|
||||
<BuildCommand Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64'">$(ArmEnvironmentVariables) $(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
|
||||
<BuildCommand Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64' AND '$(BuildArchitecture)' != 'arm'">$(ArmEnvironmentVariables) $(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
|
||||
|
||||
<CleanCommand>$(ProjectDirectory)/clean$(ShellExtension)</CleanCommand>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -96,7 +96,7 @@ internal class DotNetHelper
|
|||
}
|
||||
}
|
||||
|
||||
public void ExecuteCmd(string args, string? workingDirectory = null, Action<Process>? additionalProcessConfigCallback = null, int expectedExitCode = 0, int millisecondTimeout = -1)
|
||||
public void ExecuteCmd(string args, string? workingDirectory = null, Action<Process>? additionalProcessConfigCallback = null, int? expectedExitCode = 0, int millisecondTimeout = -1)
|
||||
{
|
||||
(Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess(
|
||||
DotNetPath,
|
||||
|
@ -105,7 +105,9 @@ internal class DotNetHelper
|
|||
configure: (process) => configureProcess(process, workingDirectory),
|
||||
millisecondTimeout: millisecondTimeout);
|
||||
|
||||
ExecuteHelper.ValidateExitCode(executeResult, expectedExitCode);
|
||||
if (expectedExitCode != null) {
|
||||
ExecuteHelper.ValidateExitCode(executeResult, (int) expectedExitCode);
|
||||
}
|
||||
|
||||
void configureProcess(Process process, string? workingDirectory)
|
||||
{
|
||||
|
|
|
@ -13,20 +13,18 @@ public class DotNetWatchTests : SmokeTests
|
|||
{
|
||||
public DotNetWatchTests(ITestOutputHelper outputHelper) : base(outputHelper) { }
|
||||
|
||||
// TODO: Re-enable https://github.com/dotnet/source-build/issues/2961
|
||||
// [Fact]
|
||||
//[Fact] - Renable with https://github.com/dotnet/source-build/issues/3123
|
||||
public void WatchTests()
|
||||
{
|
||||
string projectDirectory = DotNetHelper.ExecuteNew(DotNetTemplate.Console.GetName(), nameof(DotNetWatchTests));
|
||||
bool outputChanged = false;
|
||||
|
||||
// We expect an exit code of 143 (128 + 15, i.e. SIGTERM) because we are killing the process manually
|
||||
DotNetHelper.ExecuteCmd(
|
||||
"watch run",
|
||||
workingDirectory: projectDirectory,
|
||||
additionalProcessConfigCallback: processConfigCallback,
|
||||
expectedExitCode: 143,
|
||||
millisecondTimeout: 30000);
|
||||
expectedExitCode: null, // The exit code does not reflect whether or not dotnet watch is working properly
|
||||
millisecondTimeout: 60000);
|
||||
|
||||
Assert.True(outputChanged);
|
||||
|
||||
|
@ -53,7 +51,7 @@ public class DotNetWatchTests : SmokeTests
|
|||
{
|
||||
outputChanged = true;
|
||||
OutputHelper.WriteLine("Successfully re-ran program after code change.");
|
||||
ExecuteHelper.ExecuteProcessValidateExitCode("kill", $"-s TERM {process.Id}", OutputHelper);
|
||||
process.Kill(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ internal static class ExecuteHelper
|
|||
|
||||
if (!process.HasExited)
|
||||
{
|
||||
outputHelper.WriteLine($"Killing: {fileName} {args}");
|
||||
outputHelper.WriteLine($"Process did not exit. Killing {fileName} {args} after waiting {millisecondTimeout} milliseconds.");
|
||||
process.Kill(true);
|
||||
process.WaitForExit();
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="GenerateRootFs" Condition="'$(OS)' != 'Windows_NT'">
|
||||
<Exec Condition="$(Platform.Contains('arm')) AND '$(Platform)' != 'armel' AND '$(BuildArchitecture)' != 'arm64'" Command="$(ArmEnvironmentVariables) $(ProjectDir)cross/build-rootfs.sh" />
|
||||
<Exec Condition="$(Platform.Contains('arm')) AND '$(Platform)' != 'armel' AND '$(BuildArchitecture)' != 'arm64' AND '$(BuildArchitecture)' != 'arm'" Command="$(ArmEnvironmentVariables) $(ProjectDir)cross/build-rootfs.sh" />
|
||||
<Exec Condition="'$(Platform)' == 'armel'" Command="$(ArmEnvironmentVariables) $(ProjectDir)cross/armel/tizen-build-rootfs.sh" />
|
||||
</Target>
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Logan Bussell <loganbussell@microsoft.com>
|
||||
Date: Thu, 12 May 2022 14:32:59 -0700
|
||||
Subject: [PATCH] Disable warning CS0618
|
||||
|
||||
This is needed because IOperation.Children is deprecated in
|
||||
Microsoft.CodeAnalysis 4.3.0, but aspnetcore references version 4.2.0.
|
||||
|
||||
Requires https://github.com/dotnet/source-build/issues/2482 in order to eliminate this patch
|
||||
---
|
||||
.../src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj b/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj
|
||||
index 0b94ad2a8f..1b5cb9d907 100644
|
||||
--- a/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj
|
||||
+++ b/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj
|
||||
@@ -9,6 +9,7 @@
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
||||
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
|
||||
+ <NoWarn>$(NoWarn);CS0618</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
|
@ -0,0 +1,23 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MichaelSimons <msimons@microsoft.com>
|
||||
Date: Fri, 11 Nov 2022 21:10:54 +0000
|
||||
Subject: [PATCH] ResolvePackageFileConflicts workaround
|
||||
|
||||
---
|
||||
.../App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
|
||||
index 3b5d2ae950..f92fb421fe 100644
|
||||
--- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
|
||||
+++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
|
||||
@@ -253,6 +253,9 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||
<ItemGroup>
|
||||
<!-- These files end up in this item group as a result of setting CopyLocalLockFileAssemblies, but shouldn't be. -->
|
||||
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(FileName)' == 'apphost' OR '%(FileName)' == '$(LibPrefix)hostfxr' OR '%(FileName)' == '$(LibPrefix)hostpolicy' "/>
|
||||
+
|
||||
+ <!-- TODO: Workaround ResolvePackageFileConflicts picking up the wrong file versions when conflicts exist - https://github.com/dotnet/aspnetcore/issues/45033 -->
|
||||
+ <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(FileName)' == 'System.Formats.Asn1' OR '%(FileName)' == 'System.Text.Encodings.Web' OR '%(FileName)' == 'System.Text.Json'"/>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Logan Bussell <loganbussell@microsoft.com>
|
||||
Date: Fri, 13 May 2022 16:14:14 -0700
|
||||
Subject: [PATCH] Add NoWarn for NU1507
|
||||
|
||||
This warning occurs when using NuGet central package management without defining
|
||||
any Package Source Mappings.
|
||||
|
||||
Workaround for: https://github.com/dotnet/razor-compiler/issues/242
|
||||
---
|
||||
Directory.Build.props | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Directory.Build.props b/Directory.Build.props
|
||||
index a57125f5..019ac376 100644
|
||||
--- a/Directory.Build.props
|
||||
+++ b/Directory.Build.props
|
||||
@@ -55,6 +55,7 @@
|
||||
<!-- Ensure API docs are available. -->
|
||||
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
|
||||
<NoWarn Condition=" '$(BuildingInsideVisualStudio)' == 'true' ">$(NoWarn);0105</NoWarn>
|
||||
+ <NoWarn>$(NoWarn);NU1507</NoWarn>
|
||||
|
||||
<!-- For local builds, don't make missing XML docs a fatal build error, but still surface so we have visibility into undocumented APIs. -->
|
||||
<WarningsNotAsErrors Condition=" '$(ContinuousIntegrationBuild)' != 'true' ">$(WarningsNotAsErrors);CS1591</WarningsNotAsErrors>
|
|
@ -447,7 +447,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)
|
||||
{
|
||||
|
@ -509,9 +519,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;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,27 @@
|
|||
BuildInParallel="False"
|
||||
Projects="@(CrossGenDownloadPackageProject)">
|
||||
</MSBuild>
|
||||
|
||||
|
||||
<!-- This PropertyGroup contains the paths to the various SDK tooling that should be
|
||||
cross-genned. This tooling multi-targets, and we only want to cross-gen the .NET Core
|
||||
targeted bits. Below, this propertygroup is used to verify that these paths exist as expected,
|
||||
no that we do not silently miss cross-genning some bits. When a TFM for a tool is updated,
|
||||
update its path explicitly. If all TFMs match, update DefaultToolTfm -->
|
||||
<PropertyGroup>
|
||||
<DefaultToolTfm>net7.0</DefaultToolTfm>
|
||||
|
||||
<NetSdkTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk\tools\$(DefaultToolTfm)\</NetSdkTools>
|
||||
<BlazorWasmTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\tools\$(DefaultToolTfm)\</BlazorWasmTools>
|
||||
<NuGetPackTools>$(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\</NuGetPackTools>
|
||||
<RazorTasks>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\$(DefaultToolTfm)\</RazorTasks>
|
||||
<WindowsDesktopTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\$(DefaultToolTfm)\</WindowsDesktopTools>
|
||||
<ILLinkTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.ILLink.Tasks\tools\$(DefaultToolTfm)\</ILLinkTools>
|
||||
<PublishTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\$(DefaultToolTfm)\</PublishTools>
|
||||
<WebTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web\tools\$(DefaultToolTfm)\</WebTools>
|
||||
<ProjectSystemTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\tools\$(DefaultToolTfm)\</ProjectSystemTools>
|
||||
<WorkerTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Worker\tools\$(DefaultToolTfm)\</WorkerTools>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<RoslynFiles Include="$(SdkOutputDirectory)Roslyn\bincore\**\*" />
|
||||
|
||||
|
@ -49,16 +69,16 @@
|
|||
<RemainingFiles Remove="$(SdkOutputDirectory)**\Microsoft.TestPlatform.Extensions.EventLogCollector.dll" />
|
||||
|
||||
<!-- Add back the .NET Core assemblies in the Sdks folder -->
|
||||
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk\tools\net6.0\**\*" />
|
||||
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\tools\net6.0\**\*" />
|
||||
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\**\*" />
|
||||
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\net6.0\**\*" />
|
||||
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\netcoreapp*\**\*" />
|
||||
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.ILLink.Tasks\tools\net5.0\**\*" />
|
||||
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\net6.0\**\*" />
|
||||
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web\tools\net6.0\**\*" />
|
||||
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\tools\net6.0\**\*" />
|
||||
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Worker\tools\net6.0\**\*" />
|
||||
<RemainingFiles Include="$(NetSdkTools)**\*" />
|
||||
<RemainingFiles Include="$(BlazorWasmTools)**\*" />
|
||||
<RemainingFiles Include="$(NuGetPackTools)**\*" />
|
||||
<RemainingFiles Include="$(RazorTasks)**\*" />
|
||||
<RemainingFiles Include="$(WindowsDesktopTools)**\*" />
|
||||
<RemainingFiles Include="$(ILLinkTools)**\*" />
|
||||
<RemainingFiles Include="$(PublishTools)**\*" />
|
||||
<RemainingFiles Include="$(WebTools)**\*" />
|
||||
<RemainingFiles Include="$(ProjectSystemTools)**\*" />
|
||||
<RemainingFiles Include="$(WorkerTools)**\*" />
|
||||
|
||||
<!-- Don't try to CrossGen .NET Framework support assemblies for .NET Standard -->
|
||||
<RemainingFiles Remove="$(SdkOutputDirectory)Microsoft\Microsoft.NET.Build.Extensions\net*\**\*" />
|
||||
|
@ -121,6 +141,21 @@
|
|||
<CreateCrossgenSymbols Condition="'$(OSName)' == 'freebsd'">false</CreateCrossgenSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<Error Text="Potentially missed crossgen for '$(NetSdkTools)', directory does not exist" Condition= "!EXISTS('$(NetSdkTools)') "/>
|
||||
<Error Text="Potentially missed crossgen for '$(BlazorWasmTools)', directory does not exist" Condition= "!EXISTS('$(BlazorWasmTools)') "/>
|
||||
<Error Text="Potentially missed crossgen for '$(NuGetPackTools)', directory does not exist" Condition= "!EXISTS('$(NuGetPackTools)') "/>
|
||||
<Error Text="Potentially missed crossgen for '$(RazorTasks)', directory does not exist" Condition= "!EXISTS('$(RazorTasks)') "/>
|
||||
<Error Text="Potentially missed crossgen for '$(WindowsDesktopTools)', directory does not exist" Condition= "!EXISTS('$(WindowsDesktopTools)') AND '$(DotNetBuildFromSource)' != 'true'"/>
|
||||
<Error Text="Potentially missed crossgen for '$(ILLinkTools)', directory does not exist" Condition= "!EXISTS('$(ILLinkTools)') "/>
|
||||
<Error Text="Potentially missed crossgen for '$(PublishTools)', directory does not exist" Condition= "!EXISTS('$(PublishTools)') "/>
|
||||
<Error Text="Potentially missed crossgen for '$(WebTools)', directory does not exist" Condition= "!EXISTS('$(WebTools)') "/>
|
||||
<Error Text="Potentially missed crossgen for '$(ProjectSystemTools)', directory does not exist" Condition= "!EXISTS('$(ProjectSystemTools)') "/>
|
||||
<Error Text="Potentially missed crossgen for '$(WorkerTools)', directory does not exist" Condition= "!EXISTS('$(WorkerTools)') "/>
|
||||
<Error Text="Potentially missed crossgen for Roslyn, RoslynTargets is empty" Condition= "@(RoslynTargets) == ''"/>
|
||||
<Error Text="Potentially missed crossgen for FSharp, FSharpTargets is empty" Condition= "@(FSharpTargets) == ''"/>
|
||||
<Error Text="Potentially missed crossgen for Razor, RazorToolTargets is empty" Condition= "@(RazorToolTargets) == ''"/>
|
||||
<Error Text="Potentially missed crossgen for other SDK files, RemainingTargets is empty" Condition= "@(RemainingTargets) == ''"/>
|
||||
|
||||
<Crossgen
|
||||
SourceAssembly="%(RoslynTargets.FullPath)"
|
||||
DestinationPath="%(RoslynTargets.FullPath)"
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<VersionFeature21>30</VersionFeature21>
|
||||
<VersionFeature31>$([MSBuild]::Add($(VersionFeature), 30))</VersionFeature31>
|
||||
<VersionFeature31>32</VersionFeature31>
|
||||
<VersionFeature50>17</VersionFeature50>
|
||||
<VersionFeature60>$([MSBuild]::Add($(VersionFeature), 10))</VersionFeature60>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -4,6 +4,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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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=""[WixBundleLog_Finalizer]" $(var.NugetVersion) $(var.Platform)"
|
||||
Vital="no" />
|
||||
|
||||
<MsiPackage SourceFile="$(var.SharedFXMsiSourcePath)">
|
||||
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
|
||||
</MsiPackage>
|
||||
|
@ -208,20 +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)"
|
||||
Cache="always"
|
||||
DetectCondition="WixBundleAction >= 3"
|
||||
Id="Finalizer"
|
||||
InstallCondition="WixBundleAction >= 4"
|
||||
UninstallCommand=""[WixBundleLog_Finalizer]" $(var.NugetVersion) $(var.Platform)"
|
||||
Vital="no" />
|
||||
|
||||
</Chain>
|
||||
</Bundle>
|
||||
|
||||
|
|
24
test/EndToEnd/TelemetryOptOutDefaultTests.cs
Normal file
24
test/EndToEnd/TelemetryOptOutDefaultTests.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System.IO;
|
||||
using FluentAssertions;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
|
||||
namespace EndToEnd.Tests
|
||||
{
|
||||
public class TelemetryOptOutDefault : TestBase
|
||||
{
|
||||
[Fact]
|
||||
public void TelemetryOptOutDefaultAttribute()
|
||||
{
|
||||
var versionCommand = new DotnetCommand()
|
||||
.ExecuteWithCapturedOutput("--version");
|
||||
|
||||
var sdkVersion = versionCommand.StdOut.Trim();
|
||||
|
||||
var dotnetdir = Path.Combine(Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest), "sdk", sdkVersion);
|
||||
|
||||
var result = AssemblyInfo.Get(Path.Combine(dotnetdir, "dotnet.dll"), "AssemblyMetadataAttribute");
|
||||
result.Should().Contain("TelemetryOptOutDefault:False");
|
||||
}
|
||||
}
|
||||
}
|
78
test/Microsoft.DotNet.Tools.Tests.Utilities/AssemblyInfo.cs
Normal file
78
test/Microsoft.DotNet.Tools.Tests.Utilities/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,78 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection.Metadata;
|
||||
using System.Reflection.PortableExecutable;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||
{
|
||||
public static class AssemblyInfo
|
||||
{
|
||||
public static IList<string> Get(string assemblyPath, string assemblyInfoName)
|
||||
{
|
||||
var list = new List<string>();
|
||||
|
||||
using (var stream = File.OpenRead(assemblyPath))
|
||||
using (var peReader = new PEReader(stream))
|
||||
{
|
||||
var metadataReader = peReader.GetMetadataReader();
|
||||
var assemblyDefinition = metadataReader.GetAssemblyDefinition();
|
||||
|
||||
foreach (var handle in assemblyDefinition.GetCustomAttributes())
|
||||
{
|
||||
var attribute = metadataReader.GetCustomAttribute(handle);
|
||||
var constructor = metadataReader.GetMemberReference((MemberReferenceHandle)attribute.Constructor);
|
||||
var type = metadataReader.GetTypeReference((TypeReferenceHandle)constructor.Parent);
|
||||
var name = metadataReader.GetString(type.Name);
|
||||
|
||||
if (name.Equals(assemblyInfoName))
|
||||
{
|
||||
var signature = metadataReader.GetBlobReader(constructor.Signature);
|
||||
var value = metadataReader.GetBlobReader(attribute.Value);
|
||||
var header = signature.ReadSignatureHeader();
|
||||
|
||||
const ushort prolog = 1; // two-byte "prolog" defined by ECMA-335 (II.23.3) to be at the beginning of attribute value blobs
|
||||
if (value.ReadUInt16() != prolog || header.Kind != SignatureKind.Method || header.IsGeneric)
|
||||
{
|
||||
throw new BadImageFormatException();
|
||||
}
|
||||
|
||||
var paramCount = signature.ReadCompressedInteger();
|
||||
if (paramCount <= 0 || // must have at least 1 parameter
|
||||
signature.ReadSignatureTypeCode() != SignatureTypeCode.Void) // return type must be void
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var sb = new StringBuilder();
|
||||
while (paramCount > 0 && sb != null)
|
||||
{
|
||||
switch (signature.ReadSignatureTypeCode())
|
||||
{
|
||||
case SignatureTypeCode.String:
|
||||
sb.Append(value.ReadSerializedString());
|
||||
break;
|
||||
default:
|
||||
sb = null;
|
||||
break;
|
||||
}
|
||||
|
||||
paramCount--;
|
||||
if (paramCount != 0)
|
||||
{
|
||||
sb?.Append(':');
|
||||
}
|
||||
}
|
||||
|
||||
if (sb != null)
|
||||
{
|
||||
list.Add(sb.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue