Skip to content

Commit

Permalink
Fix single file / R2R for apps targeting windows 10
Browse files Browse the repository at this point in the history
  • Loading branch information
dsplaisted committed Sep 30, 2020
1 parent 655edd9 commit 843da9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ Copyright (c) .NET Foundation. All rights reserved.


<ItemGroup>
<_ResolvedCopyLocalPublishAssets Include="@(RuntimePackAsset)" Condition="'$(SelfContained)' == 'true'" />
<_ResolvedCopyLocalPublishAssets Include="@(RuntimePackAsset)"
Condition="'$(SelfContained)' == 'true' Or '%(RuntimePackAsset.RuntimePackAlwaysCopyLocal)' == 'true'" />
</ItemGroup>

<ItemGroup Condition="'$(_UseBuildDependencyFile)' != 'true'">
Expand Down Expand Up @@ -704,11 +705,6 @@ Copyright (c) .NET Foundation. All rights reserved.
<DestinationSubPath>%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)</DestinationSubPath>
</_ResolvedCopyLocalPublishAssets>

<!-- Include RuntimePackAsset where RuntimePackAlwaysCopyLocal is true -->
<_ResolvedCopyLocalPublishAssets Include="@(RuntimePackAsset)"
Condition="'%(RuntimePackAsset.RuntimePackAlwaysCopyLocal)' == 'true'">
<DestinationSubPath>%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)</DestinationSubPath>
</_ResolvedCopyLocalPublishAssets>
</ItemGroup>
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,16 @@ void Assert(DirectoryInfo outputDir)
.Should()
.Contain(i => i.RelativePath == "WinRT.Runtime.dll" && Path.GetFileName(i.Identity) == "WinRT.Runtime.dll",
because: "wapproj should copy cswinrt dlls");

// ready to run is supported
publishCommand.Execute("-p:SelfContained=true", $"-p:RuntimeIdentifier={runtimeIdentifier}", $"-p:PublishReadyToRun=true")
.Should()
.Pass();

// PublishSingleFile is supported
publishCommand.Execute("-p:SelfContained=true", $"-p:RuntimeIdentifier={runtimeIdentifier}", $"-p:PublishSingleFile=true")
.Should()
.Pass();
}

private TestAsset CreateWindowsDesktopSdkTestAsset(string projectName, string uiFrameworkProperty)
Expand Down

0 comments on commit 843da9d

Please sign in to comment.