Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix .NET Core 3.0 build break #136

Merged
merged 2 commits into from
Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<DefaultItemExcludes>*log</DefaultItemExcludes>
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
<LangVersion>Latest</LangVersion>
</PropertyGroup>

<PropertyGroup>
<Authors>Microsoft</Authors>
<Company>Microsoft</Company>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageLicenseFile>$(MSBuildThisFileDirectory)LICENSE.txt</PackageLicenseFile>
<PackageProjectUrl>https://github.com/Microsoft/MSBuildSdks</PackageProjectUrl>
<PackageIconUrl>https://github.com/Microsoft/msbuild/raw/master/branding/MSBuild-NuGet-Icon.png</PackageIconUrl>
<PackageIconPath>$(MSBuildThisFileDirectory)branding\MSBuild-NuGet-Icon.png</PackageIconPath>
<RepositoryUrl>https://github.com/Microsoft/MSBuildSdks.git</RepositoryUrl>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
copyright=$(Copyright);
projecturl=$(PackageProjectUrl);
licensefile=$(PackageLicenseFile);
iconurl=$(PackageIconUrl);
icon=$(PackageIconPath);
tags=$(PackageTags);
packagetype=MSBuildSdk
</NuspecProperties>
Expand Down
3 changes: 2 additions & 1 deletion MSBuildSdks.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Build.Traversal",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{DC479DC1-DD8C-4DBA-AA37-FC3D39F24266}"
ProjectSection(SolutionItems) = preProject
azure-pipelines.yml = azure-pipelines.yml
Directory.Build.props = Directory.Build.props
Directory.Build.rsp = Directory.Build.rsp
Directory.Build.targets = Directory.Build.targets
Expand Down Expand Up @@ -53,7 +54,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CentralPackageVersions", "C
samples\CentralPackageVersions\Packages.props = samples\CentralPackageVersions\Packages.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary", "samples\CentralPackageVersions\src\ClassLibrary\ClassLibrary.csproj", "{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLibrary", "samples\CentralPackageVersions\src\ClassLibrary\ClassLibrary.csproj", "{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
76 changes: 51 additions & 25 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,56 @@
pool:
name: Hosted VS2017
resources:
- repo: self

variables:
BuildConfiguration: 'Debug'
BuildPlatform: 'AnyCPU'
DotNetCore3Version: '3.0.100'
SignType: 'Test'
Configuration: 'Debug'

steps:
- task: MSBuild@1
displayName: 'Build dirs.proj'
inputs:
solution: dirs.proj
platform: 'AnyCPU'
configuration: '$(Configuration)'
msbuildArguments: '"/Property:ArtifactsPath=$(Build.StagingDirectory);SignType=$(SignType);PublicRelease=true" "/BinaryLogger:$(Build.StagingDirectory)\logs\build.binlog"'
trigger:
batch: true
branches:
include:
- 'master'
- 'refs/tags/*'
paths:
exclude:
- '*.md'
pr:
branches:
include:
- master
paths:
exclude:
- '*.md'

- task: VSTest@2
displayName: 'Run Unit Tests'
inputs:
testAssemblyVer2: |
**\*Tests.dll
!**\obj\**
runInParallel: false

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Logs'
inputs:
PathtoPublish: '$(Build.StagingDirectory)\logs'
ArtifactName: logs
condition: always()
jobs:
- job: BuildAndTest
displayName: 'Build and Test'
pool:
vmImage: windows-latest
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core 3.0'
inputs:
version: '$(DotNetCore3Version)'
- task: MSBuild@1
displayName: 'Build dirs.proj'
inputs:
solution: dirs.proj
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArguments: '"/Property:ArtifactsPath=$(Build.StagingDirectory);SignType=$(SignType);PublicRelease=true" "/BinaryLogger:$(Build.StagingDirectory)\logs\build.binlog"'
- task: VSTest@2
displayName: 'Run Unit Tests'
inputs:
testAssemblyVer2: |
**\*Tests.dll
!**\obj\**
runInParallel: false
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Logs'
inputs:
PathtoPublish: '$(Build.StagingDirectory)\logs'
ArtifactName: logs
condition: always()
Binary file added branding/MSBuild-NuGet-Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/Artifacts/Microsoft.Build.Artifacts.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;net472;netcoreapp2.1</TargetFrameworks>
<BuildOutputTargetFolder>build\</BuildOutputTargetFolder>
<EnableDefaultNoneItems>true</EnableDefaultNoneItems>
<PackageLicenseFile></PackageLicenseFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>images\MSBuild-NuGet-Icon.png</PackageIcon>
<DevelopmentDependency>true</DevelopmentDependency>
<NoWarn>NU5128</NoWarn>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net46'">
Expand All @@ -22,6 +23,6 @@
<None Include="build\*" Pack="true" PackagePath="build\" />
<None Include="buildCrossTargeting\*" Pack="true" PackagePath="buildCrossTargeting\" />
<None Include="Sdk\*" Pack="true" PackagePath="Sdk\" />
<None Include="$(PackageIconPath)" Pack="true" PackagePath="images\"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<copyright>$copyright$</copyright>
<projectUrl>$projecturl$</projectUrl>
<license type="file">LICENSE.txt</license>
<iconUrl>$iconurl$</iconUrl>
<icon>images\MSBuild-NuGet-Icon.png</icon>
<tags>$tags$</tags>
<packageTypes>
<packageType name="$packagetype$" />
Expand All @@ -18,5 +18,6 @@
<files>
<file src="Sdk\**" target="Sdk" />
<file src="$licensefile$" target="" />
<file src="$icon$" target="images\" />
</files>
</package>
3 changes: 2 additions & 1 deletion src/NoTargets/Microsoft.Build.NoTargets.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<copyright>$copyright$</copyright>
<projectUrl>$projecturl$</projectUrl>
<license type="file">LICENSE.txt</license>
<iconUrl>$iconurl$</iconUrl>
<icon>images\MSBuild-NuGet-Icon.png</icon>
<tags>$tags$</tags>
<packageTypes>
<packageType name="$packagetype$" />
Expand All @@ -18,5 +18,6 @@
<files>
<file src="Sdk\**" target="Sdk" />
<file src="$licensefile$" target="" />
<file src="$icon$" target="images\" />
</files>
</package>
3 changes: 2 additions & 1 deletion src/Traversal/Microsoft.Build.Traversal.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<copyright>$copyright$</copyright>
<projectUrl>$projecturl$</projectUrl>
<license type="file">LICENSE.txt</license>
<iconUrl>$iconurl$</iconUrl>
<icon>images\MSBuild-NuGet-Icon.png</icon>
<tags>$tags$</tags>
<packageTypes>
<packageType name="$packagetype$" />
Expand All @@ -18,5 +18,6 @@
<files>
<file src="Sdk\**" target="Sdk" />
<file src="$licensefile$" target="" />
<file src="$icon$" target="images\" />
</files>
</package>