Skip to content

Commit 41ce223

Browse files
authored
Replace Internal.AspNetCore.Sdk with Microsoft.DotNet.Arcade.Sdk (#10674)
* Update build.cmd to install .NET Core into $repoRoot/.dotnet instead of $repoRoot/.dotnet/x64 * Move restore sources from build/sources.props into eng/Versions.props (following arcade conventions) * Remove usages of RuntimeFrameworkVersion in tests and build * Update Blazor VSIX to use Arcade VSIX tools * Rename Common.Tests to IIS.Common.TestLib and make it a test asset * Remove custom versions props for ANCM installer code * Remove duplicate references to xunit and remove usages of IsTestProject * Remove duplicate references to Internal.AspNetCore.Analyzers * Import Arcade.Sdk props and targets and remove custom versioning props * Remove references to Internal.AspNetCore.Sdk * Rename PackageLicenseType => PackageLicenseExpression * Remove dependency on tasks in Internal.AspNetCore.Sdk, add ref to Internal.AspNetCore.BuildTasks as a temporary workaround * Use Arcade's nuspec support * Rename SignalR.Client.FunctionalTests to SignalR.Client.FunctionalTestApp * Fixes for changes to property evaluation order * Update BaseLineGenerator to netcoreapp3.0 * React to changes in evaluation order in RPM files and quirks in using <Exec> instead of <Run> * Update Microsoft.Extensions.ApiDescription.Server to react to changes in Arcade packaging * Workaround aspnet/AspNetCore#11009
1 parent b5adc6b commit 41ce223

File tree

149 files changed

+568
-1111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+568
-1111
lines changed

.azure/pipelines/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ jobs:
4040
agentOs: Windows
4141
steps:
4242
- script: "echo ##vso[build.addbuildtag]daily-build"
43-
condition: and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['IsFinalBuild'], 'true'))
43+
condition: and(ne(variables['Build.Reason'], 'PullRequest'), notin(variables['DotNetFinalVersionKind'], 'release', 'prerelease'))
4444
displayName: 'Set CI tags'
4545
- script: "echo ##vso[build.addbuildtag]release-candidate"
46-
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['IsFinalBuild'], 'true'))
46+
condition: and(ne(variables['Build.Reason'], 'PullRequest'), in(variables['DotNetFinalVersionKind'], 'release', 'prerelease'))
4747
displayName: 'Set CI tags'
4848
# !!! NOTE !!! Some of these steps have disabled code signing.
4949
# This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even

Directory.Build.props

Lines changed: 43 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,48 @@
11
<Project>
2-
<Import Project="version.props" />
3-
4-
<!--
5-
These imports look funny.
6-
Eventually they will be replaced by a simplified import that brings in
7-
the entire Arcade SDK. For now, we're moving onto Arcade one piece at a time.
8-
-->
9-
<Import Project="../tools/DefaultVersions.Generated.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
10-
<Import Project="eng\Versions.props" />
11-
<Import Project="../tools/Compiler.props" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(UsingToolMicrosoftNetCompilers)' == 'true'"/>
122

3+
<!-- Defines project type conventions. -->
134
<PropertyGroup>
14-
<Product>Microsoft ASP.NET Core</Product>
5+
<RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>
6+
7+
<IsReferenceAssemblyProject>false</IsReferenceAssemblyProject>
8+
<IsReferenceAssemblyProject Condition="$(MSBuildProjectDirectory.EndsWith('ref'))">true</IsReferenceAssemblyProject>
9+
<OutDirName Condition="'$(IsReferenceAssemblyProject)' == 'true'">$(MSBuildProjectName)-ref</OutDirName>
10+
11+
<IsBenchmarkProject Condition="$(MSBuildProjectName.EndsWith('.Performance')) OR $(RepoRelativeProjectDir.Contains('perf'))">true</IsBenchmarkProject>
12+
<IsSpecificationTestProject Condition="$(MSBuildProjectName.EndsWith('.Specification.Tests'))">true</IsSpecificationTestProject>
13+
<IsUnitTestProject>false</IsUnitTestProject>
14+
<IsUnitTestProject Condition="'$(IsSpecificationTestProject)' != 'true' and ( $(MSBuildProjectName.EndsWith('Tests')) or $(MSBuildProjectName.EndsWith('.Test')) or $(MSBuildProjectName.EndsWith('.FunctionalTest')) )">true</IsUnitTestProject>
15+
<IsTestAssetProject Condition="$(RepoRelativeProjectDir.Contains('testassets'))">true</IsTestAssetProject>
16+
<IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('sample'))">true</IsSampleProject>
17+
<IsAnalyzersProject Condition="$(MSBuildProjectName.EndsWith('.Analyzers'))">true</IsAnalyzersProject>
18+
<IsShipping Condition="'$(IsSampleProject)' == 'true' or '$(IsTestAssetProject)' == 'true' or '$(IsBenchmarkProject)' == 'true' or '$(IsUnitTestProject)' == 'true'">false</IsShipping>
19+
</PropertyGroup>
20+
21+
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
1522

16-
<Authors>Microsoft</Authors>
17-
<Company>Microsoft Corporation.</Company>
18-
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
19-
<NeutralLanguage>en-US</NeutralLanguage>
23+
<PropertyGroup>
2024

21-
<!-- Package settings -->
25+
<Product>Microsoft ASP.NET Core</Product>
26+
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
2227

23-
<PackageLicenseUrl>https://raw.githubusercontent.com/aspnet/AspNetCore/2.0.0/LICENSE.txt</PackageLicenseUrl>
2428
<!-- The SPDX name for the source license. See https://spdx.org/licenses/. -->
25-
<PackageLicenseType>Apache-2.0</PackageLicenseType>
29+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
2630

2731
<!-- Contact email address for NuGet packages and Linux installers. -->
2832
<MaintainerEmail>[email protected]</MaintainerEmail>
2933

3034
<PackageIconUrl>https://go.microsoft.com/fwlink/?LinkID=288859</PackageIconUrl>
3135
<PackageProjectUrl>https://asp.net</PackageProjectUrl>
32-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
33-
<Serviceable>true</Serviceable>
36+
<NuspecBasePath>$(MSBuildProjectDirectory)</NuspecBasePath>
3437

35-
<IncludeSource>false</IncludeSource>
3638
<IncludeSymbols>true</IncludeSymbols>
3739

3840
<DefaultNetCoreTargetFramework>netcoreapp$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</DefaultNetCoreTargetFramework>
39-
40-
<SharedFxProductName>$(Product) $(PackageVersion) Shared Framework</SharedFxProductName>
41-
<SharedFxDescription>Shared Framework for hosting of Microsoft ASP.NET Core applications. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub ($(RepositoryUrl)). We happily accept issues and PRs.</SharedFxDescription>
42-
43-
<RuntimeInstallerBaseName>aspnetcore-runtime</RuntimeInstallerBaseName>
44-
<TargetingPackInstallerBaseName>aspnetcore-targeting-pack</TargetingPackInstallerBaseName>
45-
<!--
46-
Archives and installers using this prefix are intended for internal-use only.
47-
For example, this .zip is used to handoff bits to partner teams who then incorporate our shared frameworks
48-
into their own installers.
49-
-->
50-
<InternalInstallerBaseName>$(RuntimeInstallerBaseName)-internal</InternalInstallerBaseName>
5141
</PropertyGroup>
5242

5343
<!-- Warnings and errors -->
5444
<PropertyGroup>
5545
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
56-
<!--
57-
Suppress NuGet warning about upcoming deprecation of PackageLicenseUrl. When embedding licenses are supported,
58-
replace PackageLicenseUrl with PackageLicenseExpression.
59-
-->
60-
<NoWarn>$(NoWarn);NU5125</NoWarn>
61-
<!-- Suppress NuGet warnings about using SemVer 2.0. -->
62-
<NoWarn>$(NoWarn);NU5105</NoWarn>
6346
<!-- Don't make missing XML docs a fatal build error, but still surface so we have visibility into undocumented APIs. -->
6447
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS1591</WarningsNotAsErrors>
6548
<!-- xUnit1004 = warns about skipped tests. Make this a non-fatal build warning. -->
@@ -75,28 +58,36 @@
7558
<GoogleTestSubmoduleRoot>$(RepoRoot)src\submodules\googletest\</GoogleTestSubmoduleRoot>
7659
<!-- Embed source files that are not tracked by the source control manager in the PDB. -->
7760
<EmbedUntrackedSources>true</EmbedUntrackedSources>
78-
<!-- Additional assembly attributes are already configured to include the source revision ID. -->
79-
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
8061

8162
<!-- These project types are disabled because the presence of a PackageReference causes issues for NuGet. -->
8263
<DisableSourceLink Condition="'$(MSBuildProjectExtension)' == '.debproj' OR '$(MSBuildProjectExtension)' == '.rpmproj'">true</DisableSourceLink>
8364
</PropertyGroup>
8465

85-
<ItemGroup Condition="'$(DisableSourceLink)' != 'true'">
86-
<!-- See https://github.com/dotnet/sourcelink -->
87-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubPackageVersion)" PrivateAssets="All" AllowExplicitReference="true" />
88-
<PackageReference Include="Microsoft.SourceLink.Vsts.Git" Version="$(MicrosoftSourceLinkVstsGitPackageVersion)" PrivateAssets="All" AllowExplicitReference="true" />
89-
</ItemGroup>
66+
<PropertyGroup>
67+
<SharedFxName>Microsoft.AspNetCore.App</SharedFxName>
68+
<SharedFxDescription>Shared Framework for hosting of Microsoft ASP.NET Core applications. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub ($(RepositoryUrl)). We happily accept issues and PRs.</SharedFxDescription>
69+
70+
<TargetingPackName>Microsoft.AspNetCore.App.Ref</TargetingPackName>
71+
<RuntimeInstallerBaseName>aspnetcore-runtime</RuntimeInstallerBaseName>
72+
<TargetingPackInstallerBaseName>aspnetcore-targeting-pack</TargetingPackInstallerBaseName>
73+
74+
<!-- Used to only produce targeting pack installers/packages once per major.minor. -->
75+
<IsTargetingPackBuilding Condition="'$(IsServicingBuild)' == 'true' AND '$(DotNetBuildFromSource)' != 'true'">false</IsTargetingPackBuilding>
76+
77+
<!--
78+
Archives and installers using this prefix are intended for internal-use only.
79+
For example, this .zip is used to handoff bits to partner teams who then incorporate our shared frameworks
80+
into their own installers.
81+
-->
82+
<InternalInstallerBaseName>$(RuntimeInstallerBaseName)-internal</InternalInstallerBaseName>
83+
</PropertyGroup>
9084

9185
<ItemGroup Condition="'$(DisablePubternalApiCheck)' != 'true' AND '$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsTestAssetProject)' != 'true'">
92-
<PackageReference Include="Internal.AspNetCore.Analyzers" PrivateAssets="All" Version="$(InternalAspNetCoreAnalyzersPackageVersion)" AllowExplicitReference="true" />
86+
<PackageReference Include="Internal.AspNetCore.Analyzers" PrivateAssets="All" Version="$(InternalAspNetCoreAnalyzersPackageVersion)" IsImplicitlyDefined="true" />
9387
</ItemGroup>
9488

9589
<!-- Compilation options which apply to all languages. Language-specific options should be set in eng/targets/$(lang).Common.props -->
9690
<PropertyGroup>
97-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
98-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
99-
<PlatformName Condition=" '$(PlatformName)' == '' ">$(Platform)</PlatformName>
10091
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Windows'))">win</TargetOsName>
10192
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">osx</TargetOsName>
10293
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Linux'))">linux</TargetOsName>
@@ -119,73 +110,28 @@
119110
<!-- Make error messages clickable in VS Code's console -->
120111
<GenerateFullPaths Condition="'$(VSCODE_CWD)' != '' OR '$(TERM_PROGRAM)' == 'vscode'">true</GenerateFullPaths>
121112

122-
<!-- Suppress the message about using a preview version of .NET Core SDK. We are okay with this and don't need the warning. -->
123-
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
124-
125113
<!-- Fixes a common error in targets implementing a NoBuild mode. -->
126114
<BuildProjectReferences Condition=" '$(NoBuild)' == 'true' ">false</BuildProjectReferences>
127-
128-
<IsReferenceAssemblyProject>false</IsReferenceAssemblyProject>
129-
<IsReferenceAssemblyProject Condition="$(MSBuildProjectDirectory.EndsWith('ref'))">true</IsReferenceAssemblyProject>
130-
<OutDirName Condition="'$(IsReferenceAssemblyProject)' == 'true'">$(MSBuildProjectName)-ref</OutDirName>
131115
</PropertyGroup>
132116

133-
<Import Project="build\sources.props" />
134-
135117
<!-- Artifacts layout -->
136118
<PropertyGroup>
137-
<ArtifactsDir>$(MSBuildThisFileDirectory)artifacts\</ArtifactsDir>
138-
<ArtifactsObjDir>$(ArtifactsDir)obj\</ArtifactsObjDir>
139-
<ArtifactsBinDir>$(ArtifactsDir)bin\</ArtifactsBinDir>
140-
<ArtifactsConfigurationDir>$(ArtifactsDir)$(Configuration)\</ArtifactsConfigurationDir>
141-
<ArtifactsPackagesDir>$(ArtifactsDir)packages\$(Configuration)\</ArtifactsPackagesDir>
142-
<ArtifactsShippingPackagesDir>$(ArtifactsPackagesDir)Shipping\</ArtifactsShippingPackagesDir>
143-
<ArtifactsNonShippingPackagesDir>$(ArtifactsPackagesDir)NonShipping\</ArtifactsNonShippingPackagesDir>
144119
<InstallersOutputPath>$(ArtifactsDir)installers\$(Configuration)\</InstallersOutputPath>
145-
<VisualStudioSetupOutputPath>$(ArtifactsDir)VSSetup\$(Configuration)\</VisualStudioSetupOutputPath>
146120
</PropertyGroup>
147121

148122
<!-- Ensure these output paths exist. -->
149123
<ItemGroup>
150-
<CreateDirectory Include="$(ArtifactsShippingPackagesDir)" />
151-
<CreateDirectory Include="$(ArtifactsNonShippingPackagesDir)" />
152124
<CreateDirectory Include="$(InstallersOutputPath)" />
153125
<CreateDirectory Include="$(VisualStudioSetupOutputPath)" />
154126
</ItemGroup>
155127

156-
<PropertyGroup>
157-
<OutDirName Condition=" '$(OutDirName)' == '' ">$(MSBuildProjectName)</OutDirName>
158-
159-
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$([System.IO.Path]::GetFullPath('$(ArtifactsBinDir)$(OutDirName)\'))</BaseOutputPath>
160-
<OutputPath Condition=" '$(PlatformName)' == 'AnyCPU' ">$(BaseOutputPath)$(Configuration)\</OutputPath>
161-
<OutputPath Condition=" '$(PlatformName)' != 'AnyCPU' ">$(BaseOutputPath)$(PlatformName)\$(Configuration)\</OutputPath>
162-
163-
<BaseIntermediateOutputPath Condition=" '$(BaseIntermediateOutputPath)' == '' ">$([System.IO.Path]::GetFullPath('$(ArtifactsObjDir)$(OutDirName)\'))</BaseIntermediateOutputPath>
164-
<IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
165-
<IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
166-
</PropertyGroup>
167-
168128
<!-- The location of the local installation of the .NET Core shared framework. -->
169129
<PropertyGroup>
170-
<LocalDotNetRoot Condition="'$(TargetOSName)' == 'win'">$(RepoRoot).dotnet\$(TargetArchitecture)\</LocalDotNetRoot>
171-
<LocalDotNetRoot Condition="'$(TargetOSName)' != 'win'">$(RepoRoot).dotnet\</LocalDotNetRoot>
130+
<LocalDotNetRoot>$(RepoRoot).dotnet\</LocalDotNetRoot>
172131
<!-- Override the SDK default and point to local .dotnet folder. -->
173132
<NetCoreTargetingPackRoot>$(LocalDotNetRoot)packs\</NetCoreTargetingPackRoot>
174133
</PropertyGroup>
175134

176-
<!-- Defines project type conventions. -->
177-
<PropertyGroup>
178-
<RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>
179-
180-
<IsBenchmarkProject Condition="$(MSBuildProjectName.EndsWith('.Performance')) OR $(RepoRelativeProjectDir.Contains('perf'))">true</IsBenchmarkProject>
181-
<IsTestProject Condition="$(MSBuildProjectName.EndsWith('Tests')) OR $(MSBuildProjectName.EndsWith('.Test'))">true</IsTestProject>
182-
<IsTestAssetProject Condition="$(RepoRelativeProjectDir.Contains('testassets'))">true</IsTestAssetProject>
183-
<IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('sample'))">true</IsSampleProject>
184-
<IsAnalyzersProject Condition="$(MSBuildProjectName.EndsWith('.Analyzers'))">true</IsAnalyzersProject>
185-
<IsSpecificationTestProject Condition="$(MSBuildProjectName.EndsWith('.Specification.Tests'))">true</IsSpecificationTestProject>
186-
187-
</PropertyGroup>
188-
189135
<Import Project="build\tasks\RepoTasks.tasks" Condition="'$(MSBuildProjectName)' != 'RepoTasks' AND '$(DesignTimeBuild)' != 'true'" />
190136

191137
<PropertyGroup>

Directory.Build.targets

Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<Project>
2-
<!-- Properties which should be set after the project has been evaluated -->
32

43
<PropertyGroup>
54
<!--
@@ -12,10 +11,27 @@
1211
By default, assemblies which are only in the Microsoft.AspNetCore.App shared framework are not available as NuGet packages.
1312
-->
1413
<IsPackable Condition="'$(IsAspNetCoreApp)' == 'true' AND '$(IsShippingPackage)' != 'true'">false</IsPackable>
14+
</PropertyGroup>
15+
16+
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
17+
<!-- Properties which should be set after the project has been evaluated -->
18+
19+
<PropertyGroup Label="Versioning settings">
20+
<!-- The 'human friendly' version to display in installers. In pre-release builds, this might be "2.0.7 Preview 2 Build 12356". In final builds, it should be "2.0.7" -->
21+
<BrandingVersionSuffix>$(PreReleaseBrandingLabel) Build $(VersionSuffix)</BrandingVersionSuffix>
22+
<PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion>
23+
<PackageBrandingVersion Condition=" '$(VersionSuffix)' != '' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion>
24+
25+
<PackageVersion Condition=" '$(PackageVersion)' == '' ">$(Version)</PackageVersion>
26+
<SharedFxVersion>$(PackageVersion)</SharedFxVersion>
1527

16-
<PackageOutputPath Condition=" '$(IsShippingPackage)' == 'true' ">$(ArtifactsShippingPackagesDir)</PackageOutputPath>
17-
<PackageOutputPath Condition=" '$(IsShippingPackage)' != 'true' ">$(ArtifactsNonShippingPackagesDir)</PackageOutputPath>
28+
<TargetingPackVersion>$(TargetingPackVersionPrefix)</TargetingPackVersion>
29+
<TargetingPackVersion Condition=" '$(VersionSuffix)' != '' ">$(TargetingPackVersionPrefix)-$(VersionSuffix)</TargetingPackVersion>
1830

31+
<SharedFxProductName>$(Product) $(PackageVersion) Shared Framework</SharedFxProductName>
32+
</PropertyGroup>
33+
34+
<PropertyGroup>
1935
<!-- Analyzers package are special. In general, they should not have dependencies in the nuspec. Analyzer assemblies are not meant to be used for compilation or runtime. -->
2036
<SuppressDependenciesWhenPacking Condition="'$(SuppressDependenciesWhenPacking)' == '' AND '$(IsAnalyzersProject)' == 'true'">true</SuppressDependenciesWhenPacking>
2137
</PropertyGroup>
@@ -68,14 +84,9 @@
6884
<HasReferenceAssembly Condition="'$(HasReferenceAssembly)' == '' AND '$(IsProjectReferenceProvider)' == 'true'">true</HasReferenceAssembly>
6985
<HasReferenceAssembly Condition="'$(HasReferenceAssembly)' == ''">false</HasReferenceAssembly>
7086

71-
<!-- Suppress KoreBuild warnings about the mismatch of repo version and local project version. The versioning in this mega repo is sufficiently complicated that KoreBuild's validation isn't helpful. -->
72-
<VerifyVersion>false</VerifyVersion>
73-
7487
<IsPackable Condition="'$(IsPackable)' == '' AND ('$(IsImplementationProject)' == 'true' OR '$(IsAnalyzersProject)' == 'true') ">true</IsPackable>
7588
<IsPackable Condition="'$(IsPackable)' == '' ">false</IsPackable>
7689

77-
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
78-
7990
<BuildHelixPayload Condition="'$(BuildHelixPayload)' == '' AND '$(IsTestProject)' == 'true'">true</BuildHelixPayload>
8091
</PropertyGroup>
8192

@@ -104,35 +115,6 @@
104115

105116
</ItemGroup>
106117

107-
<!-- Copied from https://github.com/dotnet/arcade/blob/9d0fd805448082c8d55e2434607b481bca70a146/src/Microsoft.DotNet.Arcade.Sdk/tools/RepositoryInfo.targets#L12-L38 -->
108-
<Target Name="_TranslateAzureDevOpsUrlToGitHubUrl"
109-
DependsOnTargets="$(SourceControlManagerUrlTranslationTargets)"
110-
BeforeTargets="SourceControlManagerPublishTranslatedUrls">
111-
112-
<!-- The convention for names of Azure DevOps repositories mirrored from GitHub is "{GitHub org name}-{GitHub repository name}" -->
113-
<PropertyGroup>
114-
<!-- There are quite a few git repo forms:
115-
https://[email protected]/dnceng/internal/_git/dotnet-arcade-services
116-
https://dev.azure.com/dnceng/internal/_git/dotnet-arcade-services
117-
https://dnceng.visualstudio.com/internal/_git/dotnet-arcade-services
118-
[email protected]:v3/dnceng/internal/dotnet-arcade-services
119-
[email protected]:v3/dnceng/internal/dotnet-arcade-services
120-
-->
121-
<_Pattern>(https://dnceng%40dev\.azure\.com/dnceng/internal/_git|https://dev\.azure\.com/dnceng/internal/_git|https://dnceng\.visualstudio\.com/internal/_git|dnceng%40vs-ssh\.visualstudio\.com:v3/dnceng/internal|git%40ssh\.dev\.azure\.com:v3/dnceng/internal)/([^/-]+)-(.+)</_Pattern>
122-
<_Replacement>https://github.com/$2/$3</_Replacement>
123-
</PropertyGroup>
124-
125-
<PropertyGroup>
126-
<ScmRepositoryUrl>$([System.Text.RegularExpressions.Regex]::Replace($(ScmRepositoryUrl), $(_Pattern), $(_Replacement)))</ScmRepositoryUrl>
127-
</PropertyGroup>
128-
129-
<ItemGroup>
130-
<SourceRoot Update="@(SourceRoot)">
131-
<ScmRepositoryUrl>$([System.Text.RegularExpressions.Regex]::Replace(%(SourceRoot.ScmRepositoryUrl), $(_Pattern), $(_Replacement)))</ScmRepositoryUrl>
132-
</SourceRoot>
133-
</ItemGroup>
134-
</Target>
135-
136118
<Import Project="eng\Workarounds.targets" />
137119
<Import Project="eng\targets\ResolveIisReferences.targets" Condition=" '$(MSBuildProjectExtension)' != '.vcxproj' " />
138120
<Import Project="eng\targets\Cpp.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.vcxproj'" />

0 commit comments

Comments
 (0)