-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Microbuild Additions #7
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
Changes from all commits
0e32451
b9ff440
2a36952
67a19e1
e3c971f
f5a225e
12d086c
202e599
898c577
da4c48a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,18 +2,27 @@ | |
| <!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. --> | ||
| <!-- This file is imported by all projects at the beginning of the project files --> | ||
|
|
||
| <!-- Project language --> | ||
| <PropertyGroup Condition="'$(ProjectLanguage)' == ''"> | ||
| <ProjectLanguage Condition="'$(MSBuildProjectExtension)' == '.csproj' OR '$(Language)' == 'C#'">CSharp</ProjectLanguage> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <RepositoryRootDirectory>$(MSBuildThisFileDirectory)</RepositoryRootDirectory> | ||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
|
|
||
| <OutDir Condition="'$(OutDir)' == ''">$([System.IO.Path]::GetFullPath('$(RepositoryRootDirectory)bin\$(Configuration)'))\</OutDir> | ||
| <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$([System.IO.Path]::GetFullPath('$(RepositoryRootDirectory)bin\obj\$(MSBuildProjectName)'))\</BaseIntermediateOutputPath> | ||
|
|
||
| <SignAssembly Condition="'$(SignAssembly)' == ''">true</SignAssembly> | ||
|
|
||
| <VersionPrefix Condition="'$(VersionPrefix)' == ''">1.0.0</VersionPrefix> | ||
| <!-- When running on Microbuild, this is set to "ymmdd.n". --> | ||
| <VersionSuffix Condition="'$(VersionSuffix)' == ''">$(BuildVersion)</VersionSuffix> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One thing to be careful about here is that nuget versions can't have a number as the first character after the |
||
| <VersionSuffix Condition="'$(VersionSuffix)' == ''">alpha-00001</VersionSuffix> | ||
| <Version Condition="'$(Version)' == ''">$(VersionPrefix)-$(VersionSuffix)</Version> | ||
| <DotNet_Install_Dir Condition=" '$(DotNet_Install_Dir)' == ''">$(RepositoryRootDirectory).dotnet_cli\</DotNet_Install_Dir> | ||
|
|
||
| <DotNet_Install_Dir Condition="'$(DotNet_Install_Dir)' == ''">$(RepositoryRootDirectory).dotnet_cli\</DotNet_Install_Dir> | ||
| <DotNetTool>$(DotNet_Install_Dir)\dotnet</DotNetTool> | ||
|
|
||
| <NuGet_Packages Condition=" '$(NuGet_Packages)' == ''">$(RepositoryRootDirectory)packages\</NuGet_Packages> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| <Project DefaultTargets="Build" xmln="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
|
||
| <!-- Import MicroBuild for projects that need to be signed --> | ||
| <Import Condition="''$(NeedsSigningToRelease)' == 'true'" Project="$(NuGetPackageRoot)\MicroBuild.Core\0.2.0\build\MicroBuild.Core.props" /> | ||
| <Import Condition="''$(NeedsSigningToRelease)' == 'true'" Project="$(NuGetPackageRoot)\MicroBuild.Core\0.2.0\build\MicroBuild.Core.targets" /> | ||
| <VSLToolsPath Condition="'$(VSLToolsPath)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..'))</VSLToolsPath> | ||
|
|
||
|
|
||
| <!-- settings for strong name signing --> | ||
| <PropertyGroup> | ||
| <MicroBuildSigningLibraryV2>$(BUILD_ARTIFACTSTAGINGDIRECTORY)\MicroBuild\Plugins\MicroBuild.Plugins.Signing.1.0.227\build\MicroBuild.Signing.dll</MicroBuildSigningLibraryV2> | ||
| <MicroBuildSigningLibrary Condition="Exists('$(MicroBuildSigningLibraryV2)')">$(MicroBuildSigningLibraryV2)</MicroBuildSigningLibrary> | ||
| <ShouldSignBuild Condition="'$(RunningInMicroBuild)' == 'true' AND '$(SignType)' == 'real'">true</ShouldSignBuild> | ||
| <StrongNameCertificate Condition="'$(StrongNameCertificate)' == ''">MicrosoftShared</StrongNameCertificate> | ||
| <RoslynInternalKey>002400000480000094000000060200000024000052534131000400000100010055e0217eb635f69281051f9a823e0c7edd90f28063eb6c7a742a19b4f6139778ee0af438f47aed3b6e9f99838aa8dba689c7a71ddb860c96d923830b57bbd5cd6119406ddb9b002cf1c723bf272d6acbb7129e9d6dd5a5309c94e0ff4b2c884d45a55f475cd7dba59198086f61f5a8c8b5e601c0edbf269733f6f578fc8579c2</RoslynInternalKey> | ||
| </PropertyGroup> | ||
|
|
||
| <Choose> | ||
| <When Condition="'$(SignAssembly)' == 'true'"> | ||
| <Choose> | ||
| <!-- Shipping binaries in an "official" build are delay-signed with the MS key; later, the signing | ||
| system will finish the strong-name signing. --> | ||
| <When Condition="'$(NonShipping)' != 'true'"> | ||
|
|
||
| <Choose> | ||
| <!-- DelaySign if we're real signing, otherwise public sign --> | ||
| <When Condition="'$(ShouldSignBuild)' == 'true'"> | ||
| <PropertyGroup> | ||
| <DelaySign>true</DelaySign> | ||
| </PropertyGroup> | ||
| </When> | ||
| <Otherwise> | ||
| <PropertyGroup> | ||
| <PublicSign>true</PublicSign> | ||
| </PropertyGroup> | ||
| </Otherwise> | ||
| </Choose> | ||
|
|
||
| <Choose> | ||
| <When Condition="'$(StrongNameCertificate)' == 'Microsoft'"> | ||
| <PropertyGroup> | ||
| <AssemblyOriginatorKeyFile>$(VSLToolsPath)\Strong Name Keys\MSFT.snk</AssemblyOriginatorKeyFile> | ||
| <PublicKey>002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293</PublicKey> | ||
| <PublicKeyToken>b03f5f7f11d50a3a</PublicKeyToken> | ||
| <StrongNameCertificateFriendlyId>67</StrongNameCertificateFriendlyId> | ||
| </PropertyGroup> | ||
| </When> | ||
|
|
||
| <When Condition="'$(StrongNameCertificate)' == 'MicrosoftShared'"> | ||
| <PropertyGroup> | ||
| <AssemblyOriginatorKeyFile>$(VSLToolsPath)\Strong Name Keys\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile> | ||
| <PublicKey>0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9</PublicKey> | ||
| <PublicKeyToken>31BF3856AD364E35</PublicKeyToken> | ||
| <StrongNameCertificateFriendlyId>72</StrongNameCertificateFriendlyId> | ||
| </PropertyGroup> | ||
| </When> | ||
|
|
||
| </Choose> | ||
|
|
||
| </When> | ||
|
|
||
| <!-- Non-shipping binaries are simply signed with the Roslyn internal key. --> | ||
| <Otherwise> | ||
| <PropertyGroup> | ||
| <AssemblyOriginatorKeyFile>$(VSLToolsPath)\Strong Name Keys\RoslynInternalKey.Private.snk</AssemblyOriginatorKeyFile> | ||
| <DelaySign>false</DelaySign> | ||
| <PublicKey>$(RoslynInternalKey)</PublicKey> | ||
| <PublicKeyToken>fc793a00266884fb</PublicKeyToken> | ||
| </PropertyGroup> | ||
| </Otherwise> | ||
| </Choose> | ||
| </When> | ||
| </Choose> | ||
|
|
||
| <!-- Because https://github.com/dotnet/roslyn/issues/7812 is not yet fixed, the IDE doesn't know if we set the PublicSign | ||
| flag. As a result, all design-time builds will thing we're real-signing, which causes semantics to get all screwed up. | ||
| The workaround for now is, for design-time builds only, to pass the DelaySign flag since that's "good enough". This | ||
| must be done in a target versus conditioning on BuildingProject, since BuildingProject itself is correctly set in a | ||
| target. --> | ||
| <Target Name="FixPublicSignFlagForDesignTimeBuilds" BeforeTargets="CoreCompile" Condition="'$(PublicSign)' == 'true'"> | ||
| <PropertyGroup Condition="'$(BuildingProject)' == 'false'"> | ||
| <!-- Turn off PublicSign, because leaving both to true will make the Csc task unhappy --> | ||
| <PublicSign>false</PublicSign> | ||
| <DelaySign>true</DelaySign> | ||
| </PropertyGroup> | ||
| </Target> | ||
|
|
||
| <ItemGroup> | ||
| <FilesToSign Condition="'$(ShouldSignBuild)' == 'true' AND '$(NonShipping)' != 'true'" Include="$(OutDir)\$(AssemblyName).dll"> | ||
| <Authenticode>Microsoft</Authenticode> | ||
| <StrongName>$(StrongNameCertificateFriendlyId)</StrongName> | ||
| </FilesToSign> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <Choose> | ||
| <When Condition="'$(ProjectLanguage)' == 'VB'"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure we need this VB stuff, so we?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or C++ or portable.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I doubt we need it either, I've been copying from the Roslyn-project-system, and committed and pushed last night before I left. Still some more cleanup to do. |
||
| <PropertyGroup> | ||
| <MSBuildTargetsLanguageName>VisualBasic</MSBuildTargetsLanguageName> | ||
| </PropertyGroup> | ||
| </When> | ||
| <When Condition="'$(ProjectLanguage)' == 'CSharp'"> | ||
| <PropertyGroup> | ||
| <MSBuildTargetsLanguageName>CSharp</MSBuildTargetsLanguageName> | ||
| </PropertyGroup> | ||
| </When> | ||
| </Choose> | ||
|
|
||
| <Choose> | ||
| <When Condition="'$(ProjectLanguage)' == 'C++'"> | ||
| <PropertyGroup> | ||
| <MSBuildTargetsFilePath>$(VCTargetsPath)\Microsoft.Cpp.targets</MSBuildTargetsFilePath> | ||
| </PropertyGroup> | ||
| </When> | ||
| <When Condition="'$(TargetFrameworkIdentifier)' == '.NETPortable'"> | ||
| <PropertyGroup> | ||
| <MSBuildTargetsFilePath>$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.$(MSBuildTargetsLanguageName).targets</MSBuildTargetsFilePath> | ||
| </PropertyGroup> | ||
| </When> | ||
| <Otherwise> | ||
| <PropertyGroup> | ||
| <MSBuildTargetsFilePath>$(MSBuildToolsPath)\Microsoft.$(MSBuildTargetsLanguageName).targets</MSBuildTargetsFilePath> | ||
| </PropertyGroup> | ||
| </Otherwise> | ||
| </Choose> | ||
|
|
||
| <Import Project="$(MSBuildTargetsFilePath)" /> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetPath></TargetPath> <!-- Prevent projects referencing this from trying to pass us to the compiler --> | ||
| </PropertyGroup> | ||
|
|
||
| <Target Name="CoreCompile" /> <!-- Prevent Csc from being called --> | ||
| <Target Name="GenerateTargetFrameworkMonikerAttribute" /> <!-- Don't generate TFM attribute --> | ||
| <Target Name="RuntimeImplementationProjectOutputGroup" /> <!-- Group always attempts resolve runtime, regardless of <CopyNuGetImplementations>--> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 14 | ||
| VisualStudioVersion = 14.0.25420.1 | ||
| # Visual Studio 15 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can I still open the solution using VS 2015 update 3? |
||
| VisualStudioVersion = 15.0.25428.1 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tasks", "Tasks", "{1FEED16D-E07D-47C1-BB4C-56CD9F42B53B}" | ||
| EndProject | ||
|
|
@@ -27,6 +27,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Nuget", "Nuget", "{13EE1E3C | |
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.Core.Build.Tasks.UnitTests", "src\Tasks\Microsoft.DotNet.Core.Build.Tasks.UnitTests\Microsoft.DotNet.Core.Build.Tasks.UnitTests.csproj", "{6A698C1D-F604-4295-B6FC-7FC726F9FE5F}" | ||
| EndProject | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{F4B31103-96D4-4CB9-BFF1-19AC665818DC}" | ||
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Toolset", "src\Dependencies\Toolset\Toolset.csproj", "{3899F789-E072-476D-B9D6-79E641611648}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
|
|
@@ -41,6 +45,10 @@ Global | |
| {6A698C1D-F604-4295-B6FC-7FC726F9FE5F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {6A698C1D-F604-4295-B6FC-7FC726F9FE5F}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {6A698C1D-F604-4295-B6FC-7FC726F9FE5F}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {3899F789-E072-476D-B9D6-79E641611648}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {3899F789-E072-476D-B9D6-79E641611648}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {3899F789-E072-476D-B9D6-79E641611648}.Release|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {3899F789-E072-476D-B9D6-79E641611648}.Release|Any CPU.Build.0 = Debug|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
|
|
@@ -49,5 +57,6 @@ Global | |
| {DF7D2697-B3B4-45C2-8297-27245F528A99} = {1FEED16D-E07D-47C1-BB4C-56CD9F42B53B} | ||
| {13EE1E3C-D7F4-48D3-87AE-94CBCCF574E9} = {50A89C27-BA35-44B2-AC57-E54551791C64} | ||
| {6A698C1D-F604-4295-B6FC-7FC726F9FE5F} = {1FEED16D-E07D-47C1-BB4C-56CD9F42B53B} | ||
| {3899F789-E072-476D-B9D6-79E641611648} = {F4B31103-96D4-4CB9-BFF1-19AC665818DC} | ||
| EndGlobalSection | ||
| EndGlobal | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <PropertyGroup> | ||
| <IsPortable>false</IsPortable> | ||
| </PropertyGroup> | ||
| <Import Project="..\..\..\Directory.Build.props" /> | ||
| <PropertyGroup> | ||
| <ProjectGuid>{3899F789-E072-476D-B9D6-79E641611648}</ProjectGuid> | ||
| <ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
| <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier> | ||
| <TargetFrameworkVersion>v1.3</TargetFrameworkVersion> | ||
| <UseCommonOutputDirectory>true</UseCommonOutputDirectory> | ||
| <OutputPath>bin</OutputPath> | ||
| <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory> | ||
| <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory> | ||
| <OutputType>Library</OutputType> | ||
| <Nonshipping>true</Nonshipping> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Content Include="project.json" /> | ||
| </ItemGroup> | ||
| <Import Project="..\..\..\build\Targets\ProducesNoOutput.Imports.targets" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "supports" : {}, | ||
| "dependencies": { | ||
| "MicroBuild.Core": "0.2.0" | ||
| }, | ||
| "frameworks": { | ||
| "netstandard1.3": {} | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this sign test assemblies as well? Do we want that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but because test assemblies are marked as non-shipping, they're not signed with the standard public keys, but instead with the Roslyn internal key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/dotnet/sdk/blob/master/src/Tasks/Microsoft.DotNet.Core.Build.Tasks.UnitTests/Microsoft.DotNet.Core.Build.Tasks.UnitTests.csproj doesn't appear to have this 'non-shipping' mark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, it'll be in the next set of changes I push.