-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove dependency on Nuget.Frameworks #4693
Merged
Merged
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
686671d
remove nuget frameworks
nohwnd 68915e7
Remove all mentions of nuget.frameworks
nohwnd d063458
Fix nuspec
nohwnd 3451050
Add one part of spec
nohwnd e4adba3
Onboard nuget.frameworks code
nohwnd 007d831
Fix build
nohwnd 43f296d
Fix build
nohwnd f132d95
Fix nuget package counts
nohwnd 0bdb67f
Revert .gitignore
nohwnd a95b7f3
Remove prospective tests
nohwnd ee05e1d
Output version info into code
nohwnd 0701a77
Add third party notice
nohwnd c6dc904
unlocalize
nohwnd f2f5465
Remove extra resources
nohwnd 6056482
revert tests
nohwnd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,3 +147,5 @@ logs/ | |
|
||
.idea/ | ||
.tools/ | ||
|
||
spelling.dic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
$root = Resolve-Path "$PSScriptRoot/.." | ||
|
||
$source = "S:\c\NuGet.Client" | ||
|
||
$destination = "$root/src/Microsoft.TestPlatform.ObjectModel/Nuget.Frameworks/" | ||
|
||
$frameworksPath = "$source/src/NuGet.Core/NuGet.Frameworks" | ||
$frameworkItems = @( | ||
"Strings.Designer.cs" | ||
"DefaultFrameworkMappings.cs" | ||
"DefaultFrameworkNameProvider.cs" | ||
"DefaultPortableFrameworkMappings.cs" | ||
"DefaultCompatibilityProvider.cs" | ||
"CompatibilityProvider.cs" | ||
"FrameworkConstants.cs" | ||
"FrameworkException.cs" | ||
"FrameworkNameProvider.cs" | ||
"FrameworkRange.cs" | ||
"FrameworkReducer.cs" | ||
"FrameworkNameHelpers.cs", | ||
"FrameworkSpecificMapping.cs" | ||
"FallbackFramework.cs" | ||
"FrameworkExpander.cs" | ||
"CompatibilityCacheKey.cs" | ||
"def/IFrameworkCompatibilityListProvider.cs" | ||
"def/IFrameworkCompatibilityProvider.cs" | ||
"def/IFrameworkMappings.cs" | ||
"def/IFrameworkNameProvider.cs" | ||
"def/IFrameworkSpecific.cs" | ||
"def/IPortableFrameworkMappings.cs" | ||
"NuGetFramework.cs" | ||
"NuGetFrameworkFactory.cs" | ||
"comparers/NuGetFrameworkFullComparer.cs" | ||
"comparers/NuGetFrameworkNameComparer.cs" | ||
"comparers/CompatibilityMappingComparer.cs" | ||
"comparers/FrameworkRangeComparer.cs" | ||
"comparers/NuGetFrameworkSorter.cs" | ||
"comparers/FrameworkPrecedenceSorter.cs" | ||
"NuGetFrameworkUtility.cs" | ||
"OneWayCompatibilityMappingEntry.cs" | ||
) | ForEach-Object { "$frameworksPath/$_" } | ||
|
||
$extraItems = @( | ||
".editorconfig" | ||
"build/Shared/HashCodeCombiner.cs" | ||
"build/Shared/NoAllocEnumerateExtensions.cs" | ||
"build/Shared/StringBuilderPool.cs" | ||
"build/Shared/SimplePool.cs" | ||
) | ForEach-Object { "$source/$_" } | ||
|
||
if ((Test-Path $destination)) { | ||
Remove-Item $destination -Force -Recurse | ||
} | ||
|
||
New-Item -ItemType Directory $destination -ErrorAction Ignore | Out-Null | ||
foreach ($item in $frameworkItems + $extraItems) { | ||
if (-not (Test-Path $item)) { | ||
throw "File not found $item" | ||
} | ||
$content = Get-Content $item | ||
$name = (Get-Item $item).Name | ||
|
||
$path = "$destination/$name" | ||
|
||
# some types are directly in Nuget namespace, and if we would suffix | ||
# .Clone, then Nuget.Frameworks.Clone is no longer autometicaly using | ||
# Nuget.Clone, and we would have to add more usings into the files. | ||
$finalContent = $content ` | ||
-replace 'public(.*)(class|interface)', 'internal$1$2' ` | ||
-replace 'namespace NuGet', 'namespace NuGetClone' ` | ||
-replace 'using NuGet', 'using NuGetClone' ` | ||
-replace 'NuGet.Frameworks.NuGetFramework', 'NuGetClone.Frameworks.NuGetFramework' | ||
|
||
if ($name -eq ".editorconfig") { | ||
$finalContent += @" | ||
|
||
[*.{cs,vb}] | ||
dotnet_diagnostic.IDE0001.severity = none | ||
dotnet_diagnostic.IDE0005.severity = none | ||
dotnet_diagnostic.IDE1006.severity = none | ||
"@ | ||
} | ||
$finalContent | Set-Content -Path $path -Encoding utf8NoBOM | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which is count reduction by 2, 2 and 3 just like here.