Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<Project>

<Import Project="Sdk.props"
Sdk="Microsoft.DotNet.Arcade.Sdk"
Condition="'$(DisableArcade)' != '1'" />
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(DisableArcade)' != '1'" />

<PropertyGroup>
<NoWarn>$(NoWarn);NU5125;CS0618</NoWarn>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<LangVersion>13.0</LangVersion>
<PackageProjectUrl>https://github.com/dotnet/command-line-api</PackageProjectUrl>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors Condition="'$(TreatWarningsAsErrors)' == '' and '$(ContinuousIntegrationBuild)' == 'true'">true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworkForNETSDK Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(NetCurrent)</TargetFrameworkForNETSDK>
<TargetFrameworkForNETSDK Condition="'$(DotNetBuildSourceOnly)' != 'true'">net8.0</TargetFrameworkForNETSDK>
<NetMinimum Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(NetCurrent)</NetMinimum>
<NetFrameworkMinimum>net472</NetFrameworkMinimum>
</PropertyGroup>

</Project>
4 changes: 1 addition & 3 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project>

<Import Project="Sdk.targets"
Sdk="Microsoft.DotNet.Arcade.Sdk"
Condition="'$(DisableArcade)' != '1'" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(DisableArcade)' != '1'" />

<PropertyGroup Condition="'$(DisableArcade)' == '1' and $(MSBuildProjectName.EndsWith('.Tests'))">
<DefaultExcludesInProjectFolder>$(DefaultExcludesInProjectFolder);TestResults\**</DefaultExcludesInProjectFolder>
Expand Down
17 changes: 4 additions & 13 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,27 @@

<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<!-- Using multiple feeds isn't supported by Maestro: https://github.com/dotnet/arcade/issues/14155. -->
<NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>

<ItemGroup>
<!-- Roslyn dependencies -->
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.0.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.0.1" />
<!-- Runtime dependencies -->
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<!-- external dependencies -->
<PackageVersion Include="ApprovalTests" Version="7.0.0-beta.3" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.1" />
<PackageVersion Include="AwesomeAssertions" Version="8.1.0" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="System.Memory" Version="4.5.4" />
<PackageVersion Include="system.reactive.core" Version="6.0.0" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
</ItemGroup>

<ItemGroup Condition="'$(DisableArcade)' == '1'">
<!-- The xunit version should be kept in sync with the one that Arcade promotes -->
<PackageVersion Include="xunit" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.3" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
</ItemGroup>

</Project>
4 changes: 0 additions & 4 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- Only specify feed for Arcade SDK (see https://github.com/Microsoft/msbuild/issues/2982) -->
<packageSources>
<clear />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
<add key="dotnet5-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources />
</configuration>
12 changes: 0 additions & 12 deletions System.CommandLine.v3.ncrunchsolution

This file was deleted.

11 changes: 0 additions & 11 deletions repack.ps1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<NoWarn>$(NoWarn);IDE1006</NoWarn>
<TargetFramework>$(NetMinimum)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetMinimum)</TargetFramework>
<OutputType>Exe</OutputType>
<PlatformTarget>AnyCPU</PlatformTarget>

<!-- Avoid spawning any-long living compiler processes to avoid BenchmarkDotNet issues with "file in use",
and automation failing to clean up the folders once the runs are over -->
<UseSharedCompilation>false</UseSharedCompilation>

<!-- Supported target frameworks -->
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>

<!-- This repo does not produce any libraries, therefore generating docs is disabled -->
<GenerateDocumentationFile>False</GenerateDocumentationFile>

<!-- every warning is important, we want to enforce best practices here to keep high quality of the code and avoid common mistakes -->
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>

<SignAssembly>false</SignAssembly>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Input\Sample1.Main.cs" />
</ItemGroup>

<ItemGroup>
<None Include="Input\Sample1.Main.cs">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Input\Sample1.Main.cs" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetMinimum)</TargetFramework>
<OutputType>Exe</OutputType>
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;osx-arm64</RuntimeIdentifiers>
<IsTestUtilityProject>true</IsTestUtilityProject>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<TargetFramework>$(NetMinimum)</TargetFramework>
<DefaultExcludesInProjectFolder>$(DefaultExcludesInProjectFolder);EndToEndTestApp\**</DefaultExcludesInProjectFolder>
</PropertyGroup>

Expand Down
8 changes: 4 additions & 4 deletions src/System.CommandLine.Suggest/dotnet-suggest.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetMinimum)</TargetFramework>
<RollForward>Major</RollForward>
<OutputType>Exe</OutputType>
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<IsPackable>true</IsPackable>
<PackAsTool>true</PackAsTool>
<PackageId>dotnet-suggest</PackageId>
<ToolCommandName>dotnet-suggest</ToolCommandName>
<PackAsToolShimRuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true'">win-x64;win-x86;osx-x64;osx-arm64;linux-x64</PackAsToolShimRuntimeIdentifiers>
<PackagedShimOutputRootDirectory>$(OutputPath)</PackagedShimOutputRootDirectory>

<DotnetSuggestBuildNumber>.1</DotnetSuggestBuildNumber>
<DotnetSuggestBuildNumber Condition="'$(VersionSuffixDateStamp)' != ''">.$(VersionSuffixDateStamp).$(VersionSuffixBuildOfTheDay)</DotnetSuggestBuildNumber>
<VersionPrefix>1.1$(DotnetSuggestBuildNumber)</VersionPrefix>
<VersionPrefix>1.1.1</VersionPrefix>
<PreReleaseVersionLabel />

<!-- No warning for the scripts, it is part of the content, not to execute -->
<NoWarn>$(NoWarn);NU5110;NU5111</NoWarn>
</PropertyGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/System.CommandLine.Tests/System.CommandLine.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(TargetFrameworkForNETSDK);$(NetFrameworkCurrent)</TargetFrameworks>
<TargetFrameworks>$(NetMinimum);$(NetFrameworkMinimum)</TargetFrameworks>
<GenerateProgramFile>false</GenerateProgramFile>
<DefaultExcludesInProjectFolder>$(DefaultExcludesInProjectFolder);TestApps\**</DefaultExcludesInProjectFolder>
<NoWarn>$(NoWarn);CS8632</NoWarn> <!-- Suppress nullable warning for files included as links -->
<NoWarn>$(NoWarn);IDE1006</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetMinimum)</TargetFramework>
<OutputType>Exe</OutputType>
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<!-- producing more detailed log output -->
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<PublishAot>true</PublishAot>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetMinimum)</TargetFramework>
<OutputType>Exe</OutputType>
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishTrimmed>true</PublishTrimmed>
Expand Down
11 changes: 3 additions & 8 deletions src/System.CommandLine/System.CommandLine.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetMinimum);netstandard2.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageId>System.CommandLine</PackageId>
<TargetFrameworks>$(TargetFrameworkForNETSDK);netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Description>Support for parsing command lines, supporting both POSIX and Windows conventions and shell-agnostic command line completions.</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DebugType Condition="'$(Configuration)' == 'Debug'">portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkForNETSDK)'">
<PropertyGroup Condition="'$(TargetFramework)' == '$(NetMinimum)'">
<IsTrimmable>true</IsTrimmable>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>portable</DebugType>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\System.Diagnostics.CodeAnalysis.cs" Link="System.Diagnostics.CodeAnalysis\System.Diagnostics.CodeAnalysis.cs" />
</ItemGroup>
Expand Down