diff --git a/eng/build.yml b/eng/build.yml index 8584685..272ae42 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -25,6 +25,12 @@ strategy: Release: BuildConfiguration: Release steps: +- task: UseDotNet@2 + displayName: Install .NET SDK + inputs: + packageType: sdk + version: 6.x + includePreviewVersions: true - task: DotNetCoreCLI@2 displayName: Build inputs: @@ -32,10 +38,8 @@ steps: projects: src\WinSW.sln arguments: -c $(BuildConfiguration) -p:Version=$(BuildVersion) - script: | - dotnet publish src\WinSW\WinSW.csproj -c $(BuildConfiguration) -f net5.0-windows -r win-x64 -p:Version=$(BuildVersion) - dotnet publish src\WinSW\WinSW.csproj -c $(BuildConfiguration) -f net5.0-windows -r win-x86 -p:Version=$(BuildVersion) - dotnet publish src\WinSW\WinSW.csproj -c $(BuildConfiguration) -f net5.0-windows -r win-x64 -p:Version=$(BuildVersion) -p:IncludeNativeLibrariesForSelfExtract=true - dotnet publish src\WinSW\WinSW.csproj -c $(BuildConfiguration) -f net5.0-windows -r win-x86 -p:Version=$(BuildVersion) -p:IncludeNativeLibrariesForSelfExtract=true + dotnet publish src\WinSW\WinSW.csproj -c $(BuildConfiguration) -f net6.0-windows -r win-x64 -p:Version=$(BuildVersion) + dotnet publish src\WinSW\WinSW.csproj -c $(BuildConfiguration) -f net6.0-windows -r win-x86 -p:Version=$(BuildVersion) displayName: Build - task: DotNetCoreCLI@2 displayName: Test @@ -55,14 +59,6 @@ steps: artifact: WinSW-net461.exe_$(BuildConfiguration) displayName: Publish .NET 4.6.1 -- publish: artifacts\publish\WinSW-x64.zip - artifact: WinSW-x64.zip_$(BuildConfiguration) - displayName: Publish .NET x64 .zip - -- publish: artifacts\publish\WinSW-x86.zip - artifact: WinSW-x86.zip_$(BuildConfiguration) - displayName: Publish .NET x86 .zip - - publish: artifacts\publish\WinSW-x64.exe artifact: WinSW-x64.exe_$(BuildConfiguration) displayName: Publish .NET x64 .exe diff --git a/src/WinSW.Core/Download.cs b/src/WinSW.Core/Download.cs index 167a1d8..f1eb799 100644 --- a/src/WinSW.Core/Download.cs +++ b/src/WinSW.Core/Download.cs @@ -122,7 +122,9 @@ namespace WinSW /// public async Task PerformAsync() { +#pragma warning disable SYSLIB0014 // Type or member is obsolete var request = WebRequest.Create(this.From); +#pragma warning restore SYSLIB0014 // Type or member is obsolete if (!string.IsNullOrEmpty(this.Proxy)) { var proxyInformation = new CustomProxyInformation(this.Proxy!); diff --git a/src/WinSW.Core/WinSW.Core.csproj b/src/WinSW.Core/WinSW.Core.csproj index 2ebd139..1b28e9e 100644 --- a/src/WinSW.Core/WinSW.Core.csproj +++ b/src/WinSW.Core/WinSW.Core.csproj @@ -1,7 +1,7 @@  - net461;net5.0-windows + net461;net6.0-windows preview enable true @@ -15,13 +15,13 @@ - + - + diff --git a/src/WinSW.Plugins/WinSW.Plugins.csproj b/src/WinSW.Plugins/WinSW.Plugins.csproj index 9dde121..3fdb8be 100644 --- a/src/WinSW.Plugins/WinSW.Plugins.csproj +++ b/src/WinSW.Plugins/WinSW.Plugins.csproj @@ -1,7 +1,7 @@  - net461;net5.0-windows + net461;net6.0-windows latest enable diff --git a/src/WinSW.Tests/WinSW.Tests.csproj b/src/WinSW.Tests/WinSW.Tests.csproj index bfd6318..a1ce104 100644 --- a/src/WinSW.Tests/WinSW.Tests.csproj +++ b/src/WinSW.Tests/WinSW.Tests.csproj @@ -1,7 +1,7 @@  - net471;net5.0-windows + net471;net6.0-windows latest @@ -20,7 +20,7 @@ - + @@ -39,11 +39,11 @@ - - <_FilesToCopy Include="$(ArtifactsBinDir)WinSW\$(Configuration)\net5.0-windows\WinSW.runtimeconfig*.json" /> + + <_FilesToCopy Include="$(ArtifactsBinDir)WinSW\$(Configuration)\net6.0-windows\WinSW.runtimeconfig*.json" /> - + <_FilesToCopy Include="$(ArtifactsBinDir)WinSW\$(Configuration)\net461\System.ValueTuple.dll" /> diff --git a/src/WinSW/WinSW.csproj b/src/WinSW/WinSW.csproj index c895380..0a3ae17 100644 --- a/src/WinSW/WinSW.csproj +++ b/src/WinSW/WinSW.csproj @@ -2,7 +2,7 @@ Exe - net461;net5.0-windows + net461;net6.0-windows preview enable true @@ -16,11 +16,11 @@ Copyright (c) 2008-2020 Kohsuke Kawaguchi, Sun Microsystems, Inc., CloudBees, Inc., Oleg Nenashev and other contributors - + true - + 3.0.41 @@ -28,7 +28,7 @@ - + @@ -38,18 +38,11 @@ - + - - - - - - - - + @@ -57,7 +50,7 @@ - + "$(OutDir)$(TargetFileName)" @@ -85,7 +78,7 @@ - +