зеркало из
1
0
Форкнуть 0

Merge pull request #5 from radical/update-upstream

Merge upstream/dev
This commit is contained in:
Ankit Jain 2017-11-09 08:52:19 -05:00 коммит произвёл GitHub
Родитель b58ba42823 acf9bd4f85
Коммит b2c30bc81b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
13 изменённых файлов: 241 добавлений и 21 удалений

Просмотреть файл

@ -19,7 +19,7 @@ namespace Microsoft.NuGet.Build.Tasks.Tests.Json {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Json {
@ -152,7 +152,7 @@ namespace Microsoft.NuGet.Build.Tasks.Tests.Json {
/// "version": 2,
/// "targets": {
/// ".NETFramework,Version=v4.5": {
/// "Newtonsoft.Json/8.0.3": {
/// "Newtonsoft.Json/9.0.1": {
/// "type": "package",
/// "compile": {
/// "lib/net45/Newtonsoft.Json.dll": {}
@ -164,7 +164,7 @@ namespace Microsoft.NuGet.Build.Tasks.Tests.Json {
/// }
/// },
/// "libraries": {
/// "Newtonsoft.Json/8.0.3": {
/// "Newtonsoft.Json/9.0.1": {
/// "sha512": "KGsYQdS2zLH+H8x2cZaSI7e+YZ4SFIbyy1YJQYl6GYBWjf5o4H1A68nxyq+WTyVSOJQ4GqS/DiPE+UseUizgMg==",
/// "type": " [rest of string was truncated]";.
/// </summary>
@ -180,7 +180,7 @@ namespace Microsoft.NuGet.Build.Tasks.Tests.Json {
/// &quot;version&quot;: 2,
/// &quot;targets&quot;: {
/// &quot;.NETFramework,Version=v4.5&quot;: {
/// &quot;Newtonsoft.Json/8.0.3&quot;: {
/// &quot;Newtonsoft.Json/9.0.1&quot;: {
/// &quot;type&quot;: &quot;package&quot;,
/// &quot;compile&quot;: {
/// &quot;lib/net45/Newtonsoft.Json.dll&quot;: {}
@ -204,6 +204,36 @@ namespace Microsoft.NuGet.Build.Tasks.Tests.Json {
}
}
/// <summary>
/// Looks up a localized string similar to {
/// &quot;locked&quot;: false,
/// &quot;version&quot;: 2,
/// &quot;targets&quot;: {
/// &quot;.NETFramework,Version=v4.5&quot;: {
/// &quot;Newtonsoft.Json/9.0.1&quot;: {
/// &quot;type&quot;: &quot;package&quot;,
/// &quot;compile&quot;: {
/// &quot;lib/net45/Newtonsoft.Json.dll&quot;: {}
/// },
/// &quot;runtime&quot;: {
/// &quot;lib/net45/Newtonsoft.Json.dll&quot;: {}
/// }
/// }
/// },
/// &quot;.NETFramework,Version=v4.6&quot;: {
/// &quot;FluentAssertions/3.4.1&quot;: {
/// &quot;frameworkAssemblies&quot;: [
/// &quot;System.Xml&quot;,
/// &quot;System.Xml.Linq&quot;
/// ],
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string MultipleProjectFileDependencyGroups_CaseMismatch {
get {
return ResourceManager.GetString("MultipleProjectFileDependencyGroups_CaseMismatch", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {
/// &quot;locked&quot;: false,

Просмотреть файл

@ -148,4 +148,7 @@
<data name="ProjectDependency" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>ProjectDependency.assets.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="MultipleProjectFileDependencyGroups_CaseMismatch" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>multipleprojectfiledependencygroups_casemismatch.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
</root>

Просмотреть файл

@ -18,7 +18,7 @@
"Newtonsoft.Json/9.0.1": {
"sha512": "KGsYQdS2zLH+H8x2cZaSI7e+YZ4SFIbyy1YJQYl6GYBWjf5o4H1A68nxyq+WTyVSOJQ4GqS/DiPE+UseUizgMg==",
"type": "package",
"path": "newtonsoft.json/current",
"path": "newtonsoft.json/9.0.1",
"files": [
"lib/net20/Newtonsoft.Json.dll",
"lib/net20/Newtonsoft.Json.xml",

Просмотреть файл

@ -34,7 +34,7 @@
"Newtonsoft.Json/9.0.1": {
"sha512": "KGsYQdS2zLH+H8x2cZaSI7e+YZ4SFIbyy1YJQYl6GYBWjf5o4H1A68nxyq+WTyVSOJQ4GqS/DiPE+UseUizgMg==",
"type": "package",
"path": "newtonsoft.json/current",
"path": "newtonsoft.json/9.0.1",
"files": [
"lib/net20/Newtonsoft.Json.dll",
"lib/net20/Newtonsoft.Json.xml",

Просмотреть файл

@ -0,0 +1,150 @@
{
"locked": false,
"version": 2,
"targets": {
".NETFramework,Version=v4.5": {
"Newtonsoft.Json/9.0.1": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
},
"runtime": {
"lib/net45/Newtonsoft.Json.dll": {}
}
}
},
".NETFramework,Version=v4.6": {
"FluentAssertions/3.4.1": {
"frameworkAssemblies": [
"System.Xml",
"System.Xml.Linq"
],
"compile": {
"lib/net45/FluentAssertions.Core.dll": {},
"lib/net45/FluentAssertions.dll": {}
},
"runtime": {
"lib/net45/FluentAssertions.Core.dll": {},
"lib/net45/FluentAssertions.dll": {}
}
}
}
},
"libraries": {
"Newtonsoft.Json/9.0.1": {
"sha512": "KGsYQdS2zLH+H8x2cZaSI7e+YZ4SFIbyy1YJQYl6GYBWjf5o4H1A68nxyq+WTyVSOJQ4GqS/DiPE+UseUizgMg==",
"type": "package",
"path": "newtonsoft.json/9.0.1",
"files": [
"lib/net20/Newtonsoft.Json.dll",
"lib/net20/Newtonsoft.Json.xml",
"lib/net35/Newtonsoft.Json.dll",
"lib/net35/Newtonsoft.Json.xml",
"lib/net40/Newtonsoft.Json.dll",
"lib/net40/Newtonsoft.Json.xml",
"lib/net45/Newtonsoft.Json.dll",
"lib/net45/Newtonsoft.Json.xml",
"lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll",
"lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml",
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll",
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.xml",
"newtonsoft.json.9.0.1.nupkg.sha512",
"newtonsoft.json.nuspec",
"tools/install.ps1"
]
},
"FluentAssertions/3.4.1": {
"sha512": "GTyLzP7d57D3HLVOSFrTSVwod3rZNQRMC2DR13u1hNNyhsskLrbI4SW5XXqyEv8WP7v8IqWx9hdlDiwLY0G8YA==",
"type": "Package",
"files": [
"_rels/.rels",
"FluentAssertions.nuspec",
"lib/net40/FluentAssertions.Core.dll",
"lib/net40/FluentAssertions.Core.pdb",
"lib/net40/FluentAssertions.Core.xml",
"lib/net40/FluentAssertions.dll",
"lib/net40/FluentAssertions.pdb",
"lib/net40/FluentAssertions.xml",
"lib/net45/FluentAssertions.Core.dll",
"lib/net45/FluentAssertions.Core.pdb",
"lib/net45/FluentAssertions.Core.xml",
"lib/net45/FluentAssertions.dll",
"lib/net45/FluentAssertions.pdb",
"lib/net45/FluentAssertions.xml",
"lib/portable-monotouch+monoandroid+xamarin.ios/FluentAssertions.Core.dll",
"lib/portable-monotouch+monoandroid+xamarin.ios/FluentAssertions.Core.pdb",
"lib/portable-monotouch+monoandroid+xamarin.ios/FluentAssertions.Core.xml",
"lib/portable-net40+sl5+win8+wp8+wpa81/FluentAssertions.Core.dll",
"lib/portable-net40+sl5+win8+wp8+wpa81/FluentAssertions.Core.pdb",
"lib/portable-net40+sl5+win8+wp8+wpa81/FluentAssertions.Core.xml",
"lib/portable-net40+sl5+win8+wp8+wpa81/FluentAssertions.dll",
"lib/portable-net40+sl5+win8+wp8+wpa81/FluentAssertions.pdb",
"lib/portable-net40+sl5+win8+wp8+wpa81/FluentAssertions.XML",
"lib/portable-win81+wpa81/FluentAssertions.Core.dll",
"lib/portable-win81+wpa81/FluentAssertions.Core.pdb",
"lib/portable-win81+wpa81/FluentAssertions.Core.xml",
"lib/portable-win81+wpa81/FluentAssertions.dll",
"lib/portable-win81+wpa81/FluentAssertions.pdb",
"lib/portable-win81+wpa81/FluentAssertions.xml",
"lib/sl5/FluentAssertions.Core.dll",
"lib/sl5/FluentAssertions.Core.pdb",
"lib/sl5/FluentAssertions.Core.xml",
"lib/sl5/FluentAssertions.dll",
"lib/sl5/FluentAssertions.pdb",
"lib/sl5/FluentAssertions.xml",
"lib/sl5/Microsoft.CSharp.dll",
"lib/sl5/Microsoft.CSharp.xml",
"lib/sl5/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll",
"lib/sl5/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.xml",
"lib/sl5/System.Xml.Linq.dll",
"lib/sl5/System.Xml.Linq.xml",
"lib/sl5/de/Microsoft.CSharp.resources.dll",
"lib/sl5/de/System.Xml.Linq.resources.dll",
"lib/sl5/es/Microsoft.CSharp.resources.dll",
"lib/sl5/es/System.Xml.Linq.resources.dll",
"lib/sl5/fr/Microsoft.CSharp.resources.dll",
"lib/sl5/fr/System.Xml.Linq.resources.dll",
"lib/sl5/it/Microsoft.CSharp.resources.dll",
"lib/sl5/it/System.Xml.Linq.resources.dll",
"lib/sl5/ja/Microsoft.CSharp.resources.dll",
"lib/sl5/ja/System.Xml.Linq.resources.dll",
"lib/sl5/ko/Microsoft.CSharp.resources.dll",
"lib/sl5/ko/System.Xml.Linq.resources.dll",
"lib/sl5/ru/Microsoft.CSharp.resources.dll",
"lib/sl5/ru/System.Xml.Linq.resources.dll",
"lib/sl5/zh-Hans/Microsoft.CSharp.resources.dll",
"lib/sl5/zh-Hans/System.Xml.Linq.resources.dll",
"lib/sl5/zh-Hant/Microsoft.CSharp.resources.dll",
"lib/sl5/zh-Hant/System.Xml.Linq.resources.dll",
"lib/win8/FluentAssertions.Core.dll",
"lib/win8/FluentAssertions.Core.pdb",
"lib/win8/FluentAssertions.Core.xml",
"lib/win8/FluentAssertions.dll",
"lib/win8/FluentAssertions.pdb",
"lib/win8/FluentAssertions.XML",
"lib/wp8/FluentAssertions.Core.dll",
"lib/wp8/FluentAssertions.Core.pdb",
"lib/wp8/FluentAssertions.Core.xml",
"lib/wp8/FluentAssertions.dll",
"lib/wp8/FluentAssertions.pdb",
"lib/wp8/FluentAssertions.xml",
"package/services/metadata/core-properties/c21a09dd42de4a6295af89109b879195.psmdcp",
"[Content_Types].xml"
]
}
},
"projectFileDependencyGroups": {
"": [],
".NETFramework,Version=v4.5": [
"newtonsoft.json >= 8.0.1"
],
".NETFramework,Version=v4.6": [
"fluentassertions >= 3.4.1"
]
},
"tools": {},
"projectFileToolGroups": {},
"packageFolders": {
"C:\\PackageFolder\\": {}
}
}

Просмотреть файл

@ -34,8 +34,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.Build.Utilities.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
@ -78,6 +76,7 @@
<None Include="Json\analyzers.json" />
<None Include="Json\FluentAssertions.lock.json" />
<None Include="Json\FluentAssertionsAndWin10.lock.json" />
<None Include="Json\MultipleProjectFileDependencyGroups_CaseMismatch.json" />
<None Include="Json\MultipleProjectFileDependencyGroups.json" />
<None Include="Json\nativeWinMD.json" />
<None Include="Json\LockFileWithWithSpecifiedPackageFolders.json" />

Просмотреть файл

@ -18,7 +18,7 @@ namespace Microsoft.NuGet.Build.Tasks.Tests
runtimeIdentifier: null,
createTemporaryFolderForPackages: false);
Assert.Equal(@"C:\PackageFolder\newtonsoft.json\8.0.3\lib\net45\Newtonsoft.Json.dll", result.References.Single().ItemSpec);
Assert.Equal(@"C:\PackageFolder\newtonsoft.json\9.0.1\lib\net45\Newtonsoft.Json.dll", result.References.Single().ItemSpec);
}
}
}

Просмотреть файл

@ -414,6 +414,33 @@ namespace Microsoft.NuGet.Build.Tasks.Tests
Assert.Contains("FluentAssertions", packageNames);
}
// Regression test for https://devdiv.visualstudio.com/DevDiv/_workitems?id=500532&_a=edit
[Fact]
public static void MultipleProjectFileDependencyGroups_MismatchedCases()
{
var resultFor45 = NuGetTestHelpers.ResolvePackagesWithJsonFileContents(
Json.Json.MultipleProjectFileDependencyGroups_CaseMismatch,
targetMoniker: ".NETFramework,Version=v4.5",
runtimeIdentifier: "win",
allowFallbackOnTargetSelection: true);
var packageNames = resultFor45.ReferencedPackages.Select(t => t.ItemSpec);
Assert.Equal("Newtonsoft.Json", packageNames.Single(), ignoreCase: true);
var resultFor46 = NuGetTestHelpers.ResolvePackagesWithJsonFileContents(
Json.Json.MultipleProjectFileDependencyGroups,
targetMoniker: ".NETFramework,Version=v4.6",
runtimeIdentifier: "win",
allowFallbackOnTargetSelection: true);
AssertHelpers.AssertCountOf(1, resultFor46.ReferencedPackages);
packageNames = resultFor46.ReferencedPackages.Select(t => t.ItemSpec);
Assert.Equal("FluentAssertions", packageNames.Single(), ignoreCase: true);
}
[Fact]
public static void ProjectsNotIncludedInReferences()
{

Просмотреть файл

@ -14,10 +14,4 @@ Copyright (c) .NET Foundation. All rights reserved.
<NuGetTargets Condition="'$(NuGetTargets)'==''">$(MSBuildExtensionsPath)\Microsoft\NuGet\Microsoft.NuGet.targets</NuGetTargets>
</PropertyGroup>
<Import Condition="Exists('$(NuGetTargets)') and '$(SkipImportNuGetBuildTargets)' != 'true'" Project="$(NuGetTargets)" />
<!-- Import NuGet.targets for Restore -->
<PropertyGroup>
<NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'==''">$(MSBuildExtensionsPath)\NuGet.targets</NuGetRestoreTargets>
</PropertyGroup>
<Import Condition="Exists('$(NuGetRestoreTargets)')" Project="$(NuGetRestoreTargets)" />
</Project>

Просмотреть файл

@ -34,8 +34,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.Build.Utilities.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />

Просмотреть файл

@ -231,6 +231,8 @@ Copyright (c) .NET Foundation. All rights reserved.
</CreateItem>
</Target>
<Target Name="CollectReferencedNuGetPackages" Returns="@(ReferencedNuGetPackages)"/>
<Target Name="RuntimeImplementationProjectOutputGroup"
Returns="@(RuntimeImplementationProjectOutputGroupOutput)"
Condition="'$(ResolveNuGetPackages)' == 'true' and exists('$(ProjectLockFile)')">
@ -262,6 +264,7 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<PropertyGroup>
<NuGetTargetFrameworkMonikerToInject Condition="'$(NuGetTargetFrameworkMonikerToInject)' == ''">.NETCore,Version=v5.0</NuGetTargetFrameworkMonikerToInject>
<NuGetTargetMonikerToInject Condition="$(DotNetNativeVersion.StartsWith('2.0')) and '$(NuGetTargetMonikerToInject)' == ''">UAP,Version=v10.0.15138</NuGetTargetMonikerToInject>
<NuGetTargetMonikerToInject Condition="'$(NuGetTargetMonikerToInject)' == ''">.NETCore,Version=v5.0</NuGetTargetMonikerToInject>
<_ComputeNetCoreFrameworkInjectionParametersBeforeTargets Condition="'$(AppxPackage)' == 'true' and '$(TargetPlatformIdentifier)' == 'UAP'">BeforeGenerateProjectPriFile</_ComputeNetCoreFrameworkInjectionParametersBeforeTargets>
</PropertyGroup>
@ -271,6 +274,8 @@ Copyright (c) .NET Foundation. All rights reserved.
<_PackagingOutputsIncludesFramework Condition="'%(PackagingOutputs.FileName)%(PackagingOutputs.Extension)' == 'System.Runtime.dll'">true</_PackagingOutputsIncludesFramework>
<_AppContainsManagedCodeForInjection Condition="'%(PackagingOutputs.Identity)' == '$(_TargetPlatformSdkDir)UnionMetadata\Windows.winmd'">true</_AppContainsManagedCodeForInjection>
<_AppContainsManagedCodeForInjection Condition="'%(PackagingOutputs.Identity)' == '$(WindowsSDK_UnionMetadataPath)\Windows.winmd'">true</_AppContainsManagedCodeForInjection>
<!-- In some scenarios (e.g. JavaScript UWP apps) the WindowsSDK_UnionMetadataPath may not be set. Check the target for completeness. -->
<_AppContainsManagedCodeForInjection Condition="'%(PackagingOutputs.TargetPath)' == '$(WinMetadataDir)\Windows.winmd'">true</_AppContainsManagedCodeForInjection>
</PropertyGroup>
<PropertyGroup>
@ -292,7 +297,14 @@ Copyright (c) .NET Foundation. All rights reserved.
</GetReferenceAssemblyPaths>
<PropertyGroup>
<FrameworkInjectionLockFile Condition="'$(FrameworkInjectionLockFile)' == '' and $(DotNetNativeVersion.StartsWith('1.7'))">@(_NuGetInjectionSourceDirectories->'%(Identity)\RS2.project.lock.json')</FrameworkInjectionLockFile>
<FrameworkInjectionLockFile Condition="'$(FrameworkInjectionLockFile)' == '' and $(DotNetNativeVersion.StartsWith('2.0'))">@(_NuGetInjectionSourceDirectories->'%(Identity)\RS3.project.lock.json')</FrameworkInjectionLockFile>
<FrameworkInjectionLockFile Condition="'$(FrameworkInjectionLockFile)' == ''">@(_NuGetInjectionSourceDirectories->'%(Identity)\project.lock.json')</FrameworkInjectionLockFile>
<!-- If the file doesn't exist try to fall back to 5.2.2 file -->
<NuGetTargetMonikerToInject Condition="!Exists('$(FrameworkInjectionLockFile)')">.NETCore,Version=v5.0</NuGetTargetMonikerToInject>
<FrameworkInjectionLockFile Condition="!Exists('$(FrameworkInjectionLockFile)')">@(_NuGetInjectionSourceDirectories->'%(Identity)\project.lock.json')</FrameworkInjectionLockFile>
<FrameworkInjectionPackagesDirectory Condition="'$(FrameworkInjectionPackagesDirectory)' == ''">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\NuGet\Repository', 'NETCoreSDK', null, RegistryView.Registry32, RegistryView.Default))</FrameworkInjectionPackagesDirectory>
</PropertyGroup>

Просмотреть файл

@ -892,7 +892,7 @@ namespace Microsoft.NuGet.Build.Tasks
/// </summary>
private static SortedSet<string> GetAllPackageNames(JObject lockFile)
{
var allPackageNames = new SortedSet<string>();
var allPackageNames = new SortedSet<string>(StringComparer.OrdinalIgnoreCase);
var libraries = (JObject)lockFile["libraries"];
foreach (var library in libraries)
{

Просмотреть файл

@ -1,5 +1,12 @@
{
"dependencies": { "Newtonsoft.Json": "6.0.4" },
"frameworks": { "net45": { } },
"runtimes": { "win": { } }
"dependencies": {
"Microsoft.Build.Utilities.Core": "14.3.0",
"Newtonsoft.Json": "6.0.4"
},
"frameworks": {
"net45": {}
},
"runtimes": {
"win": {}
}
}