Skip to content

Commit 6a56192

Browse files
authored
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
1 parent 4ee6f87 commit 6a56192

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

azure-pipelines.yml

+7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ extends:
4949
nodeVersion: $(nodeVersion)
5050
- template: /azure-pipelines-steps-test-build.yml@self
5151

52+
- task: DotNetCoreCLI@2
53+
displayName: 'Build .NET project(s)'
54+
inputs:
55+
command: build
56+
projects: '**/*.csproj'
57+
arguments: '--configuration Release'
58+
5259
#################################################
5360
- job: linux
5461
#################################################

powershell/CompiledHelpers/Properties/AssemblyInfo.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
32
using System.Runtime.InteropServices;
43

54
// General Information about an assembly is controlled through the following

powershell/CompiledHelpers/VstsTaskSdk.csproj

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
2+
<Project Sdk="Microsoft.NET.Sdk">
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.1</TargetFramework>
5+
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
6+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
7+
</PropertyGroup>
48
<PropertyGroup>
59
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
610
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -12,7 +16,6 @@
1216
<SignAssembly>true</SignAssembly>
1317
<AssemblyOriginatorKeyFile>FinalPublicKey.snk</AssemblyOriginatorKeyFile>
1418
<DelaySign>true</DelaySign>
15-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1619
<FileAlignment>512</FileAlignment>
1720
</PropertyGroup>
1821
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -32,23 +35,13 @@
3235
<ErrorReport>prompt</ErrorReport>
3336
<WarningLevel>4</WarningLevel>
3437
</PropertyGroup>
35-
<ItemGroup>
36-
<Reference Include="System" />
37-
<Reference Include="System.Core" />
38-
<Reference Include="System.Xml.Linq" />
39-
<Reference Include="System.Data.DataSetExtensions" />
40-
<Reference Include="Microsoft.CSharp" />
41-
<Reference Include="System.Data" />
42-
<Reference Include="System.Xml" />
43-
</ItemGroup>
4438
<ItemGroup>
4539
<Compile Include="VstsTaskSdk.cs" />
4640
<Compile Include="Properties\AssemblyInfo.cs" />
4741
</ItemGroup>
4842
<ItemGroup>
4943
<None Include="FinalPublicKey.snk" />
5044
</ItemGroup>
51-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
5245
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
5346
Other similar extension points exist, see Microsoft.Common.targets.
5447
<Target Name="BeforeBuild">

0 commit comments

Comments
 (0)