Change cli build to csproj files (First step on one project)

First doing this just for dotnet-cli-build
This commit is contained in:
Justin Goshi 2016-10-13 18:09:30 -07:00
parent 1926d0e4a4
commit 18bc875dca
4 changed files with 84 additions and 71 deletions

View file

@ -39,7 +39,7 @@
<ItemGroup>
<DotnetCliBuildFrameworkInputs Include="build_projects/**/*.cs" Exclude="build_projects/**/obj/**/*.cs" />
<DotnetCliBuildFrameworkInputs Include="build_projects/**/project.json;build_projects/**/project.lock.json" />
<DotnetCliBuildFrameworkInputs Include="build_projects/**/*.csproj" />
</ItemGroup>
<!-- Workaround to "Native image cannot be loaded multiple times" issue
@ -55,14 +55,20 @@
DependsOnTargets="MSBuildWorkaroundTarget;
RestoreDotnetCliBuildFramework">
<Exec Command="$(DotnetStage0) publish -o $(DotnetCliBuildDirectory)/bin --framework netcoreapp1.0" WorkingDirectory="$(DotnetCliBuildDirectory)"/>
<Exec Command="$(DotnetStage0) publish3 -o $(DotnetCliBuildDirectory)/bin --framework netcoreapp1.0" WorkingDirectory="$(DotnetCliBuildDirectory)"/>
</Target>
<ItemGroup>
<RestoreDotnetCliBuildFrameworkOutputs Include="$(DotnetCliBuildDirectory)/obj/project.assets.json" />
<RestoreDotnetCliBuildFrameworkOutputs Include="$(DotnetCliBuildDirectory)/obj/dotnet-cli-build.csproj.nuget.g.props" />
<RestoreDotnetCliBuildFrameworkOutputs Include="$(DotnetCliBuildDirectory)/obj/dotnet-cli-build.csproj.nuget.g.targets" />
</ItemGroup>
<Target Name="RestoreDotnetCliBuildFramework"
Inputs="$(DotnetCliBuildDirectory)/project.json"
Outputs="$(DotnetCliBuildDirectory)/project.lock.json">
Inputs="$(DotnetCliBuildDirectory)/dotnet-cli-build.csproj"
Outputs="@(RestoreDotnetCliBuildFrameworkOutputs)">
<Exec Command="$(DotnetStage0) restore" WorkingDirectory="$(DotnetCliBuildDirectory)"/>
<Exec Command="$(DotnetStage0) restore3" WorkingDirectory="$(DotnetCliBuildDirectory)"/>
</Target>
<Target DependsOnTargets="$(CLITargets)" Name="BuildTheWholeCli"></Target>

View file

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<PropertyGroup>
<OutputPath>bin\$(Configuration)</OutputPath>
</PropertyGroup>
<PropertyGroup>
<Description>Build scripts for dotnet-cli</Description>
<VersionPrefix>1.0.0</VersionPrefix>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>dotnet-cli-build</AssemblyName>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NETStandard.Library">
<Version>1.6.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR">
<Version>1.0.4</Version>
</PackageReference>
<PackageReference Include="Microsoft.CSharp">
<Version>4.0.1</Version>
</PackageReference>
<PackageReference Include="System.Dynamic.Runtime">
<Version>4.0.11</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Metadata">
<Version>1.4.1-beta-24410-02</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Serialization.Primitives">
<Version>4.1.1</Version>
</PackageReference>
<PackageReference Include="System.Xml.XmlSerializer">
<Version>4.0.11</Version>
</PackageReference>
<PackageReference Include="WindowsAzure.Storage">
<Version>6.2.2-preview</Version>
</PackageReference>
<PackageReference Include="NuGet.CommandLine.XPlat">
<Version>3.6.0-rc-1979</Version>
</PackageReference>
<PackageReference Include="Microsoft.Build.Utilities.Core">
<Version>0.1.0-preview-00043-160929</Version>
</PackageReference>
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
<Version>1.0.1-beta-000933</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="**\*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<Compile Include="..\Microsoft.DotNet.Cli.Build.Framework\**\*.cs;..\shared-build-targets-utils\**\*.cs;" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="**\*.resx" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<EmbeddedResource Include="compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<PackageReference Include="Microsoft.NET.Sdk">
<Version>1.0.0-alpha-20161010-1</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);NETCOREAPP1_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE;TRACE</DefineConstants>
<Optimize>true</Optimize>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>d7b9695d-23eb-4ea8-b8ab-707a0092e1d5</ProjectGuid>
<RootNamespace>Microsoft.DotNet.Cli.Build</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

View file

@ -1,47 +0,0 @@
{
"version": "1.0.0-*",
"description": "Build scripts for dotnet-cli",
"buildOptions": {
"allowUnsafe": true,
"compile": [
"../Microsoft.DotNet.Cli.Build.Framework/**/*.cs",
"../shared-build-targets-utils/**/*.cs",
"../../src/Microsoft.DotNet.InternalAbstractions/RuntimeEnvironment.cs",
"../../src/Microsoft.DotNet.InternalAbstractions/Platform.cs",
"../../src/Microsoft.DotNet.InternalAbstractions/Native/*.cs"
]
},
"dependencies": {
"NETStandard.Library": "1.6.0",
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.4",
"Microsoft.CSharp": "4.0.1",
"System.Dynamic.Runtime": "4.0.11",
"System.Reflection.Metadata": "1.4.1-beta-24410-02",
"System.Runtime.Serialization.Primitives": "4.1.1",
"System.Xml.XmlSerializer": "4.0.11",
"WindowsAzure.Storage": "6.2.2-preview",
"NuGet.CommandLine.XPlat": "3.6.0-rc-1979",
"Microsoft.Build.Utilities.Core": "0.1.0-preview-00043-160929",
"Microsoft.DotNet.PlatformAbstractions": "1.0.1-beta-000933"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dnxcore50",
"portable-net45+win8"
]
}
},
"runtimes": {
"win7-x64": {},
"win7-x86": {},
"osx.10.11-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {},
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}