Skip to content

Commit

Permalink
Use NuGet 3.x (compiled in from submodule) for compatibility and for …
Browse files Browse the repository at this point in the history
…Get Nearest
  • Loading branch information
joelverhagen committed May 17, 2016
1 parent cc9ec1a commit ba264c6
Show file tree
Hide file tree
Showing 19 changed files with 830 additions and 693 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "xdt"]
path = xdt
url = https://git01.codeplex.com/xdt
[submodule "NuGet.Client"]
path = NuGet.Client
url = https://github.com/NuGet/NuGet.Client.git
branch = dev
3 changes: 3 additions & 0 deletions Build/Build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@
</Target>

<Target Name="RestorePackages">
<MsBuild Projects="$(NuGetRoot)\src\Core\Core.csproj"
Targets="Build"
Properties="DefineConstants=IS_NET40_CLIENT;NUGET_FRAMEWORKS_INTERNAL;CODE_ANALYSIS" />
<MsBuild Projects="$(NuGetRoot)\src\CommandLine\CommandLine.csproj"
Targets="Build"
Properties="DefineConstants=CODE_ANALYSIS" />
Expand Down
1 change: 1 addition & 0 deletions NuGet.Client
Submodule NuGet.Client added at 49234c
3 changes: 2 additions & 1 deletion NuGet.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.21917.0
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E7B39EAD-EA32-4011-845A-C949A336389A}"
EndProject
Expand Down Expand Up @@ -125,6 +125,7 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dialog11", "src\Dialog11\Dialog11.csproj", "{FD1E159B-A36F-49E4-856D-8555A20D09CF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualStudio11.Test", "test\VisualStudio11.Test\VisualStudio11.Test.csproj", "{25A2D439-B045-4059-9E1F-738362B72554}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeamFoundationServer11", "src\TeamFoundationServer11\TeamFoundationServer11.csproj", "{5220A205-0C3F-4CD5-B1B4-7CD5B8298D7A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualStudio12", "src\VisualStudio12\VisualStudio12.csproj", "{3DD213F7-999B-4C15-9560-BF9C96CB8C52}"
Expand Down
134 changes: 134 additions & 0 deletions src/Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile Condition=" '$(MonoBuild)' == '' And '$(TargetFrameworkVersion)' == 'v4.0' ">Client</TargetFrameworkProfile>
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>IS_NET40_CLIENT;NUGET_FRAMEWORKS_INTERNAL</DefineConstants>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\Common\CommonResources.resx">
Expand All @@ -20,6 +22,9 @@
<LastGenOutput>CommonResources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\Strings.resx">
<Link>NuGet.Frameworks\Strings.resx</Link>
</EmbeddedResource>
<EmbeddedResource Include="Resources\AnalysisResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>AnalysisResources.Designer.cs</LastGenOutput>
Expand All @@ -41,6 +46,132 @@
<Compile Include="..\..\Common\GlobalSuppressions.cs">
<Link>Common\GlobalSuppressions.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\comparers\CompatibilityMappingComparer.cs">
<Link>NuGet.Frameworks\comparers\CompatibilityMappingComparer.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\comparers\FrameworkPrecedenceSorter.cs">
<Link>NuGet.Frameworks\comparers\FrameworkPrecedenceSorter.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\comparers\FrameworkRangeComparer.cs">
<Link>NuGet.Frameworks\comparers\FrameworkRangeComparer.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\comparers\NuGetFrameworkFullComparer.cs">
<Link>NuGet.Frameworks\comparers\NuGetFrameworkFullComparer.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\comparers\NuGetFrameworkNameComparer.cs">
<Link>NuGet.Frameworks\comparers\NuGetFrameworkNameComparer.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\comparers\NuGetFrameworkSorter.cs">
<Link>NuGet.Frameworks\comparers\NuGetFrameworkSorter.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\CompatibilityCacheKey.cs">
<Link>NuGet.Frameworks\CompatibilityCacheKey.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\CompatibilityListProvider.cs">
<Link>NuGet.Frameworks\CompatibilityListProvider.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\CompatibilityProvider.cs">
<Link>NuGet.Frameworks\CompatibilityProvider.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\CompatibilityTable.cs">
<Link>NuGet.Frameworks\CompatibilityTable.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\DefaultCompatibilityProvider.cs">
<Link>NuGet.Frameworks\DefaultCompatibilityProvider.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\DefaultFrameworkMappings.cs">
<Link>NuGet.Frameworks\DefaultFrameworkMappings.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\DefaultFrameworkNameProvider.cs">
<Link>NuGet.Frameworks\DefaultFrameworkNameProvider.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\DefaultPortableFrameworkMappings.cs">
<Link>NuGet.Frameworks\DefaultPortableFrameworkMappings.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\def\IFrameworkCompatibilityListProvider.cs">
<Link>NuGet.Frameworks\def\IFrameworkCompatibilityListProvider.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\def\IFrameworkCompatibilityProvider.cs">
<Link>NuGet.Frameworks\def\IFrameworkCompatibilityProvider.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\def\IFrameworkMappings.cs">
<Link>NuGet.Frameworks\def\IFrameworkMappings.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\def\IFrameworkNameProvider.cs">
<Link>NuGet.Frameworks\def\IFrameworkNameProvider.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\def\IFrameworkSpecific.cs">
<Link>NuGet.Frameworks\def\IFrameworkSpecific.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\def\IFrameworkTargetable.cs">
<Link>NuGet.Frameworks\def\IFrameworkTargetable.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\def\IPortableFrameworkMappings.cs">
<Link>NuGet.Frameworks\def\IPortableFrameworkMappings.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FallbackFramework.cs">
<Link>NuGet.Frameworks\FallbackFramework.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FrameworkConstants.cs">
<Link>NuGet.Frameworks\FrameworkConstants.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FrameworkException.cs">
<Link>NuGet.Frameworks\FrameworkException.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FrameworkExpander.cs">
<Link>NuGet.Frameworks\FrameworkExpander.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FrameworkExtensions.cs">
<Link>NuGet.Frameworks\FrameworkExtensions.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FrameworkNameHelpers.cs">
<Link>NuGet.Frameworks\FrameworkNameHelpers.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FrameworkNameProvider.cs">
<Link>NuGet.Frameworks\FrameworkNameProvider.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FrameworkRange.cs">
<Link>NuGet.Frameworks\FrameworkRange.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FrameworkReducer.cs">
<Link>NuGet.Frameworks\FrameworkReducer.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FrameworkRuntimePair.cs">
<Link>NuGet.Frameworks\FrameworkRuntimePair.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\FrameworkSpecificMapping.cs">
<Link>NuGet.Frameworks\FrameworkSpecificMapping.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\HashCodeCombiner.cs">
<Link>NuGet.Frameworks\HashCodeCombiner.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\NuGetFramework.cs">
<Link>NuGet.Frameworks\NuGetFramework.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\NuGetFrameworkFactory.cs">
<Link>NuGet.Frameworks\NuGetFrameworkFactory.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\NuGetFrameworkUtility.cs">
<Link>NuGet.Frameworks\NuGetFrameworkUtility.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\OneWayCompatibilityMappingEntry.cs">
<Link>NuGet.Frameworks\OneWayCompatibilityMappingEntry.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\Strings.Designer.cs">
<Link>NuGet.Frameworks\Strings.Designer.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Shared\HashCodeCombiner.cs">
<Link>NuGet.Shared\HashCodeCombiner.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Shared\SharedExtensions.cs">
<Link>NuGet.Shared\SharedExtensions.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Shared\TypeExtensions.cs">
<Link>NuGet.Shared\TypeExtensions.cs</Link>
</Compile>
<Compile Include="..\..\NuGet.Client\src\NuGet.Core\NuGet.Shared\TypeInfo.cs">
<Link>NuGet.Shared\TypeInfo.cs</Link>
</Compile>
<Compile Include="Analysis\IPackageRule.cs" />
<Compile Include="Analysis\PackageIssue.cs" />
<Compile Include="Analysis\DefaultPackageRuleSet.cs" />
Expand Down Expand Up @@ -106,9 +237,12 @@
<Compile Include="IMachineWideSettings.cs" />
<Compile Include="Logging\FileConflictResolution.cs" />
<Compile Include="Logging\IFileConflictResolver.cs" />
<Compile Include="NETPortable\ReferenceAssemblyCompatibilityProvider.cs" />
<Compile Include="NETPortable\NetPortableProfile.cs" />
<Compile Include="NETPortable\NetPortableProfileCollection.cs" />
<Compile Include="NETPortable\NetPortableProfileTable.cs" />
<Compile Include="NETPortable\ReferenceAssemblyFrameworkNameProvider.cs" />
<Compile Include="NETPortable\ReferenceAssemblyPortableFrameworkMappings.cs" />
<Compile Include="PackageRestoreConsent.cs" />
<Compile Include="Packages\LocalPackage.cs" />
<Compile Include="Packages\OptimizedZipPackage.cs" />
Expand Down
18 changes: 18 additions & 0 deletions src/Core/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,21 @@
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "NuGet.Analysis.Rules", Justification = "Don't want to pollute the NuGet namespace.")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "ps", Scope = "resource", Target = "NuGet.Resources.AnalysisResources.resources")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Scope = "member", Target = "NuGet.ManifestMetadata.#NuGet.IPackageMetadata.PackageAssemblyReferences")]

// Suppressions for NuGet.Frameworks code.
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Scope = "type", Target = "NuGet.Frameworks.FrameworkException")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1064:ExceptionsShouldBePublic", Scope = "type", Target = "NuGet.Frameworks.FrameworkException")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1307:SpecifyStringComparison", MessageId = "System.String.CompareTo(System.String)", Scope = "member", Target = "NuGet.Frameworks.FrameworkRuntimePair.#CompareTo(NuGet.Frameworks.FrameworkRuntimePair)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Scope = "member", Target = "NuGet.Frameworks.NuGetFramework.#GetShortFolderName(NuGet.Frameworks.IFrameworkNameProvider)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Scope = "member", Target = "NuGet.Frameworks.NuGetFramework.#TryParseCommonFramework(System.String,NuGet.Frameworks.NuGetFramework&)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope = "member", Target = "NuGet.Frameworks.FrameworkNameProvider.#AddCompatibleCandidates()")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope = "member", Target = "NuGet.Frameworks.FrameworkReducer.#GetNearestInternal(NuGet.Frameworks.NuGetFramework,System.Collections.Generic.IEnumerable`1<NuGet.Frameworks.NuGetFramework>)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope = "member", Target = "NuGet.Frameworks.FrameworkReducer.#IsBetterPCL(NuGet.Frameworks.NuGetFramework,NuGet.Frameworks.NuGetFramework)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope = "member", Target = "NuGet.Frameworks.NuGetFramework.#TryParseCommonFramework(System.String,NuGet.Frameworks.NuGetFramework&)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Scope = "member", Target = "NuGet.Frameworks.CompatibilityListProvider.#ReduceDownwards(System.Collections.Generic.IEnumerable`1<NuGet.Frameworks.NuGetFramework>)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Scope = "member", Target = "NuGet.Frameworks.CompatibilityProvider.#IsSpecialFrameworkCompatible(NuGet.Frameworks.NuGetFramework,NuGet.Frameworks.NuGetFramework)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Scope = "member", Target = "NuGet.Frameworks.DefaultPortableFrameworkMappings.#CreateProfileFrameworks(System.Int32,NuGet.Frameworks.NuGetFramework[])")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Scope = "member", Target = "NuGet.Frameworks.FrameworkNameProvider.#AddFrameworkPrecedenceMappings(System.Collections.Generic.IDictionary`2<System.String,System.Int32>,System.Collections.Generic.IEnumerable`1<System.String>)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "includeOptional", Scope = "member", Target = "NuGet.Frameworks.FrameworkReducer.#ExplodePortableFrameworks(System.Collections.Generic.IEnumerable`1<NuGet.Frameworks.NuGetFramework>,System.Boolean)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "mappings", Scope = "member", Target = "NuGet.Frameworks.CompatibilityTable.#GetTable(System.Collections.Generic.IEnumerable`1<NuGet.Frameworks.NuGetFramework>,NuGet.Frameworks.IFrameworkNameProvider,NuGet.Frameworks.IFrameworkCompatibilityProvider)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Scope = "type", Target = "NuGet.Frameworks.FrameworkException")]
Loading

0 comments on commit ba264c6

Please sign in to comment.