fix few warnings (#39)

This commit is contained in:
Sergey Kanzhelev 2019-05-22 13:50:52 -07:00 committed by GitHub
parent 1974c58d92
commit f2e5307f75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 56 additions and 32 deletions

View File

@ -24,7 +24,7 @@ jobs:
displayName: build solution (Release)
inputs:
command: "build"
projects: OpenTelemetry.sln
projects: OpenTelemetry.proj
arguments: "--configuration Release"
# consider switch to https://docs.microsoft.com/vsts/pipelines/tasks/test/vstest?view=vsts
@ -50,7 +50,7 @@ jobs:
displayName: build
inputs:
command: "build"
projects: OpenTelemetry.sln
projects: OpenTelemetry.proj
arguments: "--configuration Release"
- task: DotNetCoreCLI@2

View File

@ -24,7 +24,7 @@ steps:
displayName: pack solution with symbols (Release)
inputs:
command: "pack"
projects: OpenTelemetry.sln
projects: OpenTelemetry.proj
configuration: 'Release'
packDirectory: '$(build.artifactStagingDirectory)'
buildProperties: "SymbolPackageFormat=snupkg"

19
OpenTelemetry.proj Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project=".\build\Version.props" />
<ItemGroup>
<Solution Include="OpenTelemetry.sln" />
</ItemGroup>
<!-- The only need for this file is to synchronize the PreReleaseVersion -->
<Target Name="Build">
<MSBuild Projects="@(Solution)" Targets="Restore;Build" ContinueOnError="ErrorAndStop" Properties="PreReleaseVersion=$(PreReleaseVersion)"/>
</Target>
<Target Name="Pack">
<MSBuild Projects="@(Solution)" Targets="Restore;Build;Pack" ContinueOnError="ErrorAndStop" Properties="PreReleaseVersion=$(PreReleaseVersion)"/>
</Target>
</Project>

View File

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Version.props" />
<PropertyGroup>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)/OpenTelemetry.prod.ruleset</CodeAnalysisRuleSet>
<DocumentationFile Condition="$(OS) == 'Windows_NT'">$(OutputPath)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>
<PackageOutputPath Condition="$(Build_ArtifactStagingDirectory) != ''">$(Build_ArtifactStagingDirectory)</PackageOutputPath>
<GenerateDocumentationFile Condition="$(OS) == 'Windows_NT'">true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="$(OS) == 'Windows_NT'">
@ -17,34 +19,6 @@
<AdditionalFiles Include="$(MSBuildThisFileDirectory)/stylecop.json" />
</ItemGroup>
<PropertyGroup>
<!--
Semantic Version. See http://semver.org for full details.
Update for every public release.
-->
<SemanticVersionMajor>0</SemanticVersionMajor>
<SemanticVersionMinor>1</SemanticVersionMinor>
<SemanticVersionPatch>0</SemanticVersionPatch>
<!--Valid values: beta1, beta2, EMPTY for stable -->
<PreReleaseMilestone>alpha</PreReleaseMilestone>
<!--
Date when Semantic Version was changed.
Update for every public release.
NOTE!!!!!! Do not update when updating PreReleaseMilestone update
as it will restart file versions so 2.4.0-beta1 may have higher
file version (like 2.4.0.2222) than 2.4.0-beta2 (like 2.4.0.1111)
-->
<SemanticVersionDate>2018-08-25</SemanticVersionDate>
<PreReleaseVersion Condition="'$(PreReleaseVersion)'==''">$([MSBuild]::Divide($([System.DateTime]::Now.Subtract($([System.DateTime]::Parse($(SemanticVersionDate)))).TotalMinutes), 5).ToString('F0'))</PreReleaseVersion>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>$(SemanticVersionMajor).$(SemanticVersionMinor).$(SemanticVersionPatch)</VersionPrefix>
<VersionSuffix>$(PreReleaseMilestone)-$(PreReleaseVersion)</VersionSuffix>
<FileVersion Condition="'$(PreReleaseVersion)' != ''">$(SemanticVersionMajor).$(SemanticVersionMinor).$(SemanticVersionPatch).$(PreReleaseVersion)</FileVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Optional: Declare that the Repository URL can be published to NuSpec -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>

30
build/Version.props Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!--
Semantic Version. See http://semver.org for full details.
Update for every public release.
-->
<SemanticVersionMajor>0</SemanticVersionMajor>
<SemanticVersionMinor>1</SemanticVersionMinor>
<SemanticVersionPatch>0</SemanticVersionPatch>
<!--Valid values: beta1, beta2, EMPTY for stable -->
<PreReleaseMilestone>alpha</PreReleaseMilestone>
<!--
Date when Semantic Version was changed.
Update for every public release.
NOTE!!!!!! Do not update when updating PreReleaseMilestone update
as it will restart file versions so 2.4.0-beta1 may have higher
file version (like 2.4.0.2222) than 2.4.0-beta2 (like 2.4.0.1111)
-->
<SemanticVersionDate>2018-08-25</SemanticVersionDate>
<PreReleaseVersion Condition="'$(PreReleaseVersion)'==''">$([MSBuild]::Divide($([System.DateTime]::Now.Subtract($([System.DateTime]::Parse($(SemanticVersionDate)))).TotalMinutes), 5).ToString('F0'))</PreReleaseVersion>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>$(SemanticVersionMajor).$(SemanticVersionMinor).$(SemanticVersionPatch)</VersionPrefix>
<VersionSuffix>$(PreReleaseMilestone)-$(PreReleaseVersion)</VersionSuffix>
<FileVersion Condition="'$(PreReleaseVersion)' != ''">$(SemanticVersionMajor).$(SemanticVersionMinor).$(SemanticVersionPatch).$(PreReleaseVersion)</FileVersion>
</PropertyGroup>
</Project>

View File

@ -1,4 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\Version.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>