Round 2: rename the SDK NuGet package and add ImportBeforeAfter files to load them.

This commit is contained in:
Eric Erhardt 2016-07-20 13:53:57 -05:00
parent 30712966cc
commit bccff16c18
7 changed files with 66 additions and 49 deletions

View file

@ -147,7 +147,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FF498306-2
build\test\TestPackageProjects.props = build\test\TestPackageProjects.props
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Core.MSBuild", "src\Microsoft.DotNet.Core.MSBuild\Microsoft.DotNet.Core.MSBuild.xproj", "{556554CA-6EC9-4007-A2C3-AB03DCF8F741}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Core.Sdk", "src\Microsoft.DotNet.Core.MSBuild\Microsoft.DotNet.Core.Sdk.xproj", "{556554CA-6EC9-4007-A2C3-AB03DCF8F741}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Core.Build.Tasks", "src\Microsoft.DotNet.Core.Build.Tasks\Microsoft.DotNet.Core.Build.Tasks.xproj", "{E8E7D24B-4830-4662-80A8-255D6FE3B0BE}"
EndProject

View file

@ -1,32 +1,3 @@
<!--<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">x64</PlatformTarget>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
<TargetFrameworkIdentifier>NETCoreApp</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<OutputPath>bin\$(Configuration)\netcoreapp1.0</OutputPath>
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NoStdLib>true</NoStdLib>
<NoLogo>true</NoLogo> -->
<!-- Temp Hack: https://github.com/dotnet/roslyn/issues/12167 -->
<!--
<NuGetTargetMoniker>.NETCoreApp,Version=v1.0</NuGetTargetMoniker>
-->
<!-- Temp Hack: Being passed through from cli, where should this come from? -->
<!--
<BaseNuGetRuntimeIdentifier Condition=" '$(BaseNuGetRuntimeIdentifier)' == '' ">win7</BaseNuGetRuntimeIdentifier>
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
</PropertyGroup>
</Project>-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
@ -64,6 +35,15 @@
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<!-- Default settings for .NET Core build logic -->
<PropertyGroup>
<GenerateDependencyFile Condition=" '$(GenerateDependencyFile)' == '' ">true</GenerateDependencyFile>
<GenerateRuntimeConfigurationFiles Condition=" '$(GenerateRuntimeConfigurationFiles)' == '' ">true</GenerateRuntimeConfigurationFiles>
<!-- This will turn off the base 'ResolveNuGetPackages' target since it is UWP specific, and .NET Core needs it to be split up -->
<!--<ResolveNuGetPackages>false</ResolveNuGetPackages>-->
</PropertyGroup>
<PropertyGroup>
<NoStdLib>true</NoStdLib>
<!-- TODO: Need to figure out runtimes -->

View file

@ -19,15 +19,15 @@
<UsingTask TaskName="MakeNetCoreRunnable" AssemblyFile="$(MicrosoftDotNetCoreBuildTasksDirectory)/Microsoft.DotNet.Core.Build.Tasks.dll" />
<PropertyGroup>
<!-- TODO Condition="IsNetCore" -->
<CoreBuildDependsOn>
NetCorePreCoreBuild;
$(CoreBuildDependsOn);
NetCorePostCoreBuild
GenerateDependencyFile;
GenerateRuntimeConfigurationFiles
</CoreBuildDependsOn>
</PropertyGroup>
<Target Name="MakeCompilationOutputRunnable">
<Target Name="GenerateDependencyFile"
Condition=" '$(GenerateDependencyFile)' == 'true'">
<!--
TODO: Is this the best way? Should we just tell CSC to output $(AssemblyName).dll directly?
-->
@ -42,10 +42,12 @@
OutputType="$(OutputType)" />
</Target>
<Target Name="NetCorePreCoreBuild" />
<Target Name="GenerateRuntimeConfigurationFiles"
Condition=" '$(GenerateRuntimeConfigurationFiles)' == 'true'">
<Target Name="NetCorePostCoreBuild"
DependsOnTargets="MakeCompilationOutputRunnable" />
<!-- TODO: Split up MakeNetCoreRunnable and implement this target-->
<!-- Putting this here to show the structure that we should use in production -->
</Target>
<!--
============================================================
@ -57,23 +59,19 @@
<PropertyGroup>
<PublishDependsOn>
NetCorePublishPreBuild;
Build;
NetCorePublishPostBuild
CopyPublishArtifacts
</PublishDependsOn>
<PublishDir Condition=" '$(PublishDir)' == '' ">$(OutDir)publish\</PublishDir>
</PropertyGroup>
<Target
Name="Publish"
DependsOnTargets="$(PublishDependsOn)" />
<Target Name="NetCorePublishPreBuild">
<PropertyGroup>
<PublishDir Condition=" '$(PublishDir)' == '' ">$(OutDir)publish\</PublishDir>
</PropertyGroup>
</Target>
<Target Name="NetCorePublishPostBuild">
<Message Text="ERIC NetCorePublishPostBuild" />
<Target Name="CopyPublishArtifacts">
<Message Text="ERIC CopyPublishArtifacts" />
<!--<Copy ... ="/>" />-->
</Target>
</Project>

View file

@ -0,0 +1,17 @@
<!--
***********************************************************************************************
Microsoft.NETCore.ImportBefore.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NETCoreProps Condition="'$(NETCoreProps)'==''">$(MSBuildExtensionsPath)\NETCore\Microsoft.DotNet.Core.Sdk.props</NETCoreProps>
</PropertyGroup>
<Import Condition="Exists('$(NETCoreProps)')" Project="$(NETCoreProps)" />
</Project>

View file

@ -0,0 +1,17 @@
<!--
***********************************************************************************************
Microsoft.NETCore.ImportAfter.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NETCoreTargets Condition="'$(NuGetTargets)'==''">$(MSBuildExtensionsPath)\NETCore\Microsoft.DotNet.Core.Sdk.targets</NETCoreTargets>
</PropertyGroup>
<Import Condition="Exists('$(NETCoreTargets)')" Project="$(NETCoreTargets)" />
</Project>

View file

@ -24,7 +24,12 @@
}
},
"publishOptions": {
"include": "14.1/**"
"include": [
"14.1/**"
],
"mappings": {
"NETCore/": "../Microsoft.DotNet.Core.MSBuild/build/netstandard1.0/*"
}
},
"dependencies": {
"NuGet.Commands": {