diff --git a/eng/build.yml b/eng/build.yml
index 274add5..512178a 100644
--- a/eng/build.yml
+++ b/eng/build.yml
@@ -27,12 +27,29 @@ jobs:
Release:
BuildConfiguration: Release
steps:
+ - task: UseDotNet@2
+ displayName: Install .NET SDK
+ inputs:
+ packageType: sdk
+ version: 5.x
+ includePreviewVersions: true
+ - task: DotNetCoreCLI@2
+ displayName: Build
+ inputs:
+ command: build
+ projects: src\WinSW.sln
+ arguments: -c $(BuildConfiguration) -p:Version=$(BuildVersion)
- script: |
- dotnet build -c $(BuildConfiguration) src\WinSW.sln -p:Version=$(BuildVersion)
dotnet publish -c $(BuildConfiguration) -f netcoreapp3.1 src\WinSW\WinSW.csproj -p:Version=$(BuildVersion)
dotnet publish -c $(BuildConfiguration) -f netcoreapp3.1 -r win-x64 src\WinSW\WinSW.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=$(BuildVersion)
dotnet publish -c $(BuildConfiguration) -f netcoreapp3.1 -r win-x86 src\WinSW\WinSW.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=$(BuildVersion)
displayName: Build
+ - task: DotNetCoreCLI@2
+ displayName: Test
+ inputs:
+ command: test
+ projects: src\WinSW.Tests\WinSW.Tests.csproj
+ arguments: -c $(BuildConfiguration) --no-build
- task: NuGetToolInstaller@1
displayName: Install Nuget
inputs:
@@ -44,30 +61,18 @@ jobs:
packagesToPack: WinSW.nuspec
versioningScheme: byEnvVar
versionEnvVar: BuildVersion
- - script: dotnet test -c $(BuildConfiguration) --no-build src\WinSW.Tests\WinSW.Tests.csproj
- displayName: Test
- - task: PublishBuildArtifacts@1
+ - publish: artifacts\WinSW.NET461.exe
+ artifact: WinSW.NET461.exe_$(BuildConfiguration)
displayName: Publish .NET 4.6.1
- inputs:
- PathtoPublish: artifacts\WinSW.NET461.exe
- ArtifactName: WinSW.NET461.exe_$(BuildConfiguration)
- - task: PublishBuildArtifacts@1
- displayName: Publish .NET Core 3.1
- inputs:
- PathtoPublish: artifacts\WinSW.NETCore31.zip
- ArtifactName: WinSW.NETCore31.zip_$(BuildConfiguration)
- - task: PublishBuildArtifacts@1
- displayName: Publish .NET Core 3.1 x64
- inputs:
- PathtoPublish: artifacts\WinSW.NETCore31.x64.exe
- ArtifactName: WinSW.NETCore31.x64.exe_$(BuildConfiguration)
- - task: PublishBuildArtifacts@1
- displayName: Publish .NET Core 3.1 x86
- inputs:
- PathtoPublish: artifacts\WinSW.NETCore31.x86.exe
- ArtifactName: WinSW.NETCore31.x86.exe_$(BuildConfiguration)
- - task: PublishBuildArtifacts@1
+ - publish: artifacts\WinSW.NETCore31.zip
+ artifact: WinSW.NETCore31.zip_$(BuildConfiguration)
+ displayName: Publish .NET Core
+ - publish: artifacts\WinSW.NETCore31.x64.exe
+ artifact: WinSW.NETCore31.x64.exe_$(BuildConfiguration)
+ displayName: Publish .NET Core x64
+ - publish: artifacts\WinSW.NETCore31.x86.exe
+ artifact: WinSW.NETCore31.x86.exe_$(BuildConfiguration)
+ displayName: Publish .NET Core x86
+ - publish: $(Build.ArtifactStagingDirectory)\WinSW.$(BuildVersion).nupkg
+ artifact: WinSW.nupkg_$(BuildConfiguration)
displayName: Publish Nuget
- inputs:
- PathtoPublish: $(Build.ArtifactStagingDirectory)\WinSW.$(BuildVersion).nupkg
- ArtifactName: WinSW.nupkg_$(BuildConfiguration)
diff --git a/src/WinSW.Core/WinSW.Core.csproj b/src/WinSW.Core/WinSW.Core.csproj
index 9ee3ccd..4bfa427 100644
--- a/src/WinSW.Core/WinSW.Core.csproj
+++ b/src/WinSW.Core/WinSW.Core.csproj
@@ -32,7 +32,6 @@
-
diff --git a/src/WinSW.Plugins/WinSW.Plugins.csproj b/src/WinSW.Plugins/WinSW.Plugins.csproj
index f851150..973f576 100644
--- a/src/WinSW.Plugins/WinSW.Plugins.csproj
+++ b/src/WinSW.Plugins/WinSW.Plugins.csproj
@@ -7,10 +7,6 @@
true
-
-
-
-
diff --git a/src/WinSW.Tests/WinSW.Tests.csproj b/src/WinSW.Tests/WinSW.Tests.csproj
index a81314f..a1ba394 100644
--- a/src/WinSW.Tests/WinSW.Tests.csproj
+++ b/src/WinSW.Tests/WinSW.Tests.csproj
@@ -1,7 +1,7 @@
- net461;netcoreapp3.1
+ net461;netcoreapp5.0
latest
@@ -18,8 +18,7 @@
-
-
+
diff --git a/src/WinSW/WinSW.csproj b/src/WinSW/WinSW.csproj
index fe2a416..bc5c6d9 100644
--- a/src/WinSW/WinSW.csproj
+++ b/src/WinSW/WinSW.csproj
@@ -24,7 +24,6 @@
-