Skip to content

Commit ec1bab1

Browse files
authored
Merge pull request #554 from moh-hassan/issue-548
Support SourceLink in the package - #548, with generation of symbolic Package.
2 parents 7e6325d + 146fe94 commit ec1bab1

File tree

2 files changed

+57
-50
lines changed

2 files changed

+57
-50
lines changed

Directory.Build.props

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project>
2-
<PropertyGroup>
3-
<NoWarn>CS1591;CS0219;8002;NU5125</NoWarn>
4-
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir>
5-
</PropertyGroup>
6-
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
2+
<PropertyGroup>
3+
<NoWarn>CS1591;CS0219;8002;NU5125</NoWarn>
4+
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir>
5+
</PropertyGroup>
6+
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
77
<DefineConstants>$(DefineConstants);NETFRAMEWORK</DefineConstants>
88
</PropertyGroup>
99
<!-- Enable building .NET Framework projects on any machine with at least MSBuild or the .NET Core SDK installed.-->
@@ -12,5 +12,10 @@
1212
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1313
<PrivateAssets>all</PrivateAssets>
1414
</PackageReference>
15+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
16+
</ItemGroup>
17+
<ItemGroup>
18+
<!-- Compiler to support nullable in VS2017 -->
19+
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.4.0" PrivateAssets="All" />
1520
</ItemGroup>
1621
</Project>

src/CommandLine/CommandLine.csproj

+47-45
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,53 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<AssemblyName>CommandLine</AssemblyName>
5-
<OutputType>Library</OutputType>
6-
<TargetFrameworks>netstandard2.0;net40;net45;net461</TargetFrameworks>
7-
<DefineConstants>$(DefineConstants);CSX_EITHER_INTERNAL;CSX_REM_EITHER_BEYOND_2;CSX_ENUM_INTERNAL;ERRH_INTERNAL;ERRH_DISABLE_INLINE_METHODS;CSX_MAYBE_INTERNAL;CSX_REM_EITHER_FUNC</DefineConstants>
8-
<DefineConstants Condition="'$(BuildTarget)' != 'fsharp'">$(DefineConstants);SKIP_FSHARP</DefineConstants>
9-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10-
<AssemblyOriginatorKeyFile>..\..\CommandLine.snk</AssemblyOriginatorKeyFile>
11-
12-
<SignAssembly>true</SignAssembly>
13-
<PackageId Condition="'$(BuildTarget)' != 'fsharp'">CommandLineParser</PackageId>
14-
<PackageId Condition="'$(BuildTarget)' == 'fsharp'">CommandLineParser.FSharp</PackageId>
15-
<Authors>gsscoder;nemec;ericnewton76</Authors>
16-
<Title>Command Line Parser Library</Title>
17-
<Version Condition="'$(VersionSuffix)' != ''">$(VersionSuffix)</Version>
18-
<Version Condition="'$(VersionSuffix)' == ''">0.0.0</Version>
19-
<Description Condition="'$(BuildTarget)' != 'fsharp'">Terse syntax C# command line parser for .NET. For FSharp support see CommandLineParser.FSharp. The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks.</Description>
20-
<Description Condition="'$(BuildTarget)' == 'fsharp'">Terse syntax C# command line parser for .NET with F# support. The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks.</Description>
21-
<Copyright>Copyright (c) 2005 - 2018 Giacomo Stelluti Scala &amp; Contributors</Copyright>
22-
<PackageLicenseFile>License.md</PackageLicenseFile>
23-
<PackageIcon>CommandLine20.png</PackageIcon>
24-
<PackageProjectUrl>https://github.com/commandlineparser/commandline</PackageProjectUrl>
25-
<PackageTags>command line;commandline;argument;option;parser;parsing;library;syntax;shell</PackageTags>
26-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
27-
<LangVersion>7.3</LangVersion>
28-
</PropertyGroup>
3+
<PropertyGroup>
4+
<AssemblyName>CommandLine</AssemblyName>
5+
<OutputType>Library</OutputType>
6+
<TargetFrameworks>netstandard2.0;net40;net45;net461</TargetFrameworks>
7+
<DefineConstants>$(DefineConstants);CSX_EITHER_INTERNAL;CSX_REM_EITHER_BEYOND_2;CSX_ENUM_INTERNAL;ERRH_INTERNAL;ERRH_DISABLE_INLINE_METHODS;CSX_MAYBE_INTERNAL;CSX_REM_EITHER_FUNC</DefineConstants>
8+
<DefineConstants Condition="'$(BuildTarget)' != 'fsharp'">$(DefineConstants);SKIP_FSHARP</DefineConstants>
9+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10+
<AssemblyOriginatorKeyFile>..\..\CommandLine.snk</AssemblyOriginatorKeyFile>
11+
<SignAssembly>true</SignAssembly>
12+
<PackageId Condition="'$(BuildTarget)' != 'fsharp'">CommandLineParser</PackageId>
13+
<PackageId Condition="'$(BuildTarget)' == 'fsharp'">CommandLineParser.FSharp</PackageId>
14+
<Authors>gsscoder;nemec;ericnewton76</Authors>
15+
<Title>Command Line Parser Library</Title>
16+
<Version Condition="'$(VersionSuffix)' != ''">$(VersionSuffix)</Version>
17+
<Version Condition="'$(VersionSuffix)' == ''">0.0.0</Version>
18+
<Description Condition="'$(BuildTarget)' != 'fsharp'">Terse syntax C# command line parser for .NET. For FSharp support see CommandLineParser.FSharp. The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks.</Description>
19+
<Description Condition="'$(BuildTarget)' == 'fsharp'">Terse syntax C# command line parser for .NET with F# support. The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks.</Description>
20+
<Copyright>Copyright (c) 2005 - 2018 Giacomo Stelluti Scala &amp; Contributors</Copyright>
21+
<PackageLicenseFile>License.md</PackageLicenseFile>
22+
<PackageIcon>CommandLine20.png</PackageIcon>
23+
<PackageProjectUrl>https://github.com/commandlineparser/commandline</PackageProjectUrl>
24+
<PackageTags>command line;commandline;argument;option;parser;parsing;library;syntax;shell</PackageTags>
25+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
26+
<LangVersion>8.0</LangVersion>
27+
<IncludeSymbols>true</IncludeSymbols>
28+
<DebugType>portable</DebugType>
29+
<!--<SymbolPackageFormat>snupkg</SymbolPackageFormat>-->
30+
</PropertyGroup>
2931

30-
<ItemGroup Condition="'$(BuildTarget)' != 'fsharp'">
31-
<Compile Remove="Infrastructure\FSharpOptionHelper.cs" />
32-
</ItemGroup>
32+
<ItemGroup Condition="'$(BuildTarget)' != 'fsharp'">
33+
<Compile Remove="Infrastructure\FSharpOptionHelper.cs" />
34+
</ItemGroup>
3335

34-
<ItemGroup>
35-
<Content Include="..\..\README.md" Link="README.md">
36-
<Pack>true</Pack>
37-
<PackagePath>README.md</PackagePath>
38-
</Content>
39-
</ItemGroup>
36+
<ItemGroup>
37+
<Content Include="..\..\README.md" Link="README.md">
38+
<Pack>true</Pack>
39+
<PackagePath>README.md</PackagePath>
40+
</Content>
41+
</ItemGroup>
4042

41-
<ItemGroup Condition="'$(TargetFramework)' != 'net40' and '$(BuildTarget)' == 'fsharp'">
42-
<PackageReference Include="FSharp.Core" Version="4.5.1" Condition="'$(BuildTarget)' == 'fsharp'" />
43-
</ItemGroup>
44-
<ItemGroup Condition="'$(TargetFramework)' == 'net40' and '$(BuildTarget)' == 'fsharp'">
45-
<PackageReference Include="FSharp.Core" Version="4.0.0.1" Condition="'$(BuildTarget)' == 'fsharp'" />
46-
</ItemGroup>
47-
<ItemGroup>
48-
<None Include="$(SolutionDir)LICENSE.md" Pack="true" PackagePath=""/>
49-
<None Include="$(SolutionDir)art\CommandLine20.png" Pack="true" PackagePath=""/>
50-
</ItemGroup>
43+
<ItemGroup Condition="'$(TargetFramework)' != 'net40' and '$(BuildTarget)' == 'fsharp'">
44+
<PackageReference Include="FSharp.Core" Version="4.5.1" Condition="'$(BuildTarget)' == 'fsharp'" />
45+
</ItemGroup>
46+
<ItemGroup Condition="'$(TargetFramework)' == 'net40' and '$(BuildTarget)' == 'fsharp'">
47+
<PackageReference Include="FSharp.Core" Version="4.0.0.1" Condition="'$(BuildTarget)' == 'fsharp'" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<None Include="$(SolutionDir)LICENSE.md" Pack="true" PackagePath=""/>
51+
<None Include="$(SolutionDir)art\CommandLine20.png" Pack="true" PackagePath=""/>
52+
</ItemGroup>
5153
</Project>

0 commit comments

Comments
 (0)