From 4c60d46ab3f94295970188afe271bc0d3462bb85 Mon Sep 17 00:00:00 2001 From: Evgenii Dergachev <84813671+DergachevE@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:58:00 +0100 Subject: [PATCH] Users/dergacheve/add dotnet build for codeql (#1026) * Added dotnet build step for Windows * Fixed dotnet cli task inputs * Added VS build task * Added VS build task * Upgraded to .netstandard2.1 * Switched to dotnet CLI task * Removed reference to .NET Framework * .NET Standard for all configurations * Fixed some default behavior during the build phase --- azure-pipelines.yml | 7 +++++++ .../Properties/AssemblyInfo.cs | 1 - powershell/CompiledHelpers/VstsTaskSdk.csproj | 19 ++++++------------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ea90d6f44..02c0bea8c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -49,6 +49,13 @@ extends: nodeVersion: $(nodeVersion) - template: /azure-pipelines-steps-test-build.yml@self + - task: DotNetCoreCLI@2 + displayName: 'Build .NET project(s)' + inputs: + command: build + projects: '**/*.csproj' + arguments: '--configuration Release' + ################################################# - job: linux ################################################# diff --git a/powershell/CompiledHelpers/Properties/AssemblyInfo.cs b/powershell/CompiledHelpers/Properties/AssemblyInfo.cs index 0b1ae97d9..125901677 100644 --- a/powershell/CompiledHelpers/Properties/AssemblyInfo.cs +++ b/powershell/CompiledHelpers/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/powershell/CompiledHelpers/VstsTaskSdk.csproj b/powershell/CompiledHelpers/VstsTaskSdk.csproj index 86a5ef6df..52984e4c8 100644 --- a/powershell/CompiledHelpers/VstsTaskSdk.csproj +++ b/powershell/CompiledHelpers/VstsTaskSdk.csproj @@ -1,6 +1,10 @@  - - + + + netstandard2.1 + false + false + Debug AnyCPU @@ -12,7 +16,6 @@ true FinalPublicKey.snk true - v4.0 512 @@ -32,15 +35,6 @@ prompt 4 - - - - - - - - - @@ -48,7 +42,6 @@ -