From cb9a86f0fd768e7fbd99bdea0f98678613d7d03f Mon Sep 17 00:00:00 2001 From: Caelan Sayler Date: Thu, 14 Mar 2024 17:20:50 +0000 Subject: [PATCH] Refactor self contained nuget package into it's own target file --- Velopack.sln | 1 + src/Directory.Build.props | 1 + src/Directory.Build.targets | 5 ++--- src/SelfContained.targets | 22 ++++++++++++++++++++++ src/Velopack.Build/Velopack.Build.csproj | 22 +++++----------------- 5 files changed, 31 insertions(+), 20 deletions(-) create mode 100644 src/SelfContained.targets diff --git a/Velopack.sln b/Velopack.sln index f86afbaa..5bb0dff0 100644 --- a/Velopack.sln +++ b/Velopack.sln @@ -16,6 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionLevel", "SolutionLe nuget.config = nuget.config README.md = README.md Velopack.entitlements = Velopack.entitlements + src\SelfContained.targets = src\SelfContained.targets version.json = version.json EndProjectSection EndProject diff --git a/src/Directory.Build.props b/src/Directory.Build.props index d5c9d9a4..201018a5 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -9,6 +9,7 @@ $(BaseOutputPath)$(Configuration)\ true false + $(MSBuildThisFileDirectory)SelfContained.targets en embedded diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 5573fd45..fb1b2c24 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,7 +1,6 @@ - - + false Copyright © Velopack Ltd. All rights reserved. @@ -79,5 +78,5 @@ - + \ No newline at end of file diff --git a/src/SelfContained.targets b/src/SelfContained.targets new file mode 100644 index 00000000..5856c0d8 --- /dev/null +++ b/src/SelfContained.targets @@ -0,0 +1,22 @@ + + + + + + false + $(TargetsForTfmSpecificContentInPackage);IncludeTfmDependenciesInPackage + + true + true + $(BaseOutputPath)$(Configuration)\$(ProjectName)\ + + + + + + build\$(TargetFramework) + + + + + diff --git a/src/Velopack.Build/Velopack.Build.csproj b/src/Velopack.Build/Velopack.Build.csproj index 810068ae..9968b184 100644 --- a/src/Velopack.Build/Velopack.Build.csproj +++ b/src/Velopack.Build/Velopack.Build.csproj @@ -11,34 +11,22 @@ Velopack.Build true + true true - - false - $(TargetsForTfmSpecificContentInPackage);IncludeTfmDependenciesInPackage - - true - - + + - - + + - - - - build\$(TargetFramework) - - - - \ No newline at end of file