Skip to content

Commit

Permalink
Deploy copy-local package satellites correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
nguerrera committed May 18, 2017
1 parent 81be051 commit 25c7fce
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net46</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentValidation" Version="5.5.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;

namespace TestApp
{
class Program
{
static void Main()
{
Console.WriteLine("Hello World");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,10 @@ Copyright (c) .NET Foundation. All rights reserved.

<!-- Add the copy local items -->
<ItemGroup>
<ReferenceCopyLocalPaths Include="@(AllCopyLocalItems)" />
<ReferenceCopyLocalPaths Include="@(AllCopyLocalItems)" Exclude="@(ResourceCopyLocalItems)" />
<ReferenceCopyLocalPaths Include="@(ResourceCopyLocalItems)" Condition="'@(ResourceCopyLocalItems)' != ''">
<DestinationSubDirectory>$([System.IO.Directory]::GetParent(%(ResourceCopyLocalItems.FullPath)).get_Name())\</DestinationSubDirectory>
</ReferenceCopyLocalPaths>
</ItemGroup>

</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,5 +377,24 @@ public void It_generates_binding_redirects_if_needed()
"DesktopNeedsBindingRedirects.exe.config"
});
}

[WindowsOnlyFact]
public void It_places_package_satellites_correctly()
{
var testAsset = _testAssetsManager
.CopyTestAsset("DesktopUsingPackageWithSatellites")
.WithSource()
.Restore(Log);

var buildCommand = new BuildCommand(Log, testAsset.TestRoot);
buildCommand
.Execute()
.Should()
.Pass();

var outputDirectory = buildCommand.GetOutputDirectory("net46");
outputDirectory.Should().NotHaveFile("FluentValidation.resources.dll");
outputDirectory.Should().HaveFile(@"fr\FluentValidation.resources.dll");
}
}
}

0 comments on commit 25c7fce

Please sign in to comment.