mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Refactor self contained nuget package into it's own target file
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
|
||||
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
<BeforeTargetFrameworkInferenceTargets>$(MSBuildThisFileDirectory)SelfContained.targets</BeforeTargetFrameworkInferenceTargets>
|
||||
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
<DebugType>embedded</DebugType>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
|
||||
<!-- Automatically add all NuGet related properties if VelopackPackageId is set -->
|
||||
<PropertyGroup Condition=" '$(VelopackPackageId)' != '' ">
|
||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||
<Copyright>Copyright © Velopack Ltd. All rights reserved.</Copyright>
|
||||
|
||||
22
src/SelfContained.targets
Normal file
22
src/SelfContained.targets
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
|
||||
<PropertyGroup Condition=" '$(VelopackPackageSelfContained)' == 'true' ">
|
||||
<!-- Include all project/package dependencies in produced NuGet package -->
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludeTfmDependenciesInPackage</TargetsForTfmSpecificContentInPackage>
|
||||
<!-- https://learn.microsoft.com/dotnet/core/project-sdk/msbuild-props?WT.mc_id=DT-MVP-5003472#copylocallockfileassemblies -->
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
|
||||
<OutputPath>$(BaseOutputPath)$(Configuration)\$(ProjectName)\</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="IncludeTfmDependenciesInPackage">
|
||||
<ItemGroup>
|
||||
<TfmSpecificPackageFile Include="$(TargetDir)**/*.*">
|
||||
<PackagePath>build\$(TargetFramework)</PackagePath>
|
||||
</TfmSpecificPackageFile>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -11,34 +11,22 @@
|
||||
<PropertyGroup>
|
||||
<VelopackPackageId>Velopack.Build</VelopackPackageId>
|
||||
<VelopackPackageVendorLibs>true</VelopackPackageVendorLibs>
|
||||
<VelopackPackageSelfContained>true</VelopackPackageSelfContained>
|
||||
<DevelopmentDependency>true</DevelopmentDependency>
|
||||
<!-- Include all project/package dependencies in produced NuGet package -->
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludeTfmDependenciesInPackage</TargetsForTfmSpecificContentInPackage>
|
||||
<!-- https://learn.microsoft.com/dotnet/core/project-sdk/msbuild-props?WT.mc_id=DT-MVP-5003472#copylocallockfileassemblies -->
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Velopack.Packaging.Unix\Velopack.Packaging.Unix.csproj" PrivateAssets="all" />
|
||||
<ProjectReference Include="..\Velopack.Packaging.Windows\Velopack.Packaging.Windows.csproj" PrivateAssets="all" />
|
||||
<ProjectReference Include="..\Velopack.Packaging.Unix\Velopack.Packaging.Unix.csproj" />
|
||||
<ProjectReference Include="..\Velopack.Packaging.Windows\Velopack.Packaging.Windows.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.9.5" PrivateAssets="all" />
|
||||
<PackageReference Include="Riok.Mapperly" Version="3.3.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.9.5" />
|
||||
<PackageReference Include="Riok.Mapperly" Version="3.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Velopack.Build.targets" Pack="true" PackagePath="build/Velopack.Build.targets" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="IncludeTfmDependenciesInPackage">
|
||||
<ItemGroup>
|
||||
<TfmSpecificPackageFile Include="$(TargetDir)*.*">
|
||||
<PackagePath>build\$(TargetFramework)</PackagePath>
|
||||
</TfmSpecificPackageFile>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user