diff options
author | Matt Ward <matt.ward@microsoft.com> | 2019-09-24 19:59:42 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-10-21 19:40:01 +0300 |
commit | b01f3bc487c086aae229c4a35c3a67e839b4902b (patch) | |
tree | 9be688716a27e83b293b92ea6ccd7367cd061427 /main/tests/test-projects | |
parent | be5bad718bcc5b4b44e568e5adc41465c5e8e869 (diff) |
[NuGet] Update multiple packages together in a batch
Updating two NuGet package references that have a strict dependency
on a single version of another NuGet package not explicitly added
to the project would fail in the Manage NuGet Packages dialog. This
was because the update would be done one package at a time. Doing
the update of the two NuGet packages together allows NuGet to
update both so they then use the new strict dependency.
Note that updating all packages in the project from the Solution
window does not have this problem since there the packages are
updated together in a batch.
Fixes VSTS #986960 - Solution nuget updater fails to update a set of
packages that all have a related dependency update
Diffstat (limited to 'main/tests/test-projects')
3 files changed, 91 insertions, 0 deletions
diff --git a/main/tests/test-projects/StrictNuGetDependency/StrictNuGetDependency.csproj b/main/tests/test-projects/StrictNuGetDependency/StrictNuGetDependency.csproj new file mode 100644 index 0000000000..27c2f80972 --- /dev/null +++ b/main/tests/test-projects/StrictNuGetDependency/StrictNuGetDependency.csproj @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{2B42BCDC-B50D-4529-85D8-D7FDEFB3447F}</ProjectGuid> + <OutputType>Library</OutputType> + <RootNamespace>StrictNuGetDependency</RootNamespace> + <AssemblyName>StrictNuGetDependency</AssemblyName> + <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG;</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>false</ConsolePause> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <Optimize>true</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>false</ConsolePause> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="Test.Xam.Strict.Dependency.A" Version="1.0.0" /> + <PackageReference Include="Test.Xam.Strict.Dependency.B" Version="1.0.0" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/main/tests/test-projects/StrictNuGetDependency/StrictNuGetDependency.csproj-saved b/main/tests/test-projects/StrictNuGetDependency/StrictNuGetDependency.csproj-saved new file mode 100644 index 0000000000..98227f7033 --- /dev/null +++ b/main/tests/test-projects/StrictNuGetDependency/StrictNuGetDependency.csproj-saved @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{2B42BCDC-B50D-4529-85D8-D7FDEFB3447F}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>StrictNuGetDependency</RootNamespace>
+ <AssemblyName>StrictNuGetDependency</AssemblyName>
+ <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Test.Xam.Strict.Dependency.A" Version="1.1.0" />
+ <PackageReference Include="Test.Xam.Strict.Dependency.B" Version="1.1.0" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file diff --git a/main/tests/test-projects/StrictNuGetDependency/StrictNuGetDependency.sln b/main/tests/test-projects/StrictNuGetDependency/StrictNuGetDependency.sln new file mode 100644 index 0000000000..4a023feaf6 --- /dev/null +++ b/main/tests/test-projects/StrictNuGetDependency/StrictNuGetDependency.sln @@ -0,0 +1,17 @@ +
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StrictNuGetDependency", "StrictNuGetDependency.csproj", "{2B42BCDC-B50D-4529-85D8-D7FDEFB3447F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2B42BCDC-B50D-4529-85D8-D7FDEFB3447F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B42BCDC-B50D-4529-85D8-D7FDEFB3447F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2B42BCDC-B50D-4529-85D8-D7FDEFB3447F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2B42BCDC-B50D-4529-85D8-D7FDEFB3447F}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
|