зеркало из
1
0
Форкнуть 0
This commit is contained in:
Tanner Gooding 2018-01-29 10:22:00 -08:00
Родитель 9d5439efa6
Коммит a5c6d503da
103 изменённых файлов: 1007 добавлений и 900 удалений

74
.gitattributes поставляемый Normal file
Просмотреть файл

@ -0,0 +1,74 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto encoding=UTF-8
# csc/vbc are shell scripts and should always have unix line endings
# These shell scripts are included in the toolset packages. Normally, the shell
# scripts in our repo are only run by cloning onto a Linux/Mac machine, and git
# automatically chooses LF as the line ending.
#
# However, right now the toolset packages must be built on Windows, and so the
# files must be hard-coded to be cloned with LF
src/Compilers/CSharp/CscCore/csc text eol=lf
src/Compilers/VisualBasic/VbcCore/vbc text eol=lf
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
*.cs diff=csharp text
*.vb text
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

Просмотреть файл

@ -1,52 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26221.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommandLine-netcore", "CommandLine\CommandLine-netcore.csproj", "{439FFDED-361C-4371-B9D0-01D81DCE2C62}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommandLine.Tests-netcore", "CommandLine.Tests\CommandLine.Tests-netcore.csproj", "{A9A083E1-6875-4D66-9D4A-42E029DFFC84}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "source", "source", "{4E7D048B-8032-4AF3-96C9-1A27558B6874}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{81E64B6B-5335-468F-AFEB-2070A0C68B11}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xamples", "xamples", "{E2A871E2-85EC-4187-BFBF-49C5C3E34422}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-netcore", "dotnet\dotnet-netcore.csproj", "{DE905655-C679-4604-BC0E-F986E66A115A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommandLine.SampleParsers-netcore", "SampleParsers\CommandLine.SampleParsers-netcore.csproj", "{24A483A7-C3CE-4FF2-8185-78D4B0754A7C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{439FFDED-361C-4371-B9D0-01D81DCE2C62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{439FFDED-361C-4371-B9D0-01D81DCE2C62}.Debug|Any CPU.Build.0 = Debug|Any CPU
{439FFDED-361C-4371-B9D0-01D81DCE2C62}.Release|Any CPU.ActiveCfg = Release|Any CPU
{439FFDED-361C-4371-B9D0-01D81DCE2C62}.Release|Any CPU.Build.0 = Release|Any CPU
{A9A083E1-6875-4D66-9D4A-42E029DFFC84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9A083E1-6875-4D66-9D4A-42E029DFFC84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9A083E1-6875-4D66-9D4A-42E029DFFC84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9A083E1-6875-4D66-9D4A-42E029DFFC84}.Release|Any CPU.Build.0 = Release|Any CPU
{DE905655-C679-4604-BC0E-F986E66A115A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE905655-C679-4604-BC0E-F986E66A115A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE905655-C679-4604-BC0E-F986E66A115A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE905655-C679-4604-BC0E-F986E66A115A}.Release|Any CPU.Build.0 = Release|Any CPU
{24A483A7-C3CE-4FF2-8185-78D4B0754A7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24A483A7-C3CE-4FF2-8185-78D4B0754A7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24A483A7-C3CE-4FF2-8185-78D4B0754A7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24A483A7-C3CE-4FF2-8185-78D4B0754A7C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{439FFDED-361C-4371-B9D0-01D81DCE2C62} = {4E7D048B-8032-4AF3-96C9-1A27558B6874}
{A9A083E1-6875-4D66-9D4A-42E029DFFC84} = {81E64B6B-5335-468F-AFEB-2070A0C68B11}
{DE905655-C679-4604-BC0E-F986E66A115A} = {E2A871E2-85EC-4187-BFBF-49C5C3E34422}
{24A483A7-C3CE-4FF2-8185-78D4B0754A7C} = {E2A871E2-85EC-4187-BFBF-49C5C3E34422}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,24 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<AssemblyName>Microsoft.DotNet.Cli.CommandLine.Tests</AssemblyName>
<RootNamespace>Microsoft.DotNet.Cli.CommandLine.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="[4.18.0,)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" />
<PackageReference Include="xunit" Version="2.2.0-beta5-build3474" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta5-build1225" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\CommandLine-netcore.csproj" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,135 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\xunit.runner.visualstudio.2.2.0-beta5-build1225\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.2.0-beta5-build1225\build\net20\xunit.runner.visualstudio.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DCF608E3-40B5-453B-B55F-B2D99C98FCD4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.DotNet.Cli.CommandLine.Tests</RootNamespace>
<AssemblyName>Microsoft.DotNet.Cli.CommandLine.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentAssertions, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions.Core, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.assert, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise />
</Choose>
<ItemGroup>
<Compile Include="AppliedOptionTests.cs" />
<Compile Include="ArgumentsRuleCompositionTests.cs" />
<Compile Include="ParseDiagramTests.cs" />
<Compile Include="ParsingValidationTests.cs" />
<Compile Include="CommandTests.cs" />
<Compile Include="CommandExecutionTests.cs" />
<Compile Include="OptionTests.cs" />
<Compile Include="HelpViewTests.cs" />
<Compile Include="MaterializerTests.cs" />
<Compile Include="ParserTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SuggestionTests.cs" />
<Compile Include="TokenizeTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\CommandLine.csproj">
<Project>{4CF1AE89-BC8D-4C26-B232-1F99E091C802}</Project>
<Name>CommandLine</Name>
</ProjectReference>
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.2.0-beta5-build1225\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.2.0-beta5-build1225\build\net20\xunit.runner.visualstudio.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -1,15 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("dcf608e3-40b5-453b-b55f-b2d99c98fcd4")]

Просмотреть файл

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentAssertions" version="4.19.0" targetFramework="net461" />
<package id="xunit" version="2.1.0" targetFramework="net452" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="net452" />
<package id="xunit.assert" version="2.1.0" targetFramework="net452" />
<package id="xunit.core" version="2.1.0" targetFramework="net452" />
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net452" />
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net452" />
<package id="xunit.runner.visualstudio" version="2.2.0-beta5-build1225" targetFramework="net461" developmentDependency="true" />
</packages>

Просмотреть файл

@ -1,21 +1,21 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2026
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandLine.Tests", "CommandLine.Tests\CommandLine.Tests.csproj", "{DCF608E3-40B5-453B-B55F-B2D99C98FCD4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandLine", "CommandLine\CommandLine.csproj", "{4CF1AE89-BC8D-4C26-B232-1F99E091C802}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "source", "source", "{865D4F45-B1AF-4C87-AE1A-AA5ADF6D386D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{68E3F6FF-C6EF-4B0D-A9F5-2BE6930C55C0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xamples", "xamples", "{C375C10F-04DD-4F64-A8BE-11BDBD0B0546}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandLine.SampleParsers", "SampleParsers\CommandLine.SampleParsers.csproj", "{6C5B3671-FFF3-4F7C-AFE2-76CDC938E4B5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommandLine", "src\source\CommandLine\Microsoft.DotNet.Cli.CommandLine.csproj", "{7F320A3C-A74A-4EDD-92EC-A8A906047A21}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnet", "dotnet\dotnet.csproj", "{051AD708-BEE6-40D8-BA4D-C9FE2CA8052B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommandLine.Tests", "src\tests\CommandLine.Tests\Microsoft.DotNet.Cli.CommandLine.Tests.csproj", "{2614A1E7-E8CC-4A22-96A9-ACED9A18E2C3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet", "src\xamples\dotnet\dotnet.csproj", "{C93310CF-0A00-4A62-BDA2-596FAAE2B1DB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommandLine.SampleParsers", "src\xamples\SampleParsers\CommandLine.SampleParsers.csproj", "{CD03109D-3909-4B66-9E59-1125F8197193}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -23,30 +23,33 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DCF608E3-40B5-453B-B55F-B2D99C98FCD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DCF608E3-40B5-453B-B55F-B2D99C98FCD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DCF608E3-40B5-453B-B55F-B2D99C98FCD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DCF608E3-40B5-453B-B55F-B2D99C98FCD4}.Release|Any CPU.Build.0 = Release|Any CPU
{4CF1AE89-BC8D-4C26-B232-1F99E091C802}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4CF1AE89-BC8D-4C26-B232-1F99E091C802}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CF1AE89-BC8D-4C26-B232-1F99E091C802}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4CF1AE89-BC8D-4C26-B232-1F99E091C802}.Release|Any CPU.Build.0 = Release|Any CPU
{6C5B3671-FFF3-4F7C-AFE2-76CDC938E4B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6C5B3671-FFF3-4F7C-AFE2-76CDC938E4B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C5B3671-FFF3-4F7C-AFE2-76CDC938E4B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C5B3671-FFF3-4F7C-AFE2-76CDC938E4B5}.Release|Any CPU.Build.0 = Release|Any CPU
{051AD708-BEE6-40D8-BA4D-C9FE2CA8052B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{051AD708-BEE6-40D8-BA4D-C9FE2CA8052B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{051AD708-BEE6-40D8-BA4D-C9FE2CA8052B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{051AD708-BEE6-40D8-BA4D-C9FE2CA8052B}.Release|Any CPU.Build.0 = Release|Any CPU
{7F320A3C-A74A-4EDD-92EC-A8A906047A21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F320A3C-A74A-4EDD-92EC-A8A906047A21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F320A3C-A74A-4EDD-92EC-A8A906047A21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F320A3C-A74A-4EDD-92EC-A8A906047A21}.Release|Any CPU.Build.0 = Release|Any CPU
{2614A1E7-E8CC-4A22-96A9-ACED9A18E2C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2614A1E7-E8CC-4A22-96A9-ACED9A18E2C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2614A1E7-E8CC-4A22-96A9-ACED9A18E2C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2614A1E7-E8CC-4A22-96A9-ACED9A18E2C3}.Release|Any CPU.Build.0 = Release|Any CPU
{C93310CF-0A00-4A62-BDA2-596FAAE2B1DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C93310CF-0A00-4A62-BDA2-596FAAE2B1DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C93310CF-0A00-4A62-BDA2-596FAAE2B1DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C93310CF-0A00-4A62-BDA2-596FAAE2B1DB}.Release|Any CPU.Build.0 = Release|Any CPU
{CD03109D-3909-4B66-9E59-1125F8197193}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD03109D-3909-4B66-9E59-1125F8197193}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD03109D-3909-4B66-9E59-1125F8197193}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD03109D-3909-4B66-9E59-1125F8197193}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{DCF608E3-40B5-453B-B55F-B2D99C98FCD4} = {68E3F6FF-C6EF-4B0D-A9F5-2BE6930C55C0}
{4CF1AE89-BC8D-4C26-B232-1F99E091C802} = {865D4F45-B1AF-4C87-AE1A-AA5ADF6D386D}
{6C5B3671-FFF3-4F7C-AFE2-76CDC938E4B5} = {C375C10F-04DD-4F64-A8BE-11BDBD0B0546}
{051AD708-BEE6-40D8-BA4D-C9FE2CA8052B} = {C375C10F-04DD-4F64-A8BE-11BDBD0B0546}
{7F320A3C-A74A-4EDD-92EC-A8A906047A21} = {865D4F45-B1AF-4C87-AE1A-AA5ADF6D386D}
{2614A1E7-E8CC-4A22-96A9-ACED9A18E2C3} = {68E3F6FF-C6EF-4B0D-A9F5-2BE6930C55C0}
{C93310CF-0A00-4A62-BDA2-596FAAE2B1DB} = {C375C10F-04DD-4F64-A8BE-11BDBD0B0546}
{CD03109D-3909-4B66-9E59-1125F8197193} = {C375C10F-04DD-4F64-A8BE-11BDBD0B0546}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E30B46C8-E7A1-4648-B6E5-416E8DD93857}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,11 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk" >
<PropertyGroup>
<TargetFramework>netstandard1.5</TargetFramework>
<AssemblyName>Microsoft.DotNet.Cli.CommandLine</AssemblyName>
<RootNamespace>Microsoft.DotNet.Cli.CommandLine</RootNamespace>
<AssemblyOriginatorKeyFile>../tools/Key.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign>true</PublicSign>
<Version>0.1.1-alpha-$(CommitCount)</Version>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4CF1AE89-BC8D-4C26-B232-1F99E091C802}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.DotNet.Cli.CommandLine</RootNamespace>
<AssemblyName>Microsoft.DotNet.Cli.CommandLine</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Runtime.Extensions" />
</ItemGroup>
<ItemGroup>
<Compile Include="AppliedOptionSet.cs" />
<Compile Include="ArgumentsRuleExtensions.cs" />
<Compile Include="Command.cs" />
<Compile Include="CommandExecutionResult.cs" />
<Compile Include="DefaultHelpViewText.cs" />
<Compile Include="HelpViewExtensions.cs" />
<Compile Include="OptionSet{T}.cs" />
<Compile Include="ParseException.cs" />
<Compile Include="ParserConfiguration.cs" />
<Compile Include="StringExtensions.cs" />
<Compile Include="ParseResultExtensions.cs" />
<Compile Include="ParserExtensions.cs" />
<Compile Include="Accept.cs" />
<Compile Include="AppliedOptionExtensions.cs" />
<Compile Include="OptionExtensions.cs" />
<Compile Include="EnumerableExtensions.cs" />
<Compile Include="OptionError.cs" />
<Compile Include="ArgumentsRule.cs" />
<Compile Include="Create.cs" />
<Compile Include="AppliedOption.cs" />
<Compile Include="Parser.cs" />
<Compile Include="ParseResult.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Option.cs" />
<Compile Include="OptionSet.cs" />
<Compile Include="Suggest.cs" />
<Compile Include="Token.cs" />
<Compile Include="TokenType.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -1,15 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4cf1ae89-bc8d-4c26-b232-1f99e091c802")]

Просмотреть файл

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
</packages>

Просмотреть файл

@ -1,8 +1,27 @@
<Project ToolsVersion="15.0">
<Import Condition="Exists('obj/CommitCount.props')"
Project="obj/CommitCount.props" />
<Import Project="RestoreSources.props" />
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<PropertyGroup>
<CommitCount Condition="'$(CommitCount)' == ''">0</CommitCount>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
</PropertyGroup>
<Import Project="build\NuGet.props"/>
<Import Project="build\Versions.props"/>
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<RepoToolsetDir>$(NuGetPackageRoot)roslyntools.repotoolset\$(RoslynToolsRepoToolsetVersion)\tools\</RepoToolsetDir>
<RestoreSources>https://dotnetfeed.blob.core.windows.net/dotnet-core/packages/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup>
<DOTNET_INSTALL_DIR Condition="'$(DOTNET_INSTALL_DIR)' == ''">$(RepoRoot)artifacts\.dotnet\$(DotNetCliVersion)\</DOTNET_INSTALL_DIR>
</PropertyGroup>
<PropertyGroup>
<RepositoryUrl>https://github.com/dotnet/CliCommandLineParser</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
</PropertyGroup>
</Project>

Просмотреть файл

Просмотреть файл

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
</packageSources>
<config>
<add key="repositoryPath" value=".nuget\packages" />
<add key="globalPackagesFolder" value=".nuget\packages" />
</config>
</configuration>

Просмотреть файл

@ -1,9 +0,0 @@
<Project ToolsVersion="15.0">
<PropertyGroup>
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
$(ExternalRestoreSources);
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
https://api.nuget.org/v3/index.json;
</RestoreSources>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,20 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="[4.18.0,)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" />
<PackageReference Include="newtonsoft.json" Version="9.0.1" />
<PackageReference Include="System.Net.Http" Version="4.3.1" />
<PackageReference Include="xunit" Version="2.2.0-beta5-build3474" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta5-build1225" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\CommandLine-netcore.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,129 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6C5B3671-FFF3-4F7C-AFE2-76CDC938E4B5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.DotNet.Cli.CommandLine.SampleParsers</RootNamespace>
<AssemblyName>Microsoft.DotNet.Cli.CommandLine.SampleParsers</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentAssertions, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions.Core, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.assert, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise />
</Choose>
<ItemGroup>
<Compile Include="Dotnet\AssertionExtensions.cs" />
<Compile Include="Dotnet\DotnetParserHelpViewTests.cs" />
<Compile Include="Dotnet\SuggestionTests.cs" />
<Compile Include="Dotnet\DotnetParserTests.cs" />
<Compile Include="Dotnet\DotNetParser.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\CommandLine.csproj">
<Project>{4CF1AE89-BC8D-4C26-B232-1F99E091C802}</Project>
<Name>CommandLine</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -1,15 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("6c5b3671-fff3-4f7c-afe2-76cdc938e4b5")]

Просмотреть файл

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentAssertions" version="4.19.0" targetFramework="net462" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net462" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net462" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="net462" />
<package id="xunit.assert" version="2.1.0" targetFramework="net462" />
<package id="xunit.core" version="2.1.0" targetFramework="net462" />
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net462" />
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net462" />
</packages>

Просмотреть файл

@ -1,7 +1,3 @@
@echo off
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
powershell -ExecutionPolicy Bypass -NoProfile -NoLogo -Command "& \"%~dp0build.ps1\" %*; exit $LastExitCode;"
if %errorlevel% neq 0 exit /b %errorlevel%
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass %~dp0build\build.ps1 -build %*
exit /b %ErrorLevel%

Просмотреть файл

@ -1,52 +0,0 @@
<Project DefaultTargets="BuildAll">
<Target Name="BuildAll" DependsOnTargets="Restore;Build;Test;Pack" />
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
</PropertyGroup>
<Target Name="Restore">
<Exec Command="dotnet restore CommandLine-netcore.sln /p:Configuration=$(Configuration)" />
<Exec Command="dotnet restore tools/BuildTools.csproj /p:Configuration=$(Configuration)" />
</Target>
<Target Name="Build">
<Exec Command="dotnet build CommandLine-netcore.sln /p:Configuration=$(Configuration)" />
</Target>
<Target Name="Test">
<Exec Command="dotnet test CommandLine.Tests/CommandLine.Tests-netcore.csproj -l:trx /p:Configuration=$(Configuration)" Condition="'$(SkipTests)' != 'true'" />
</Target>
<Target Name="Pack">
<Exec Command="dotnet pack CommandLine/CommandLine-netcore.csproj --no-build /p:Configuration=$(Configuration)" />
</Target>
<Target Name="PushToBlobFeed">
<Exec Command="dotnet msbuild tools/BuildTools.csproj /t:PushToBlobFeed /p:Configuration=$(Configuration) /p:BlobFeedAccessToken=$(BlobFeedAccessToken) /p:ExpectedFeedUrl=$(ExpectedFeedUrl)" />
</Target>
<Target Name="MakeVersionProps">
<MakeDir Condition="!Exists('obj')"
Directories="obj" />
<Exec Command="git rev-list --count HEAD"
Condition="'$(CommitCount)' == ''"
ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="CommitCount" />
</Exec>
<PropertyGroup>
<GitCommitInfoPropsContent>
&lt;Project ToolsVersion=&quot;15.0&quot;&gt;
&lt;PropertyGroup&gt;
&lt;CommitCount&gt;$(CommitCount)&lt;/CommitCount&gt;
&lt;/PropertyGroup&gt;
&lt;/Project&gt;
</GitCommitInfoPropsContent>
</PropertyGroup>
<WriteLinesToFile File="obj/CommitCount.props"
Lines="$(GitCommitInfoPropsContent)"
Overwrite="true" />
</Target>
</Project>

Просмотреть файл

@ -1,29 +0,0 @@
[cmdletbinding()]
param(
[Parameter(Position=0, ValueFromRemainingArguments=$true)]
$ExtraParameters
)
$ErrorActionPreference="Stop"
$ProgressPreference="SilentlyContinue"
$RepoRoot = "$PSScriptRoot"
$DOTNET_INSTALL_DIR="$REPOROOT/.dotnet"
$env:REPOROOT="$RepoRoot"
$env:XDG_DATA_HOME="$REPOROOT/.nuget/packages"
$env:NUGET_PACKAGES="$REPOROOT/.nuget/packages"
$env:NUGET_HTTP_CACHE_PATH="$REPOROOT/.nuget/packages"
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
if (-Not (Test-Path $DOTNET_INSTALL_DIR))
{
New-Item -Type "directory" -Path $DOTNET_INSTALL_DIR
}
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "$DOTNET_INSTALL_DIR/dotnet-install.ps1"
& $DOTNET_INSTALL_DIR/dotnet-install.ps1 -InstallDir "$DOTNET_INSTALL_DIR" -Version 1.1.4
$env:PATH="$DOTNET_INSTALL_DIR;$env:PATH"
& dotnet msbuild build.proj /t:MakeVersionProps
& dotnet msbuild build.proj /v:n /fl /flp:v=n $ExtraParameters

Просмотреть файл

@ -1,45 +1,11 @@
set -e
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
[[ $SOURCE != /* ]] && SOURCE="$ScriptRoot/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
REPOROOT="$DIR"
# Some things depend on HOME and it may not be set. We should fix those things, but until then, we just patch a value in
if [ -z "$HOME" ]; then
export HOME="$DIR/.home"
[ ! -d "$HOME" ] || rm -Rf $HOME
mkdir -p $HOME
fi
# $args array may have empty elements in it.
# The easiest way to remove them is to cast to string and back to array.
# This will actually break quoted arguments, arguments like
# -test "hello world" will be broken into three arguments instead of two, as it should.
args=( "$@" )
temp="${args[@]}"
args=($temp)
export REPOROOT="$REPOROOT"
export XDG_DATA_HOME="$REPOROOT/.nuget/packages"
export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
export NUGET_HTTP_CACHE_PATH="$REPOROOT/.nuget/packages"
export DOTNET_INSTALL_DIR="$REPOROOT/.dotnet"
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
if [ ! -d "$DOTNET_INSTALL_DIR" ]; then
mkdir $DOTNET_INSTALL_DIR
fi
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --install-dir $DOTNET_INSTALL_DIR --version 1.1.4
PATH="$DOTNET_INSTALL_DIR:$PATH"
dotnet msbuild build.proj /t:MakeVersionProps
dotnet msbuild build.proj /v:n /fl /flp:v=n "${args[@]}"
. "$ScriptRoot/build/build.sh" --build $@

17
build/NuGet.props Normal file
Просмотреть файл

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<PropertyGroup>
<!-- Respect environment variable for the NuGet Packages Root if set; otherwise, use the current default location -->
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == ''">$(NUGET_PACKAGES)</NuGetPackageRoot>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' AND '$(OS)' == 'Windows_NT'">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' AND '$(OS)' != 'Windows_NT'">$(HOME)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageRoot Condition="!HasTrailingSlash('$(NuGetPackageRoot)')">$(NuGetPackageRoot)\</NuGetPackageRoot>
</PropertyGroup>
</Project>

18
build/SignToolData.json Normal file
Просмотреть файл

@ -0,0 +1,18 @@
{
"sign": [
{
"certificate": "Microsoft402",
"strongName": null,
"values": [
"bin/Microsoft.DotNet.Cli.CommandLine/*/Microsoft.DotNet.Cli.CommandLine.dll"
]
},
{
"certificate": null,
"strongName": null,
"values": [
"packages/*.nupkg"
]
}
]
}

14
build/Toolset.proj Normal file
Просмотреть файл

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<RestoreSources>https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json</RestoreSources>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RoslynTools.RepoToolset" Version="$(RoslynToolsRepoToolsetVersion)" />
</ItemGroup>
</Project>

35
build/Versions.props Normal file
Просмотреть файл

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<!-- Repo Version Information -->
<PropertyGroup>
<VersionBase>0.1.1</VersionBase>
<PreReleaseVersionLabel>alpha</PreReleaseVersionLabel>
</PropertyGroup>
<!-- Repo Toolset Features -->
<PropertyGroup>
<UsingToolMicrosoftNetCompilers>false</UsingToolMicrosoftNetCompilers>
</PropertyGroup>
<!-- Toolset Dependencies -->
<PropertyGroup>
<DotNetCliVersion>1.1.4</DotNetCliVersion>
<DotNetCliProjectJsonVersion>1.0.0-preview2-1-003177</DotNetCliProjectJsonVersion>
<RoslynToolsRepoToolsetVersion>1.0.0-beta-62522-01</RoslynToolsRepoToolsetVersion>
<VSWhereVersion>2.2.7</VSWhereVersion>
</PropertyGroup>
<!-- Test Dependencies -->
<PropertyGroup>
<FluentAssertionsVersion>4.18.0</FluentAssertionsVersion>
<NewtonsoftJsonVersion>9.0.1</NewtonsoftJsonVersion>
<SystemNetHttpVersion>4.3.1</SystemNetHttpVersion>
</PropertyGroup>
</Project>

262
build/build.ps1 Normal file
Просмотреть файл

@ -0,0 +1,262 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
[switch] $build,
[switch] $ci,
[string] $configuration = "Debug",
[switch] $deploy,
[switch] $fullMSBuild,
[switch] $help,
[switch] $log,
[switch] $pack,
[switch] $prepareMachine,
[switch] $rebuild,
[switch] $restore,
[switch] $sign,
[string] $solution = "",
[switch] $test,
[string] $verbosity = "minimal",
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
Set-StrictMode -Version 2.0
$ErrorActionPreference = "Stop"
function Print-Usage() {
Write-Host "Common settings:"
Write-Host " -configuration <value> Build configuration Debug, Release"
Write-Host " -verbosity <value> Msbuild verbosity (q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic])"
Write-Host " -help Print help and exit"
Write-Host ""
Write-Host "Actions:"
Write-Host " -restore Restore dependencies"
Write-Host " -build Build solution"
Write-Host " -rebuild Rebuild solution"
Write-Host " -deploy Deploy built VSIXes"
Write-Host " -test Run all unit tests in the solution"
Write-Host " -sign Sign build outputs"
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
Write-Host ""
Write-Host "Advanced settings:"
Write-Host " -solution <value> Path to solution to build"
Write-Host " -ci Set when running on CI server"
Write-Host " -log Enable logging (by default on CI)"
Write-Host " -prepareMachine Prepare machine for CI run"
Write-Host " -fullMSBuild Test against the desktop version of MSBuild"
Write-Host ""
Write-Host "Command line arguments not listed above are passed through to MSBuild."
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
}
function Create-Directory([string[]] $Path) {
if (!(Test-Path -Path $Path)) {
New-Item -Path $Path -Force -ItemType "Directory" | Out-Null
}
}
function GetVersionsPropsVersion([string[]] $Name) {
[xml]$Xml = Get-Content $VersionsProps
foreach ($PropertyGroup in $Xml.Project.PropertyGroup) {
if (Get-Member -InputObject $PropertyGroup -name $Name) {
return $PropertyGroup.$Name
}
}
throw "Failed to locate the $Name property"
}
function InstallDotNetCli {
$DotNetCliVersion = GetVersionsPropsVersion -Name "DotNetCliVersion"
$DotNetInstallVerbosity = ""
if (!$env:DOTNET_INSTALL_DIR) {
$env:DOTNET_INSTALL_DIR = Join-Path $RepoRoot "artifacts\.dotnet\$DotNetCliVersion"
}
$DotNetRoot = $env:DOTNET_INSTALL_DIR
$DotNetInstallScript = Join-Path $DotNetRoot "dotnet-install.ps1"
if (!(Test-Path $DotNetInstallScript)) {
Create-Directory $DotNetRoot
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -UseBasicParsing -OutFile $DotNetInstallScript
}
if ($verbosity -eq "diagnostic") {
$DotNetInstallVerbosity = "-Verbose"
}
# Install a stage 0
$SdkInstallDir = Join-Path $DotNetRoot "sdk\$DotNetCliVersion"
if (!(Test-Path $SdkInstallDir)) {
# Use Invoke-Expression so that $DotNetInstallVerbosity is not positionally bound when empty
Invoke-Expression -Command "$DotNetInstallScript -Version $DotNetCliVersion $DotNetInstallVerbosity"
if($LASTEXITCODE -ne 0) {
throw "Failed to install stage0"
}
}
# Install 1.0 shared framework
$NetCoreApp10Version = "1.0.5"
$NetCoreApp10Dir = Join-Path $DotNetRoot "shared\Microsoft.NETCore.App\$NetCoreApp10Version"
if (!(Test-Path $NetCoreApp10Dir)) {
# Use Invoke-Expression so that $DotNetInstallVerbosity is not positionally bound when empty
Invoke-Expression -Command "$DotNetInstallScript -Channel `"Preview`" -Version $NetCoreApp10Version -SharedRuntime $DotNetInstallVerbosity"
if($LASTEXITCODE -ne 0) {
throw "Failed to install 1.0 shared framework"
}
}
# Put the stage 0 on the path
$env:PATH = "$DotNetRoot;$env:PATH"
# Disable first run since we want to control all package sources
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Don't resolve runtime, shared framework, or SDK from other locations
$env:DOTNET_MULTILEVEL_LOOKUP=0
}
function InstallNuGet {
$NugetInstallDir = Join-Path $RepoRoot "artifacts\.nuget"
$NugetExe = Join-Path $NugetInstallDir "nuget.exe"
if (!(Test-Path -Path $NugetExe)) {
Create-Directory $NugetInstallDir
Invoke-WebRequest "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -UseBasicParsing -OutFile $NugetExe
}
}
function InstallRepoToolset {
$RepoToolsetVersion = GetVersionsPropsVersion -Name "RoslynToolsRepoToolsetVersion"
$RepoToolsetDir = Join-Path $NuGetPackageRoot "roslyntools.repotoolset\$RepoToolsetVersion\tools"
$RepoToolsetBuildProj = Join-Path $RepoToolsetDir "Build.proj"
if ($ci -or $log) {
Create-Directory $LogDir
$logCmd = "/bl:" + (Join-Path $LogDir "Toolset.binlog")
} else {
$logCmd = ""
}
if (!(Test-Path -Path $RepoToolsetBuildProj)) {
$ToolsetProj = Join-Path $PSScriptRoot "Toolset.proj"
dotnet msbuild $ToolsetProj /t:restore /m /nologo /clp:Summary /warnaserror /v:$verbosity $logCmd | Write-Host
if($LASTEXITCODE -ne 0) {
throw "Failed to build $ToolsetProj"
}
}
return $RepoToolsetBuildProj
}
function LocateVisualStudio {
$VSWhereVersion = GetVersionsPropsVersion -Name "VSWhereVersion"
$VSWhereDir = Join-Path $ArtifactsDir ".tools\vswhere\$VSWhereVersion"
$VSWhereExe = Join-Path $vsWhereDir "vswhere.exe"
if (!(Test-Path $VSWhereExe)) {
Create-Directory $VSWhereDir
Invoke-WebRequest "http://github.com/Microsoft/vswhere/releases/download/$VSWhereVersion/vswhere.exe" -UseBasicParsing -OutFile $VSWhereExe
}
$VSInstallDir = & $VSWhereExe -latest -property installationPath -requires Microsoft.Component.MSBuild -requires Microsoft.VisualStudio.Component.VSSDK -requires Microsoft.Net.Component.4.6.TargetingPack -requires Microsoft.VisualStudio.Component.Roslyn.Compiler -requires Microsoft.VisualStudio.Component.VSSDK
if (!(Test-Path $VSInstallDir)) {
throw "Failed to locate Visual Studio (exit code '$LASTEXITCODE')."
}
return $VSInstallDir
}
function Build {
InstallDotNetCli
InstallNuget
$RepoToolsetBuildProj = InstallRepoToolset
if ($prepareMachine) {
Create-Directory $NuGetPackageRoot
dotnet nuget locals all --clear
if($LASTEXITCODE -ne 0) {
throw "Failed to clear NuGet cache"
}
}
if ($fullMSBuild) {
if (!($env:VSInstallDir)) {
$env:VSInstallDir = LocateVisualStudio
}
$env:DOTNET_SDK_TEST_MSBUILD_PATH = Join-Path $env:VSInstallDir "MSBuild\15.0\Bin\msbuild.exe"
}
if ($ci -or $log) {
Create-Directory $LogDir
$logCmd = "/bl:" + (Join-Path $LogDir "Build.binlog")
} else {
$logCmd = ""
}
if ($solution -eq "") {
$solution = Join-Path $RepoRoot "CommandLine.sln"
}
dotnet msbuild $RepoToolsetBuildProj /m /nologo /clp:Summary /warnaserror /v:$verbosity $logCmd /p:Configuration=$configuration /p:SolutionPath=$solution /p:Restore=$restore /p:Build=$build /p:Rebuild=$rebuild /p:Deploy=$deploy /p:Test=$test /p:Sign=$sign /p:Pack=$pack /p:CIBuild=$ci $properties
if($LASTEXITCODE -ne 0) {
throw "Failed to build $RepoToolsetBuildProj"
}
}
function Stop-Processes() {
Write-Host "Killing running build processes..."
Get-Process -Name "msbuild" -ErrorAction SilentlyContinue | Stop-Process
Get-Process -Name "vbcscompiler" -ErrorAction SilentlyContinue | Stop-Process
}
if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
Print-Usage
exit 0
}
$RepoRoot = Join-Path $PSScriptRoot "..\"
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
$ArtifactsConfigurationDir = Join-Path $ArtifactsDir $configuration
$LogDir = Join-Path $ArtifactsConfigurationDir "log"
$VersionsProps = Join-Path $PSScriptRoot "Versions.props"
try {
if ($ci) {
$TempDir = Join-Path $ArtifactsConfigurationDir "tmp"
Create-Directory $TempDir
$env:TEMP = $TempDir
$env:TMP = $TempDir
}
if (!($env:NUGET_PACKAGES)) {
$env:NUGET_PACKAGES = Join-Path $env:UserProfile ".nuget\packages"
}
$NuGetPackageRoot = $env:NUGET_PACKAGES
Build
exit $lastExitCode
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
exit 1
}
finally {
Pop-Location
if ($ci -and $prepareMachine) {
Stop-Processes
}
}

303
build/build.sh Normal file
Просмотреть файл

@ -0,0 +1,303 @@
#!/bin/bash
build=false
ci=false
configuration="Debug"
help=false
log=false
pack=false
prepareMachine=false
rebuild=false
restore=false
sign=false
solution=""
test=false
verbosity="minimal"
properties=""
while [[ $# > 0 ]]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
--build)
build=true
shift 1
;;
--ci)
ci=true
shift 1
;;
--configuration)
configuration=$2
shift 2
;;
--help)
echo "Common settings:"
echo " --configuration <value> Build configuration Debug, Release"
echo " --verbosity <value> Msbuild verbosity (q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic])"
echo " --help Print help and exit"
echo ""
echo "Actions:"
echo " --restore Restore dependencies"
echo " --build Build solution"
echo " --rebuild Rebuild solution"
echo " --test Run all unit tests in the solution"
echo " --sign Sign build outputs"
echo " --pack Package build outputs into NuGet packages and Willow components"
echo ""
echo "Advanced settings:"
echo " --solution <value> Path to solution to build"
echo " --ci Set when running on CI server"
echo " --log Enable logging (by default on CI)"
echo " --prepareMachine Prepare machine for CI run"
echo ""
echo "Command line arguments not listed above are passed through to MSBuild."
exit 0
;;
--log)
log=true
shift 1
;;
--pack)
pack=true
shift 1
;;
--prepareMachine)
prepareMachine=true
shift 1
;;
--rebuild)
rebuild=true
shift 1
;;
--restore)
restore=true
shift 1
;;
--sign)
sign=true
shift 1
;;
--solution)
solution=$2
shift 2
;;
--test)
test=true
shift 1
;;
--verbosity)
verbosity=$2
shift 2
;;
*)
properties="$properties $1"
shift 1
;;
esac
done
function CreateDirectory {
if [ ! -d "$1" ]
then
mkdir -p "$1"
fi
}
function GetVersionsPropsVersion {
echo "$( awk -F'[<>]' "/<$1>/{print \$3}" "$VersionsProps" )"
}
function InstallDotNetCli {
DotNetCliVersion="$( GetVersionsPropsVersion DotNetCliVersion )"
DotNetInstallVerbosity=""
if [ -z "$DOTNET_INSTALL_DIR" ]
then
export DOTNET_INSTALL_DIR="$RepoRoot/artifacts/.dotnet/$DotNetCliVersion"
fi
DotNetRoot=$DOTNET_INSTALL_DIR
DotNetInstallScript="$DotNetRoot/dotnet-install.sh"
if [ ! -a "$DotNetInstallScript" ]
then
CreateDirectory "$DotNetRoot"
curl "https://dot.net/v1/dotnet-install.sh" -sSL -o "$DotNetInstallScript"
fi
if [[ "$(echo $verbosity | awk '{print tolower($0)}')" == "diagnostic" ]]
then
DotNetInstallVerbosity="--verbose"
fi
# Install a stage 0
SdkInstallDir="$DotNetRoot/sdk/$DotNetCliVersion"
if [ ! -d "$SdkInstallDir" ]
then
bash "$DotNetInstallScript" --version $DotNetCliVersion $DotNetInstallVerbosity
LASTEXITCODE=$?
if [ $LASTEXITCODE != 0 ]
then
echo "Failed to install stage0"
return $LASTEXITCODE
fi
fi
# Install 1.0 shared framework
NetCoreApp10Version="1.0.5"
NetCoreApp10Dir="$DotNetRoot/shared/Microsoft.NETCore.App/$NetCoreApp10Version"
if [ ! -d "$NetCoreApp10Dir" ]
then
bash "$DotNetInstallScript" --channel "Preview" --version $NetCoreApp10Version --shared-runtime $DotNetInstallVerbosity
LASTEXITCODE=$?
if [ $LASTEXITCODE != 0 ]
then
echo "Failed to install 1.0 shared framework"
return $LASTEXITCODE
fi
fi
# Put the stage 0 on the path
export PATH="$DotNetRoot:$PATH"
# Disable first run since we want to control all package sources
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Don't resolve runtime, shared framework, or SDK from other locations
export DOTNET_MULTILEVEL_LOOKUP=0
}
function InstallRepoToolset {
RepoToolsetVersion="$( GetVersionsPropsVersion RoslynToolsRepoToolsetVersion )"
RepoToolsetDir="$NuGetPackageRoot/roslyntools.repotoolset/$RepoToolsetVersion/tools"
RepoToolsetBuildProj="$RepoToolsetDir/Build.proj"
if $ci || $log
then
CreateDirectory $LogDir
logCmd="/bl:$LogDir/Build.binlog"
else
logCmd=""
fi
if [ ! -d "$RepoToolsetBuildProj" ]
then
ToolsetProj="$ScriptRoot/Toolset.proj"
dotnet msbuild $ToolsetProj /t:restore /m /nologo /clp:Summary /warnaserror /v:$verbosity $logCmd
LASTEXITCODE=$?
if [ $LASTEXITCODE != 0 ]
then
echo "Failed to build $ToolsetProj"
return $LASTEXITCODE
fi
fi
}
function Build {
InstallDotNetCli
if [ $? != 0 ]
then
return $?
fi
InstallRepoToolset
if [ $? != 0 ]
then
return $?
fi
if $prepareMachine
then
CreateDirectory "$NuGetPackageRoot"
dotnet nuget locals all --clear
LASTEXITCODE=$?
if [ $LASTEXITCODE != 0 ]
then
echo "Failed to clear NuGet cache"
return $LASTEXITCODE
fi
fi
if $ci || $log
then
CreateDirectory $LogDir
logCmd="/bl:$LogDir/Build.binlog"
else
logCmd=""
fi
if [ -z $solution ]
then
solution="$RepoRoot/CommandLine.sln"
fi
dotnet msbuild $RepoToolsetBuildProj /m /nologo /clp:Summary /warnaserror /v:$verbosity $logCmd /p:Configuration=$configuration /p:SolutionPath=$solution /p:Restore=$restore /p:Build=$build /p:Rebuild=$rebuild /p:Deploy=$deploy /p:Test=$test /p:Sign=$sign /p:Pack=$pack /p:CIBuild=$ci $properties
LASTEXITCODE=$?
if [ $LASTEXITCODE != 0 ]
then
echo "Failed to build $RepoToolsetBuildProj"
return $LASTEXITCODE
fi
}
function StopProcesses {
echo "Killing running build processes..."
pkill -9 "msbuild"
pkill -9 "vbcscompiler"
}
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$ScriptRoot/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
RepoRoot="$ScriptRoot/../"
ArtifactsDir="$RepoRoot/artifacts"
ArtifactsConfigurationDir="$ArtifactsDir/$configuration"
LogDir="$ArtifactsConfigurationDir/log"
VersionsProps="$ScriptRoot/Versions.props"
# HOME may not be defined in some scenarios, but it is required by NuGet
if [ -z $HOME ]
then
export HOME="$RepoRoot/artifacts/.home/"
CreateDirectory "$HOME"
fi
if $ci
then
TempDir="$ArtifactsConfigurationDir/tmp"
CreateDirectory "$TempDir"
export TEMP="$TempDir"
export TMP="$TempDir"
fi
if [ -z $NUGET_PACKAGES ]
then
export NUGET_PACKAGES="$HOME/.nuget/packages"
fi
NuGetPackageRoot=$NUGET_PACKAGES
Build
LASTEXITCODE=$?
if $ci && $prepareMachine
then
StopProcesses
fi
exit $LASTEXITCODE

3
build/cibuild.cmd Normal file
Просмотреть файл

@ -0,0 +1,3 @@
@echo off
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass %~dp0Build.ps1 -restore -build -test -sign -pack -ci %*
exit /b %ErrorLevel%

11
build/cibuild.sh Executable file
Просмотреть файл

@ -0,0 +1,11 @@
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$ScriptRoot/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
. "$ScriptRoot/build.sh" --restore --build --test --ci $@

Просмотреть файл

@ -1,15 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("051ad708-bee6-40d8-ba4d-c9fe2ca8052b")]

Просмотреть файл

@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
<AssemblyName>dotnet</AssemblyName>
<RootNamespace>dotnet</RootNamespace>
<RuntimeIdentifiers>win10-x64;osx.10.11-x64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\CommandLine-netcore.csproj" />
<ProjectReference Include="..\SampleParsers\CommandLine.SampleParsers-netcore.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{051AD708-BEE6-40D8-BA4D-C9FE2CA8052B}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>dotnet</RootNamespace>
<AssemblyName>dotnet</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\CommandLine.csproj">
<Project>{4CF1AE89-BC8D-4C26-B232-1F99E091C802}</Project>
<Name>CommandLine</Name>
</ProjectReference>
<ProjectReference Include="..\SampleParsers\CommandLine.SampleParsers.csproj">
<Project>{6c5b3671-fff3-4f7c-afe2-76cdc938e4b5}</Project>
<Name>CommandLine.SampleParsers</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net462" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net462" />
</packages>

Просмотреть файл

@ -3,52 +3,55 @@
// Import the utility functionality.
import jobs.generation.ArchivalSettings;
import jobs.generation.Utilities;
def project = GithubProject
def branch = GithubBranchName
def isPR = true
def platformList = ['OSX:x64:Release', 'Windows_NT:x64:Release']
def static getBuildJobName(def configuration, def os, def architecture) {
return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase()
}
platformList.each { platform ->
// Calculate names
def (os, architecture, configuration) = platform.tokenize(':')
['OSX10.12', 'Ubuntu16.04', 'Windows_NT'].each { os ->
['x64'].each { architecture ->
['Debug', 'Release'].each { config ->
[true, false].each { isPR ->
// Calculate job name
def jobName = getBuildJobName(configuration, os, architecture)
def jobName = getBuildJobName(config, os, architecture)
def buildCommand = '';
// Calculate the build command
if (os == 'Windows_NT') {
buildCommand = ".\\build.cmd"
}
else {
buildCommand = "./build.sh"
}
def osBase = os
def machineAffinity = 'latest-or-auto'
def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
// Set the label.
steps {
if (os == 'Windows_NT') {
if (osBase == 'Windows_NT') {
// Batch
batchFile(buildCommand)
batchFile(".\\build\\cibuild.cmd -configuration $config")
}
else {
// Shell
shell(buildCommand)
shell("./build/cibuild.sh --configuration $config")
}
}
}
Utilities.setMachineAffinity(newJob, os, 'latest-or-auto')
Utilities.setMachineAffinity(newJob, osBase, machineAffinity)
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
Utilities.addMSTestResults(newJob, '**/*.trx')
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${architecture} ${configuration} Build")
if (isPR) {
Utilities.addGithubPRTriggerForBranch(newJob, branch, "$os $architecture $config")
}
def archiveSettings = new ArchivalSettings()
archiveSettings.addFiles("artifacts/$config/log/*")
archiveSettings.addFiles("artifacts/$config/TestResults/*")
archiveSettings.setFailIfNothingArchived()
archiveSettings.setArchiveOnFailure()
Utilities.addArchival(newJob, archiveSettings)
}
}
}
}

3
restore.cmd Normal file
Просмотреть файл

@ -0,0 +1,3 @@
@echo off
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass %~dp0build\build.ps1 -restore %*
exit /b %ErrorLevel%

11
restore.sh Executable file
Просмотреть файл

@ -0,0 +1,11 @@
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$ScriptRoot/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
. "$ScriptRoot/build/build.sh" --restore $@

29
src/Directory.Build.props Normal file
Просмотреть файл

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\Directory.Build.props</MSBuildAllProjects>
</PropertyGroup>
<Import Project="..\Directory.Build.props" />
<Import Project="$(RepoToolsetDir)Settings.props" />
<PropertyGroup>
<StrongNameKeyId>MicrosoftAspNet</StrongNameKeyId>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
</Project>

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<Import Project="$(RepoToolsetDir)Imports.targets" />
</Project>

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netstandard1.5</TargetFramework>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<IsPackable>true</IsPackable>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<OutDirName>Tests\$(MSBuildProjectName)</OutDirName>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\source\CommandLine\Microsoft.DotNet.Cli.CommandLine.csproj" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

Просмотреть файл

@ -108,7 +108,8 @@ namespace Microsoft.DotNet.Cli.CommandLine.Tests
var invalidCharacters = $"|{Path.GetInvalidPathChars().First()}|";
output.WriteLine(string.Join("\n", Path.GetInvalidPathChars()));
// Convert to ushort so the xUnit XML writer doesn't complain about invalid characters
output.WriteLine(string.Join("\n", Path.GetInvalidPathChars().Select((c) => (ushort)(c))));
var result = command.Parse($"the-command {invalidCharacters}");

Просмотреть файл

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<OutDirName>Samples\$(MSBuildProjectName)</OutDirName>
<PublishOutputToSymStore>false</PublishOutputToSymStore>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageReference Include="System.Net.Http" Version="$(SystemNetHttpVersion)" />
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitRunnerVisualStudioVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\source\CommandLine\Microsoft.DotNet.Cli.CommandLine.csproj" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<OutDirName>Samples\$(MSBuildProjectName)</OutDirName>
<PublishOutputToSymStore>false</PublishOutputToSymStore>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<ItemGroup>
<ProjectReference Include="..\..\source\CommandLine\Microsoft.DotNet.Cli.CommandLine.csproj" />
<ProjectReference Include="..\SampleParsers\CommandLine.SampleParsers.csproj" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

3
test.cmd Normal file
Просмотреть файл

@ -0,0 +1,3 @@
@echo off
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass %~dp0build\build.ps1 -test %*
exit /b %ErrorLevel%

11
test.sh Executable file
Просмотреть файл

@ -0,0 +1,11 @@
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$ScriptRoot/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
. "$ScriptRoot/build/build.sh" --test $@

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше