Merge branch 'main' of https://github.com/dotnet/installer into TestProjectValidation
This commit is contained in:
commit
9faacebc1b
11 changed files with 659 additions and 227 deletions
21
.config/1espt/PipelineAutobaseliningConfig.yml
Normal file
21
.config/1espt/PipelineAutobaseliningConfig.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.
|
||||
|
||||
pipelines:
|
||||
286:
|
||||
retail:
|
||||
binary:
|
||||
credscan:
|
||||
lastModifiedDate: 2024-03-15
|
||||
binskim:
|
||||
lastModifiedDate: 2024-03-15
|
||||
spotbugs:
|
||||
lastModifiedDate: 2024-03-15
|
||||
source:
|
||||
credscan:
|
||||
lastModifiedDate: 2024-03-15
|
||||
eslint:
|
||||
lastModifiedDate: 2024-03-15
|
||||
psscriptanalyzer:
|
||||
lastModifiedDate: 2024-03-15
|
||||
armory:
|
||||
lastModifiedDate: 2024-03-15
|
225
.config/guardian/.gdnbaselines
Normal file
225
.config/guardian/.gdnbaselines
Normal file
|
@ -0,0 +1,225 @@
|
|||
{
|
||||
"properties": {
|
||||
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/baselines"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"baselines": {
|
||||
"default": {
|
||||
"name": "default",
|
||||
"createdDate": "2024-03-15 21:07:20Z",
|
||||
"lastUpdatedDate": "2024-03-15 21:07:20Z"
|
||||
}
|
||||
},
|
||||
"results": {
|
||||
"9fcdc81730d500a234ad1fcd1a18108502b8c50c48567b91176c8e26f6bc5d34": {
|
||||
"signature": "9fcdc81730d500a234ad1fcd1a18108502b8c50c48567b91176c8e26f6bc5d34",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/nuget.config",
|
||||
"line": 9,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0060",
|
||||
"createdDate": "2024-03-15 21:07:20Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"8814a931c03f7ee625e291e19f2f5671357142600639b0143a3c46631b864e93": {
|
||||
"signature": "8814a931c03f7ee625e291e19f2f5671357142600639b0143a3c46631b864e93",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/dlabnugetcert.pfx",
|
||||
"line": 1,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0020",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"29ef09fbcdcda70063644424ad6a64c7aaae97e31b89c31c89b631eab56252e9": {
|
||||
"signature": "29ef09fbcdcda70063644424ad6a64c7aaae97e31b89c31c89b631eab56252e9",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/dynamicsha1.pfx",
|
||||
"line": 1,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0020",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"5801a584cc6df8c732f18f7abc1b1ccf64ab2a6ddbb05f9bbdde8beb5a67fe3a": {
|
||||
"signature": "5801a584cc6df8c732f18f7abc1b1ccf64ab2a6ddbb05f9bbdde8beb5a67fe3a",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/dynamicsha2.pfx",
|
||||
"line": 1,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0020",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"cab715138e57370e027c311bdcfcd828aef2e813338eb9b6db44c222132dcc43": {
|
||||
"signature": "cab715138e57370e027c311bdcfcd828aef2e813338eb9b6db44c222132dcc43",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/testdlab.pfx",
|
||||
"line": 1,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0020",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"69fdade2005d4c82978110367d00ff0b563d127022c89cc13d9130ff08811249": {
|
||||
"signature": "69fdade2005d4c82978110367d00ff0b563d127022c89cc13d9130ff08811249",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/testdlabsha2.pfx",
|
||||
"line": 1,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0020",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"efe01799a8cef937301b58208e2b347b9f5c534d89815d9843d75be7b2e2fb43": {
|
||||
"signature": "efe01799a8cef937301b58208e2b347b9f5c534d89815d9843d75be7b2e2fb43",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/vsmsappx.pfx",
|
||||
"line": 1,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0020",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"f5eed94d081284181a2cd78b47b336ece0fcf2c0eafd462ffe6a88ff913d8184": {
|
||||
"signature": "f5eed94d081284181a2cd78b47b336ece0fcf2c0eafd462ffe6a88ff913d8184",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/WinBlue.pfx",
|
||||
"line": 1,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0020",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"3aa029a27ef41acb56bd41ac97412078144ad5e722c21c325333f3af37b51d8a": {
|
||||
"signature": "3aa029a27ef41acb56bd41ac97412078144ad5e722c21c325333f3af37b51d8a",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/WP223.pfx",
|
||||
"line": 1,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0020",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"624055be3115da111704bd2823e64fb78862b3650767e571aef8a9b7a127c6d8": {
|
||||
"signature": "624055be3115da111704bd2823e64fb78862b3650767e571aef8a9b7a127c6d8",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/MobileTools/7Sign/tcb.pfx",
|
||||
"line": 1,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0020",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"1d4ee8b341d5f1ef56c8e517759511e55556866f0a6fbabf23440798da1f05d5": {
|
||||
"signature": "1d4ee8b341d5f1ef56c8e517759511e55556866f0a6fbabf23440798da1f05d5",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/nuget.config",
|
||||
"line": 9,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0060",
|
||||
"createdDate": "2024-03-15 21:10:23Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"4fdcce44747d67552fa68a352060f50d85431c0c7ea4215b395bdb360db739a7": {
|
||||
"signature": "4fdcce44747d67552fa68a352060f50d85431c0c7ea4215b395bdb360db739a7",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/nuget.config",
|
||||
"line": 9,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0060",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"62685d821fc38b8db7ddb0a07decba2a1be29c26ce13b5cb75fcc123ad048783": {
|
||||
"signature": "62685d821fc38b8db7ddb0a07decba2a1be29c26ce13b5cb75fcc123ad048783",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/nuget.config",
|
||||
"line": 9,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0060",
|
||||
"createdDate": "2024-03-15 21:10:55Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"0ecc3cb201b58b5026eef9239d3a888de6188f974948d8c2d76ea5f22dd12fd2": {
|
||||
"signature": "0ecc3cb201b58b5026eef9239d3a888de6188f974948d8c2d76ea5f22dd12fd2",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/nuget.config",
|
||||
"line": 9,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0060",
|
||||
"createdDate": "2024-03-15 21:10:23Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
},
|
||||
"e4e0934b769d92960066e0db46b39bcb24f69fb478779b630d2d8581f384a95c": {
|
||||
"signature": "e4e0934b769d92960066e0db46b39bcb24f69fb478779b630d2d8581f384a95c",
|
||||
"alternativeSignatures": [],
|
||||
"target": "MicroBuild/Plugins/nuget.config",
|
||||
"line": 9,
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "credscan",
|
||||
"ruleId": "CSCAN-GENERAL0060",
|
||||
"createdDate": "2024-03-15 21:10:36Z",
|
||||
"expirationDate": "2024-09-01 21:43:51Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -129,18 +129,18 @@
|
|||
<Uri>https://github.com/dotnet/test-templates</Uri>
|
||||
<Sha>becc4bd157cd6608b51a5ffe414a5d2de6330272</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.8.0" Version="1.1.0-rc.24168.1">
|
||||
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.8.0" Version="1.1.0-rc.24171.1">
|
||||
<Uri>https://github.com/dotnet/test-templates</Uri>
|
||||
<Sha>492de6f8db8c7f537119e4169bc2a4453eda6ccd</Sha>
|
||||
<Sha>85ed22f90956cdd8dba3a7faa03f6a51987985df</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.9.0" Version="1.1.0-rc.24168.1">
|
||||
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.9.0" Version="1.1.0-rc.24171.1">
|
||||
<Uri>https://github.com/dotnet/test-templates</Uri>
|
||||
<Sha>492de6f8db8c7f537119e4169bc2a4453eda6ccd</Sha>
|
||||
<Sha>85ed22f90956cdd8dba3a7faa03f6a51987985df</Sha>
|
||||
</Dependency>
|
||||
<!-- Intermediate is necessary for source build. -->
|
||||
<Dependency Name="Microsoft.SourceBuild.Intermediate.test-templates" Version="1.1.0-rc.24168.1">
|
||||
<Dependency Name="Microsoft.SourceBuild.Intermediate.test-templates" Version="1.1.0-rc.24171.1">
|
||||
<Uri>https://github.com/dotnet/test-templates</Uri>
|
||||
<Sha>492de6f8db8c7f537119e4169bc2a4453eda6ccd</Sha>
|
||||
<Sha>85ed22f90956cdd8dba3a7faa03f6a51987985df</Sha>
|
||||
<SourceBuild RepoName="test-templates" ManagedOnly="true" />
|
||||
</Dependency>
|
||||
<!-- For coherency purposes, these versions should be gated by the versions of winforms and wpf routed via windowsdesktop -->
|
||||
|
@ -243,17 +243,17 @@
|
|||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24170.7">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24171.5">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>117337a1e7024e31b321d44d8b71a821e69c3967</Sha>
|
||||
<Sha>742b88473823f1271366463ee9b57bea63677312</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="9.0.0-beta.24170.7">
|
||||
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="9.0.0-beta.24171.5">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>117337a1e7024e31b321d44d8b71a821e69c3967</Sha>
|
||||
<Sha>742b88473823f1271366463ee9b57bea63677312</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.24170.7">
|
||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.24171.5">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>117337a1e7024e31b321d44d8b71a821e69c3967</Sha>
|
||||
<Sha>742b88473823f1271366463ee9b57bea63677312</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.24168.3">
|
||||
<Uri>https://github.com/dotnet/arcade-services</Uri>
|
||||
|
@ -263,14 +263,14 @@
|
|||
<Uri>https://github.com/dotnet/arcade-services</Uri>
|
||||
<Sha>0e9abfee048404d9b994fc64235b42216ce68dad</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24170.7">
|
||||
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24171.5">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>117337a1e7024e31b321d44d8b71a821e69c3967</Sha>
|
||||
<Sha>742b88473823f1271366463ee9b57bea63677312</Sha>
|
||||
</Dependency>
|
||||
<!-- Intermediate is necessary for source build. -->
|
||||
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24170.7">
|
||||
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24171.5">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>117337a1e7024e31b321d44d8b71a821e69c3967</Sha>
|
||||
<Sha>742b88473823f1271366463ee9b57bea63677312</Sha>
|
||||
<SourceBuild RepoName="arcade" ManagedOnly="true" />
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="9.0.0-alpha.1.23612.13">
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/arcade -->
|
||||
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.24170.7</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
||||
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.24171.5</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/arcade-services -->
|
||||
|
@ -63,8 +63,8 @@
|
|||
<!-- Supported versions -->
|
||||
<MicrosoftDotNetTestProjectTemplates60PackageVersion>1.1.0-rc.24069.1</MicrosoftDotNetTestProjectTemplates60PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates70PackageVersion>1.1.0-rc.24069.1</MicrosoftDotNetTestProjectTemplates70PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates80PackageVersion>1.1.0-rc.24168.1</MicrosoftDotNetTestProjectTemplates80PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates90PackageVersion>1.1.0-rc.24168.1</MicrosoftDotNetTestProjectTemplates90PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates80PackageVersion>1.1.0-rc.24171.1</MicrosoftDotNetTestProjectTemplates80PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates90PackageVersion>1.1.0-rc.24171.1</MicrosoftDotNetTestProjectTemplates90PackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- NUnit3.DotNetNew.Template versions do not 'flow in' -->
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cmake": "latest"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24170.7",
|
||||
"Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24170.7"
|
||||
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24171.5",
|
||||
"Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24171.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,9 +25,20 @@ src/aspnetcore/src/Shared/TestCertificates/*.crt
|
|||
# cecil
|
||||
src/cecil/Test/Resources/assemblies/*.netmodule
|
||||
src/cecil/Test/Resources/assemblies/*.winmd
|
||||
src/cecil/Test/Resources/assemblies/*.exe
|
||||
src/cecil/Test/Resources/assemblies/*.dll
|
||||
src/cecil/Test/Resources/assemblies/*.pdb
|
||||
src/cecil/Test/Resources/assemblies/*.mdb
|
||||
src/cecil/rocks/Test/Resources/assemblies/*.dll
|
||||
src/cecil/symbols/**/Test/Resources/assemblies/*.exe
|
||||
src/cecil/symbols/**/Test/Resources/assemblies/*.pdb
|
||||
src/cecil/symbols/**/Test/Resources/assemblies/*.dll
|
||||
src/cecil/symbols/**/Test/Resources/assemblies/*.mdb
|
||||
|
||||
# fsharp
|
||||
src/fsharp/tests/**/*.resources
|
||||
src/fsharp/tests/**/*.dll
|
||||
src/fsharp/tests/**/*.exe
|
||||
src/fsharp/tests/fsharp/core/resources/chimes.wav
|
||||
|
||||
# msbuild
|
||||
|
@ -35,21 +46,34 @@ src/msbuild/src/Tasks.UnitTests/TestResources/*.pfx
|
|||
src/msbuild/src/Tasks.UnitTests/AssemblyDependency/CacheFileSamples/Microsoft.VisualStudio.LanguageServices.Implementation.csprojAssemblyReference.cache
|
||||
|
||||
# nuget-client
|
||||
src/nuget-client/test/EndToEnd/Packages/**/*.nupkg
|
||||
src/nuget-client/test/EndToEnd/Packages/**/*.zip
|
||||
src/nuget-client/test/EndToEnd/Packages/**/*.dll
|
||||
src/nuget-client/test/NuGet.Clients.Tests/NuGet.CommandLine.Test/compiler/resources/*.nupkg
|
||||
src/nuget-client/test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Resources/customMetadata.jpeg
|
||||
src/nuget-client/test/NuGet.Core.Tests/NuGet.Commands.Test/compiler/resources/EmptyCertificateStore.p7b
|
||||
src/nuget-client/test/NuGet.Core.Tests/NuGet.Protocol.Tests/compiler/resources/*.dll
|
||||
src/nuget-client/test/NuGet.Core.FuncTests/NuGet.Packaging.FuncTest/compiler/resources/*.nupkg
|
||||
src/nuget-client/test/NuGet.Core.FuncTests/NuGet.Packaging.FuncTest/compiler/resources/*.zip
|
||||
src/nuget-client/test/NuGet.Core.FuncTests/Dotnet.Integration.Test/compiler/resources/*.nupkg
|
||||
src/nuget-client/test/TestUtilities/Test.Utility/compiler/resources/*.crt
|
||||
src/nuget-client/test/TestUtilities/Test.Utility/compiler/resources/.signature.p7s
|
||||
src/nuget-client/test/NuGet.Core.Tests/NuGet.Commands.Test/compiler/resources/EmptyCertificateStore.p7b
|
||||
src/nuget-client/test/TestUtilities/Test.Utility/compiler/resources/*.nupkg
|
||||
src/nuget-client/test/TestUtilities/Test.Utility/compiler/resources/*.zip
|
||||
|
||||
# razor
|
||||
src/razor/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/TestFiles/BlazorProject.zip
|
||||
|
||||
# roslyn
|
||||
src/roslyn/src/Workspaces/MSBuildTest/Resources/Dlls/*
|
||||
src/roslyn/src/Compilers/Test/Resources/Core/**/*.metadata
|
||||
src/roslyn/src/Compilers/Test/Resources/Core/**/*.winmd
|
||||
src/roslyn/src/Compilers/Test/Resources/Core/**/*.mod
|
||||
src/roslyn/src/Compilers/Test/Resources/Core/**/*.netmodule
|
||||
src/roslyn/src/Compilers/Test/Resources/Core/**/*.obj
|
||||
src/roslyn/src/Compilers/Test/Resources/Core/**/*.dll
|
||||
src/roslyn/src/Compilers/Test/Resources/Core/**/*.exe
|
||||
src/roslyn/src/Compilers/Test/Resources/Core/**/*.Dll
|
||||
src/roslyn/src/Workspaces/MSBuildTest/Resources/Dlls/*.dll
|
||||
src/roslyn/**/CodeAnalysisTest/**/*.res
|
||||
src/roslyn/**/CodeAnalysisTest/**/*.blah
|
||||
src/roslyn/**/CodeAnalysisTest/**/*.RES
|
||||
|
@ -70,12 +94,17 @@ src/runtime/src/libraries/System.Console/tests/TestData/ncursesFormats/s/screen-
|
|||
src/runtime/src/libraries/System.Console/tests/TestData/ncursesFormats/x/xterm
|
||||
src/runtime/src/mono/wasm/testassets/**/*.dat
|
||||
src/runtime/src/mono/wasm/testassets/**/*.o
|
||||
src/runtime/src/libraries/**/tests/**/*.dll
|
||||
src/runtime/src/libraries/**/tests/**/*.exe
|
||||
src/runtime/src/libraries/**/tests/**/*.pdb
|
||||
|
||||
# sdk
|
||||
src/sdk/src/Assets/TestProjects/**/*.dat
|
||||
src/sdk/src/Assets/TestProjects/**/*.cache
|
||||
src/sdk/src/Assets/TestProjects/**/*.tlb
|
||||
src/sdk/src/Assets/TestPackages/dotnet-new/nupkg_templates/*
|
||||
src/sdk/test/Microsoft.DotNet.ShellShim.Tests/WpfBinaryTestAsssets/*.dll
|
||||
src/sdk/test/Microsoft.NET.Sdk.Publish.Tasks.Tests/Resources/*.zip
|
||||
|
||||
# source-build-externals
|
||||
src/source-build-externals/src/application-insights*/WEB/Src/WindowsServer/WindowsServer.Tests/**/*.dll
|
||||
|
@ -102,4 +131,11 @@ src/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/lib/*.dll
|
|||
src/winforms/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/Resources/media.mpg
|
||||
src/winforms/src/System.Windows.Forms/tests/UnitTests/bitmaps/milkmateya01.emf
|
||||
src/winforms/src/System.Windows.Forms/tests/UnitTests/TestResources/VB6/SimpleControl.vb6
|
||||
src/winforms/src/System.Windows.Forms*/**/*.wmf
|
||||
src/winforms/src/System.Windows.Forms*/**/*.wmf
|
||||
src/winforms/src/System.Windows.Forms.Design/src/Resources/colordlg.data
|
||||
|
||||
# wpf
|
||||
src/wpf/src/Microsoft.DotNet.Wpf/src/ReachFramework/Resources/generated/*.resources
|
||||
src/wpf/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/Hyphenation/Hyphen_en.lex
|
||||
src/wpf/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/Hyphenation/Hyphen_en.hdict
|
||||
src/wpf/src/Microsoft.DotNet.Wpf/src/Shared/Tracing/resources/*.BIN
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<UnpackedSourceBuildReferencePackages Include="$(PrebuiltSourceBuiltPackagesPath)SourceBuildReferencePackages/*"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(UnpackedSourceBuildReferencePackages)" DestinationFiles="$(ReferencePackagesDir)%(Filename)%(Extension)" />
|
||||
<Move SourceFiles="@(UnpackedSourceBuildReferencePackages)" DestinationFiles="$(ReferencePackagesDir)%(Filename)%(Extension)" />
|
||||
|
||||
<MakeDir Directories="$(BaseIntermediateOutputPath)" />
|
||||
<Touch Files="$(BaseIntermediateOutputPath)UnpackTarballs.complete" AlwaysCreate="true">
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
|
@ -14,10 +17,13 @@ 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.
|
||||
* This task updates the package source mappings in the NuGet.Config using the following logic:
|
||||
* Add all packages from current source-build sources, i.e. source-built-*, reference-packages.
|
||||
* For previously source-built sources (PSB), add only the packages that do not exist in any of the current source-built sources.
|
||||
* Also add PSB packages if that package version does not exist in current package sources.
|
||||
* In offline build, remove all existing package source mappings for online sources.
|
||||
* In online build, filter existing package source mappings to remove anything that exists in any source-build source.
|
||||
* In online build, if NuGet.config didn't have any mappings, add default "*" pattern for all online sources.
|
||||
*/
|
||||
public class UpdateNuGetConfigPackageSourcesMappings : Task
|
||||
{
|
||||
|
@ -34,48 +40,113 @@ namespace Microsoft.DotNet.Build.Tasks
|
|||
/// </summary>
|
||||
public string[] SourceBuildSources { get; set; }
|
||||
|
||||
[Required]
|
||||
public string SbrpRepoSrcPath { get; set; }
|
||||
|
||||
private const string SbrpCacheSourceName = "source-build-reference-package-cache";
|
||||
|
||||
// allSourcesPackages contains 'package source', 'list of packages' mappings
|
||||
private Dictionary<string, List<string>> allSourcesPackages = [];
|
||||
|
||||
// All other dictionaries are: 'package id', 'list of package versions'
|
||||
private Dictionary<string, List<string>> currentPackages = [];
|
||||
private Dictionary<string, List<string>> referencePackages = [];
|
||||
private Dictionary<string, List<string>> previouslyBuiltPackages = [];
|
||||
private Dictionary<string, List<string>> oldSourceMappingPatterns = [];
|
||||
|
||||
private string[] CustomSources = ["prebuilt", "net-sdk-supporting-feed"];
|
||||
|
||||
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)
|
||||
XElement pkgSourcesElement = document.Root.Descendants().FirstOrDefault(e => e.Name == "packageSources");
|
||||
if (pkgSourcesElement == null)
|
||||
{
|
||||
Log.LogMessage(MessageImportance.Low, "Package sources are missing.");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Union all package sources to get the distinct list. These will get added to the source-build sources.
|
||||
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()
|
||||
.ToArray();
|
||||
|
||||
if (!BuildWithOnlineFeeds)
|
||||
XElement pkgSrcMappingElement = document.Root.Descendants().FirstOrDefault(e => e.Name == "packageSourceMapping");
|
||||
if (pkgSrcMappingElement == null)
|
||||
{
|
||||
// When building offline remove all packageSourceMappings.
|
||||
pkgSrcMappingElement?.ReplaceNodes(new XElement("clear"));
|
||||
pkgSrcMappingElement = new XElement("packageSourceMapping");
|
||||
document.Root.Add(pkgSrcMappingElement);
|
||||
}
|
||||
|
||||
DiscoverPackagesFromAllSourceBuildSources(pkgSourcesElement);
|
||||
|
||||
// Discover all SBRP packages if source-build-reference-package-cache source is present in NuGet.config
|
||||
XElement sbrpCacheSourceElement = pkgSourcesElement.Descendants().FirstOrDefault(e => e.Name == "add" && e.Attribute("key").Value == SbrpCacheSourceName);
|
||||
if (sbrpCacheSourceElement != null)
|
||||
{
|
||||
DiscoverPackagesFromSbrpCacheSource();
|
||||
}
|
||||
|
||||
// If building online, enumerate any existing package source mappings and filter
|
||||
// to remove packages that are present in any local source-build source
|
||||
if (BuildWithOnlineFeeds && pkgSrcMappingElement != null)
|
||||
{
|
||||
GetExistingFilteredSourceMappings(pkgSrcMappingElement);
|
||||
}
|
||||
|
||||
// Remove all packageSourceMappings
|
||||
pkgSrcMappingElement.ReplaceNodes(new XElement("clear"));
|
||||
|
||||
XElement pkgSrcMappingClearElement = pkgSrcMappingElement.Descendants().FirstOrDefault(e => e.Name == "clear");
|
||||
if (pkgSrcMappingClearElement == null)
|
||||
|
||||
// Add package source mappings for local package sources
|
||||
foreach (string packageSource in allSourcesPackages.Keys)
|
||||
{
|
||||
pkgSrcMappingClearElement = new XElement("clear");
|
||||
pkgSrcMappingElement.AddFirst(pkgSrcMappingClearElement);
|
||||
// Skip sources with zero package patterns
|
||||
if (allSourcesPackages[packageSource] != null)
|
||||
{
|
||||
pkgSrcMappingClearElement.AddAfterSelf(GetPackageMappingsElementForSource(packageSource));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string packageSource in SourceBuildSources)
|
||||
// When building online add the filtered mappings from original online sources.
|
||||
// If there are none, add default mappings for all online sources.
|
||||
if (BuildWithOnlineFeeds)
|
||||
{
|
||||
XElement pkgSrc = new XElement("packageSource", new XAttribute("key", packageSource));
|
||||
foreach (string packagePattern in packagePatterns)
|
||||
if (oldSourceMappingPatterns.Count > 0)
|
||||
{
|
||||
pkgSrc.Add(new XElement("package", new XAttribute("pattern", packagePattern)));
|
||||
foreach (var entry in oldSourceMappingPatterns)
|
||||
{
|
||||
// Skip sources with zero package patterns
|
||||
if (entry.Value?.Count > 0)
|
||||
{
|
||||
pkgSrcMappingElement.Add(GetPackageMappingsElementForSource(entry.Key, entry.Value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pkgSrcMappingClearElement.AddAfterSelf(pkgSrc);
|
||||
// Union all package sources to get the distinct list. These will get added to
|
||||
// the two custom sourcess (prebuilt and net-sdk-supporting-feed) and all online
|
||||
// sources based on following logic:
|
||||
// If there were existing mappings for online feeds, add cummulative mappings
|
||||
// from all feeds to these two.
|
||||
// If there were no existing mappings, add default mappings for all online feeds.
|
||||
List<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()
|
||||
.ToList();
|
||||
|
||||
if (oldSourceMappingPatterns.Count == 0)
|
||||
{
|
||||
packagePatterns.Add("*");
|
||||
}
|
||||
|
||||
AddMappingsForCustomSources(pkgSrcMappingElement, pkgSourcesElement, packagePatterns);
|
||||
|
||||
if (oldSourceMappingPatterns.Count == 0)
|
||||
{
|
||||
AddMappingsForOnlineSources(pkgSrcMappingElement, pkgSourcesElement, packagePatterns);
|
||||
}
|
||||
}
|
||||
|
||||
using (var writer = XmlWriter.Create(NuGetConfigFile, new XmlWriterSettings { NewLineChars = newLineChars, Indent = true }))
|
||||
|
@ -85,5 +156,251 @@ namespace Microsoft.DotNet.Build.Tasks
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void AddMappingsForCustomSources(XElement pkgSrcMappingElement, XElement pkgSourcesElement, List<string> packagePatterns)
|
||||
{
|
||||
foreach (string sourceName in CustomSources)
|
||||
{
|
||||
if (null != pkgSourcesElement.Descendants().FirstOrDefault(e => e.Name == "add" && e.Attribute("key").Value == sourceName))
|
||||
{
|
||||
ReplaceSourceMappings(pkgSrcMappingElement, sourceName, packagePatterns);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ReplaceSourceMappings(XElement pkgSrcMappingElement, string sourceName, List<string> packagePatterns)
|
||||
{
|
||||
XElement pkgSrc = new XElement("packageSource", new XAttribute("key", sourceName));
|
||||
foreach (string packagePattern in packagePatterns)
|
||||
{
|
||||
pkgSrc.Add(new XElement("package", new XAttribute("pattern", packagePattern)));
|
||||
}
|
||||
|
||||
XElement pkgSrcMappingClearElement = pkgSrcMappingElement.Descendants().FirstOrDefault(e => e.Name == "packageSource" && e.Attribute("key").Value == sourceName);
|
||||
if (pkgSrcMappingClearElement != null)
|
||||
{
|
||||
pkgSrcMappingClearElement.ReplaceWith(pkgSrc);
|
||||
}
|
||||
else
|
||||
{
|
||||
pkgSrcMappingElement.Add(pkgSrc);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddMappingsForOnlineSources(XElement pkgSrcMappingElement, XElement pkgSourcesElement, List<string> packagePatterns)
|
||||
{
|
||||
foreach (string sourceName in pkgSourcesElement
|
||||
.Descendants()
|
||||
.Where(e => e.Name == "add" &&
|
||||
!SourceBuildSources.Contains(e.Attribute("key").Value) &&
|
||||
// SBRP Cache source is not in SourceBuildSources, skip it as it's not an online source
|
||||
!(e.Attribute("key").Value == SbrpCacheSourceName))
|
||||
.Select(e => e.Attribute("key").Value)
|
||||
.Distinct())
|
||||
{
|
||||
ReplaceSourceMappings(pkgSrcMappingElement, sourceName, packagePatterns);
|
||||
}
|
||||
}
|
||||
|
||||
private XElement GetPackageMappingsElementForSource(string key, List<string> value)
|
||||
{
|
||||
XElement pkgSrc = new XElement("packageSource", new XAttribute("key", key));
|
||||
foreach (string pattern in value)
|
||||
{
|
||||
pkgSrc.Add(new XElement("package", new XAttribute("pattern", pattern)));
|
||||
}
|
||||
|
||||
return pkgSrc;
|
||||
}
|
||||
|
||||
private XElement GetPackageMappingsElementForSource(string packageSource)
|
||||
{
|
||||
bool isCurrentSourceBuiltSource =
|
||||
packageSource.StartsWith("source-built-") ||
|
||||
packageSource.Equals(SbrpCacheSourceName) ||
|
||||
packageSource.Equals("reference-packages");
|
||||
|
||||
XElement pkgSrc = new XElement("packageSource", new XAttribute("key", packageSource));
|
||||
foreach (string packagePattern in allSourcesPackages[packageSource])
|
||||
{
|
||||
// Add all packages from current source-built sources.
|
||||
// For previously source-built and prebuilt sources add only packages
|
||||
// where version does not exist in current source-built sources.
|
||||
if (isCurrentSourceBuiltSource || !currentPackages.ContainsKey(packagePattern))
|
||||
{
|
||||
pkgSrc.Add(new XElement("package", new XAttribute("pattern", packagePattern)));
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (string version in previouslyBuiltPackages[packagePattern])
|
||||
{
|
||||
if (!currentPackages[packagePattern].Contains(version))
|
||||
{
|
||||
pkgSrc.Add(new XElement("package", new XAttribute("pattern", packagePattern)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return pkgSrc;
|
||||
}
|
||||
|
||||
private void DiscoverPackagesFromAllSourceBuildSources(XElement pkgSourcesElement)
|
||||
{
|
||||
foreach (string packageSource in SourceBuildSources)
|
||||
{
|
||||
XElement sourceElement = pkgSourcesElement.Descendants().FirstOrDefault(e => e.Name == "add" && e.Attribute("key").Value == packageSource);
|
||||
if (sourceElement == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string path = sourceElement.Attribute("value").Value;
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string[] packages = Directory.GetFiles(path, "*.nupkg", SearchOption.AllDirectories);
|
||||
foreach (string package in packages)
|
||||
{
|
||||
NupkgInfo info = GetNupkgInfo(package);
|
||||
string id = info.Id.ToLower();
|
||||
string version = info.Version.ToLower();
|
||||
|
||||
// Add package with version to appropriate hashtable
|
||||
if (packageSource.StartsWith("source-built-"))
|
||||
{
|
||||
AddToDictionary(currentPackages, id, version);
|
||||
}
|
||||
else if (packageSource.Equals("reference-packages"))
|
||||
{
|
||||
AddToDictionary(referencePackages, id, version);
|
||||
}
|
||||
else // previously built packages
|
||||
{
|
||||
AddToDictionary(previouslyBuiltPackages, id, version);
|
||||
}
|
||||
|
||||
AddToDictionary(allSourcesPackages, packageSource, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DiscoverPackagesFromSbrpCacheSource()
|
||||
{
|
||||
// 'source-build-reference-package-cache' is a dynamic source, populated by SBRP build.
|
||||
// Discover all SBRP packages from checked in nuspec files.
|
||||
|
||||
if (!Directory.Exists(SbrpRepoSrcPath))
|
||||
{
|
||||
throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "SBRP repo root does not exist in expected path: {0}", SbrpRepoSrcPath));
|
||||
}
|
||||
|
||||
string[] nuspecFiles = Directory.GetFiles(SbrpRepoSrcPath, "*.nuspec", SearchOption.AllDirectories);
|
||||
foreach (string nuspecFile in nuspecFiles)
|
||||
{
|
||||
try
|
||||
{
|
||||
using Stream stream = File.OpenRead(nuspecFile);
|
||||
NupkgInfo info = GetNupkgInfo(stream);
|
||||
string id = info.Id.ToLower();
|
||||
string version = info.Version.ToLower();
|
||||
|
||||
AddToDictionary(currentPackages, id, version);
|
||||
AddToDictionary(allSourcesPackages, SbrpCacheSourceName, id);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Invalid nuspec file", nuspecFile), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void GetExistingFilteredSourceMappings(XElement pkgSrcMappingElement)
|
||||
{
|
||||
foreach (XElement packageSource in pkgSrcMappingElement.Descendants().Where(e => e.Name == "packageSource"))
|
||||
{
|
||||
List<string> filteredPatterns = new List<string>();
|
||||
foreach (XElement package in packageSource.Descendants().Where(e => e.Name == "package"))
|
||||
{
|
||||
string pattern = package.Attribute("pattern").Value.ToLower();
|
||||
if (!currentPackages.ContainsKey(pattern) &&
|
||||
!referencePackages.ContainsKey(pattern) &&
|
||||
!previouslyBuiltPackages.ContainsKey(pattern))
|
||||
{
|
||||
filteredPatterns.Add(pattern);
|
||||
}
|
||||
}
|
||||
|
||||
oldSourceMappingPatterns.Add(packageSource.Attribute("key").Value, filteredPatterns);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddToDictionary(Dictionary<string, List<string>> dictionary, string key, string value)
|
||||
{
|
||||
if (dictionary.TryGetValue(key, out List<string> values))
|
||||
{
|
||||
if (!values.Contains(value))
|
||||
{
|
||||
values.Add(value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dictionary.Add(key, [value]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get nupkg info, id and version, from nupkg file.
|
||||
/// </summary>
|
||||
private NupkgInfo GetNupkgInfo(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
using Stream stream = File.OpenRead(path);
|
||||
ZipArchive zipArchive = new(stream, ZipArchiveMode.Read);
|
||||
foreach (ZipArchiveEntry entry in zipArchive.Entries)
|
||||
{
|
||||
if (entry.Name.EndsWith(".nuspec"))
|
||||
{
|
||||
using Stream nuspecFileStream = entry.Open();
|
||||
return GetNupkgInfo(nuspecFileStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Invalid package", path), ex);
|
||||
}
|
||||
|
||||
throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Did not extract nuspec file from package: {0}", path));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get nupkg info, id and version, from nuspec stream.
|
||||
/// </summary>
|
||||
private NupkgInfo GetNupkgInfo(Stream nuspecFileStream)
|
||||
{
|
||||
XDocument doc = XDocument.Load(nuspecFileStream, LoadOptions.PreserveWhitespace);
|
||||
XElement metadataElement = doc.Descendants().First(c => c.Name.LocalName.ToString() == "metadata");
|
||||
return new NupkgInfo(
|
||||
metadataElement.Descendants().First(c => c.Name.LocalName.ToString() == "id").Value,
|
||||
metadataElement.Descendants().First(c => c.Name.LocalName.ToString() == "version").Value);
|
||||
}
|
||||
|
||||
private class NupkgInfo
|
||||
{
|
||||
public NupkgInfo(string id, string version)
|
||||
{
|
||||
Id = id;
|
||||
Version = version;
|
||||
}
|
||||
|
||||
public string Id { get; }
|
||||
public string Version { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
<PropertyGroup>
|
||||
<!-- Dev innerloop opt-in feed: /p:ExtraRestoreSourcePath=... -->
|
||||
<ExtraSourcesNuGetSourceName>ExtraSources</ExtraSourcesNuGetSourceName>
|
||||
<SbrpRepoSrcPath>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'source-build-reference-packages', 'src'))</SbrpRepoSrcPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
|
||||
|
@ -197,7 +198,8 @@
|
|||
<UpdateNuGetConfigPackageSourcesMappings
|
||||
NuGetConfigFile="$(NuGetConfigFile)"
|
||||
BuildWithOnlineFeeds="$(DotNetBuildWithOnlineFeeds)"
|
||||
SourceBuildSources="@(_BuildSources)" />
|
||||
SourceBuildSources="@(_BuildSources)"
|
||||
SbrpRepoSrcPath="$(SbrpRepoSrcPath)" />
|
||||
|
||||
<MakeDir Directories="$(BaseIntermediateOutputPath)" />
|
||||
<Touch Files="$(BaseIntermediateOutputPath)UpdateNuGetConfig.complete" AlwaysCreate="true">
|
||||
|
|
|
@ -1,148 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nikola Milosavljevic <nikolam@microsoft.com>
|
||||
Date: Sat, 16 Mar 2024 05:17:27 +0000
|
||||
Subject: [PATCH] Revert non-determinism in NuGet local sources
|
||||
|
||||
Revert of https://github.com/NuGet/NuGet.Client/commit/f54c58fdfce13feb68b846bd7a7e50058298afbc
|
||||
---
|
||||
.../SourceRepositoryDependencyProvider.cs | 64 ++++++++++++-------
|
||||
1 file changed, 41 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/NuGet.Core/NuGet.Commands/RestoreCommand/SourceRepositoryDependencyProvider.cs b/src/NuGet.Core/NuGet.Commands/RestoreCommand/SourceRepositoryDependencyProvider.cs
|
||||
index 4afc27f81..501a51985 100644
|
||||
--- a/src/NuGet.Core/NuGet.Commands/RestoreCommand/SourceRepositoryDependencyProvider.cs
|
||||
+++ b/src/NuGet.Core/NuGet.Commands/RestoreCommand/SourceRepositoryDependencyProvider.cs
|
||||
@@ -2,6 +2,7 @@
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
+using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
@@ -35,8 +36,11 @@ public class SourceRepositoryDependencyProvider : IRemoteDependencyProvider
|
||||
private bool _isFallbackFolderSource;
|
||||
private bool _useLegacyAssetTargetFallbackBehavior;
|
||||
|
||||
- private readonly TaskResultCache<LibraryRangeCacheKey, LibraryDependencyInfo> _dependencyInfoCache = new();
|
||||
- private readonly TaskResultCache<LibraryRange, LibraryIdentity> _libraryMatchCache = new();
|
||||
+ private readonly ConcurrentDictionary<LibraryRangeCacheKey, AsyncLazy<LibraryDependencyInfo>> _dependencyInfoCache
|
||||
+ = new ConcurrentDictionary<LibraryRangeCacheKey, AsyncLazy<LibraryDependencyInfo>>();
|
||||
+
|
||||
+ private readonly ConcurrentDictionary<LibraryRange, AsyncLazy<LibraryIdentity>> _libraryMatchCache
|
||||
+ = new ConcurrentDictionary<LibraryRange, AsyncLazy<LibraryIdentity>>();
|
||||
|
||||
// Limiting concurrent requests to limit the amount of files open at a time.
|
||||
private readonly static SemaphoreSlim _throttle = GetThrottleSemaphoreSlim(EnvironmentVariableWrapper.Instance);
|
||||
@@ -202,15 +206,23 @@ internal static SemaphoreSlim GetThrottleSemaphoreSlim(IEnvironmentVariableReade
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
- try
|
||||
+ AsyncLazy<LibraryIdentity> result = null;
|
||||
+
|
||||
+ var action = new AsyncLazy<LibraryIdentity>(async () =>
|
||||
+ await FindLibraryCoreAsync(libraryRange, cacheContext, logger, cancellationToken));
|
||||
+
|
||||
+ if (cacheContext.RefreshMemoryCache)
|
||||
{
|
||||
- LibraryIdentity result = await _libraryMatchCache.GetOrAddAsync(
|
||||
- libraryRange,
|
||||
- cacheContext.RefreshMemoryCache,
|
||||
- static state => state.caller.FindLibraryCoreAsync(state.libraryRange, state.cacheContext, state.logger, state.cancellationToken),
|
||||
- (caller: this, libraryRange, cacheContext, logger, cancellationToken), cancellationToken);
|
||||
+ result = _libraryMatchCache.AddOrUpdate(libraryRange, action, (k, v) => action);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ result = _libraryMatchCache.GetOrAdd(libraryRange, action);
|
||||
+ }
|
||||
|
||||
- return result;
|
||||
+ try
|
||||
+ {
|
||||
+ return await result;
|
||||
}
|
||||
catch (FatalProtocolException e)
|
||||
{
|
||||
@@ -224,7 +236,6 @@ internal static SemaphoreSlim GetThrottleSemaphoreSlim(IEnvironmentVariableReade
|
||||
throw;
|
||||
}
|
||||
}
|
||||
-
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -234,6 +245,7 @@ internal static SemaphoreSlim GetThrottleSemaphoreSlim(IEnvironmentVariableReade
|
||||
ILogger logger,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
+
|
||||
await EnsureResource(cancellationToken);
|
||||
|
||||
if (libraryRange.VersionRange?.MinVersion != null && libraryRange.VersionRange.IsMinInclusive && !libraryRange.VersionRange.IsFloating)
|
||||
@@ -310,7 +322,7 @@ internal static SemaphoreSlim GetThrottleSemaphoreSlim(IEnvironmentVariableReade
|
||||
/// is either <see langword="null" /> or empty.</exception>
|
||||
/// <exception cref="OperationCanceledException">Thrown if <paramref name="cancellationToken" />
|
||||
/// is cancelled.</exception>
|
||||
- public Task<LibraryDependencyInfo> GetDependenciesAsync(
|
||||
+ public async Task<LibraryDependencyInfo> GetDependenciesAsync(
|
||||
LibraryIdentity libraryIdentity,
|
||||
NuGetFramework targetFramework,
|
||||
SourceCacheContext cacheContext,
|
||||
@@ -339,13 +351,23 @@ internal static SemaphoreSlim GetThrottleSemaphoreSlim(IEnvironmentVariableReade
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
- LibraryRangeCacheKey key = new(libraryIdentity, targetFramework);
|
||||
+ AsyncLazy<LibraryDependencyInfo> result = null;
|
||||
+
|
||||
+ var action = new AsyncLazy<LibraryDependencyInfo>(async () =>
|
||||
+ await GetDependenciesCoreAsync(libraryIdentity, targetFramework, cacheContext, logger, cancellationToken));
|
||||
+
|
||||
+ var key = new LibraryRangeCacheKey(libraryIdentity, targetFramework);
|
||||
|
||||
- return _dependencyInfoCache.GetOrAddAsync(
|
||||
- key,
|
||||
- cacheContext.RefreshMemoryCache,
|
||||
- static state => state.caller.GetDependenciesCoreAsync(state.libraryIdentity, state.targetFramework, state.cacheContext, state.logger, state.cancellationToken),
|
||||
- (caller: this, libraryIdentity, targetFramework, cacheContext, logger, cancellationToken), cancellationToken);
|
||||
+ if (cacheContext.RefreshMemoryCache)
|
||||
+ {
|
||||
+ result = _dependencyInfoCache.AddOrUpdate(key, action, (k, v) => action);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ result = _dependencyInfoCache.GetOrAdd(key, action);
|
||||
+ }
|
||||
+
|
||||
+ return await result;
|
||||
}
|
||||
|
||||
private async Task<LibraryDependencyInfo> GetDependenciesCoreAsync(
|
||||
@@ -390,12 +412,10 @@ internal static SemaphoreSlim GetThrottleSemaphoreSlim(IEnvironmentVariableReade
|
||||
_throttle?.Release();
|
||||
}
|
||||
|
||||
- LibraryDependencyInfo libraryDependencyInfo = null;
|
||||
-
|
||||
if (packageInfo == null)
|
||||
{
|
||||
// Package was not found
|
||||
- libraryDependencyInfo = LibraryDependencyInfo.CreateUnresolved(match, targetFramework);
|
||||
+ return LibraryDependencyInfo.CreateUnresolved(match, targetFramework);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -407,10 +427,8 @@ internal static SemaphoreSlim GetThrottleSemaphoreSlim(IEnvironmentVariableReade
|
||||
|
||||
IEnumerable<LibraryDependency> dependencyGroup = GetDependencies(packageInfo, targetFramework);
|
||||
|
||||
- libraryDependencyInfo = LibraryDependencyInfo.Create(originalIdentity, targetFramework, dependencies: dependencyGroup);
|
||||
+ return LibraryDependencyInfo.Create(originalIdentity, targetFramework, dependencies: dependencyGroup);
|
||||
}
|
||||
-
|
||||
- return libraryDependencyInfo;
|
||||
}
|
||||
|
||||
/// <summary>
|
|
@ -36,29 +36,14 @@
|
|||
// The default filters do not apply to submodules
|
||||
// Only filters which start with submodule's path are applied when syncing submodules
|
||||
"defaults": {
|
||||
"defaultRef": "main",
|
||||
"exclude": [
|
||||
"**/*.dll",
|
||||
"**/*.Dll",
|
||||
"**/*.exe",
|
||||
"**/*.mdb",
|
||||
"**/*.nupkg",
|
||||
"**/*.pdb",
|
||||
"**/*.tgz",
|
||||
"**/*.zip"
|
||||
]
|
||||
"defaultRef": "main"
|
||||
},
|
||||
|
||||
// Each of these mappings has a corresponding folder in the src/ directory
|
||||
"mappings": [
|
||||
{
|
||||
"name": "arcade",
|
||||
"defaultRemote": "https://github.com/dotnet/arcade",
|
||||
"exclude": [
|
||||
"src/Microsoft.DotNet.SignTool.Tests/*.mpack",
|
||||
"src/Microsoft.DotNet.SignTool.Tests/*.msi",
|
||||
"src/Microsoft.DotNet.SignTool.Tests/*.vsix"
|
||||
]
|
||||
"defaultRemote": "https://github.com/dotnet/arcade"
|
||||
},
|
||||
{
|
||||
"name": "aspire",
|
||||
|
@ -72,11 +57,8 @@
|
|||
"name": "aspnetcore",
|
||||
"defaultRemote": "https://github.com/dotnet/aspnetcore",
|
||||
"exclude": [
|
||||
"src/submodules/MessagePack-CSharp/**/*.dll",
|
||||
"**/samples/**/jquery-validation-unobtrusive/.bower.json",
|
||||
"**/samples/**/jquery-validation-unobtrusive/*.js",
|
||||
"src/Installers/Windows/AspNetCoreModule-Setup/*",
|
||||
"src/SignalR/clients/java/signalr/gradle/wrapper/gradle-wrapper.jar"
|
||||
// Non-OSS license - https://github.com/dotnet/source-build/issues/3537
|
||||
"src/Installers/Windows/AspNetCoreModule-Setup/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -107,7 +89,7 @@
|
|||
"name": "installer",
|
||||
"defaultRemote": "https://github.com/dotnet/installer",
|
||||
"exclude": [
|
||||
// We don't need the tarball content in the VMR again, it's already copied in the root
|
||||
// Exclude the VMR content as this is copied to the root of VMR via the synchronization process.
|
||||
"src/SourceBuild/content/**/*"
|
||||
]
|
||||
},
|
||||
|
@ -118,10 +100,7 @@
|
|||
{
|
||||
"name": "nuget-client",
|
||||
"defaultRemote": "https://github.com/NuGet/NuGet.Client",
|
||||
"defaultRef": "dev",
|
||||
"exclude":[
|
||||
"src/NuGet.Clients/NuGet.VisualStudio.Client"
|
||||
]
|
||||
"defaultRef": "dev"
|
||||
},
|
||||
{
|
||||
"name": "razor",
|
||||
|
|
Loading…
Reference in a new issue