|
|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
<PropertyGroup>
|
|
|
<OutputType>Exe</OutputType>
|
|
|
- <TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
|
|
|
+ <TargetFrameworks>net461;net5.0</TargetFrameworks>
|
|
|
<LangVersion>preview</LangVersion>
|
|
|
<Nullable>enable</Nullable>
|
|
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
|
@@ -15,7 +15,11 @@
|
|
|
<Copyright>Copyright (c) 2008-2020 Kohsuke Kawaguchi, Sun Microsystems, Inc., CloudBees, Inc., Oleg Nenashev and other contributors</Copyright>
|
|
|
</PropertyGroup>
|
|
|
|
|
|
- <PropertyGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
|
|
+ <PropertyGroup Condition="'$(TargetFramework)' == 'net5.0' AND '$(RuntimeIdentifier)' != ''">
|
|
|
+ <PublishSingleFile>true</PublishSingleFile>
|
|
|
+ </PropertyGroup>
|
|
|
+
|
|
|
+ <PropertyGroup Condition="'$(TargetFramework)' != 'net5.0'">
|
|
|
<ILMergeVersion>3.0.40</ILMergeVersion>
|
|
|
</PropertyGroup>
|
|
|
|
|
|
@@ -23,11 +27,11 @@
|
|
|
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20303.1" />
|
|
|
</ItemGroup>
|
|
|
|
|
|
- <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
|
|
|
+ <ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
|
|
|
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.7.0" />
|
|
|
</ItemGroup>
|
|
|
|
|
|
- <ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
|
|
+ <ItemGroup Condition="'$(TargetFramework)' != 'net5.0'">
|
|
|
<PackageReference Include="ilmerge" Version="$(ILMergeVersion)" />
|
|
|
<Reference Include="System.ServiceProcess" />
|
|
|
</ItemGroup>
|
|
|
@@ -37,20 +41,20 @@
|
|
|
<ProjectReference Include="..\WinSW.Plugins\WinSW.Plugins.csproj" />
|
|
|
</ItemGroup>
|
|
|
|
|
|
- <ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
|
|
+ <ItemGroup Condition="'$(TargetFramework)' != 'net5.0'">
|
|
|
<ProjectReference Include="..\WinSW.Tasks\WinSW.Tasks.csproj">
|
|
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
|
|
</ProjectReference>
|
|
|
</ItemGroup>
|
|
|
|
|
|
- <Target Name="PublishCoreZip" AfterTargets="Publish" Condition="'$(TargetFramework)' == 'netcoreapp3.1' and '$(PublishSingleFile)' != 'true'">
|
|
|
+ <Target Name="PublishCoreZip" AfterTargets="Publish" Condition="'$(TargetFramework)' == 'net5.0' and '$(IncludeNativeLibrariesInSingleFile)' != 'true'">
|
|
|
|
|
|
<MakeDir Directories="$(ArtifactsPublishDir)" />
|
|
|
<ZipDirectory SourceDirectory="$(PublishDir)" DestinationFile="$(ArtifactsPublishDir)WinSW.NETCore.$(PlatformTarget).zip" Overwrite="true" />
|
|
|
|
|
|
</Target>
|
|
|
|
|
|
- <Target Name="PublishCoreExe" AfterTargets="Publish" Condition="'$(TargetFramework)' == 'netcoreapp3.1' and '$(PublishSingleFile)' == 'true'">
|
|
|
+ <Target Name="PublishCoreExe" AfterTargets="Publish" Condition="'$(TargetFramework)' == 'net5.0' and '$(IncludeNativeLibrariesInSingleFile)' == 'true'">
|
|
|
|
|
|
<MakeDir Directories="$(ArtifactsPublishDir)" />
|
|
|
<Copy SourceFiles="$(PublishDir)$(TargetName).exe" DestinationFiles="$(ArtifactsPublishDir)WinSW.NETCore.$(PlatformTarget).exe" />
|
|
|
@@ -58,7 +62,7 @@
|
|
|
</Target>
|
|
|
|
|
|
<!-- Merge plugins and other DLLs into the executable -->
|
|
|
- <Target Name="Merge" BeforeTargets="AfterBuild" Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
|
|
+ <Target Name="Merge" BeforeTargets="AfterBuild" Condition="'$(TargetFramework)' != 'net5.0'">
|
|
|
|
|
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
|
|
|
<TargetFrameworkSuffix>NET461</TargetFrameworkSuffix>
|
|
|
@@ -90,7 +94,7 @@
|
|
|
</Target>
|
|
|
|
|
|
<UsingTask TaskName="WinSW.Tasks.Trim" AssemblyFile="$(ArtifactsBinDir)WinSW.Tasks\$(Configuration)\net461\WinSW.Tasks.dll" />
|
|
|
- <Target Name="Trim" AfterTargets="Merge" Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
|
|
+ <Target Name="Trim" AfterTargets="Merge" Condition="'$(TargetFramework)' != 'net5.0'">
|
|
|
<Trim Path="$(ArtifactsPublishDir)WinSW.$(TargetFrameworkSuffix).exe" />
|
|
|
</Target>
|
|
|
|