Added explicit support for .NET 4.6.1 and .NET Core 2.0. by ravenpride · Pull Request #400 · commandlineparser/commandline
I've added support for building the library explicitly for .NET 4.6.1 and .NET Core 2.0. Although .NET Standard 2.0 is implemented by these frameworks, referencing a .NET Standard library seems to pull in a lot of interfacing libraries that simply map calls from .NET Standard to the effective target platform.
This is the output directory of a simple .NET 4.6.1 console application just executing new CommandLine.Parser();
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 25.01.2019 07:04 211456 CommandLine.dll
-a---- 25.01.2019 07:04 64600 CommandLine.pdb
-a---- 25.01.2019 07:04 187024 CommandLine.xml
-a---- 25.01.2019 07:06 4608 ConsoleApp1.exe
-a---- 25.01.2019 07:06 18072 ConsoleApp1.exe.config
-a---- 25.01.2019 07:06 15872 ConsoleApp1.pdb
-a---- 10.01.2019 09:08 21216 Microsoft.Win32.Primitives.dll
-a---- 10.01.2019 09:08 98616 netstandard.dll
-a---- 10.01.2019 09:08 21176 System.AppContext.dll
-a---- 10.01.2019 09:08 21224 System.Collections.Concurrent.dll
-a---- 10.01.2019 09:08 21696 System.Collections.dll
-a---- 10.01.2019 09:08 21224 System.Collections.NonGeneric.dll
-a---- 10.01.2019 09:08 21224 System.Collections.Specialized.dll
-a---- 10.01.2019 09:08 21192 System.ComponentModel.dll
-a---- 10.01.2019 09:08 21768 System.ComponentModel.EventBasedAsync.dll
-a---- 10.01.2019 09:08 21752 System.ComponentModel.Primitives.dll
-a---- 10.01.2019 09:08 22784 System.ComponentModel.TypeConverter.dll
-a---- 10.01.2019 09:08 21160 System.Console.dll
-a---- 10.01.2019 09:08 154448 System.Data.Common.dll
-a---- 10.01.2019 09:08 21736 System.Diagnostics.Contracts.dll
-a---- 10.01.2019 09:08 21208 System.Diagnostics.Debug.dll
-a---- 10.01.2019 09:08 21248 System.Diagnostics.FileVersionInfo.dll
-a---- 10.01.2019 09:08 21728 System.Diagnostics.Process.dll
-a---- 10.01.2019 09:08 23936 System.Diagnostics.StackTrace.dll
-a---- 10.01.2019 09:08 21280 System.Diagnostics.TextWriterTraceListener.dll
-a---- 10.01.2019 09:08 21208 System.Diagnostics.Tools.dll
-a---- 10.01.2019 09:08 21744 System.Diagnostics.TraceSource.dll
-a---- 10.01.2019 09:08 31608 System.Diagnostics.Tracing.dll
-a---- 10.01.2019 09:08 21208 System.Drawing.Primitives.dll
-a---- 10.01.2019 09:08 22224 System.Dynamic.Runtime.dll
-a---- 10.01.2019 09:08 21744 System.Globalization.Calendars.dll
-a---- 10.01.2019 09:08 21192 System.Globalization.dll
-a---- 10.01.2019 09:08 25992 System.Globalization.Extensions.dll
-a---- 10.01.2019 09:08 110944 System.IO.Compression.dll
-a---- 10.01.2019 09:08 21224 System.IO.Compression.ZipFile.dll
-a---- 10.01.2019 09:08 21144 System.IO.dll
-a---- 10.01.2019 09:08 21192 System.IO.FileSystem.dll
-a---- 10.01.2019 09:08 21232 System.IO.FileSystem.DriveInfo.dll
-a---- 10.01.2019 09:08 21232 System.IO.FileSystem.Primitives.dll
-a---- 10.01.2019 09:08 21224 System.IO.FileSystem.Watcher.dll
-a---- 10.01.2019 09:08 21208 System.IO.IsolatedStorage.dll
-a---- 10.01.2019 09:08 21216 System.IO.MemoryMappedFiles.dll
-a---- 10.01.2019 09:08 21168 System.IO.Pipes.dll
-a---- 10.01.2019 09:08 21232 System.IO.UnmanagedMemoryStream.dll
-a---- 10.01.2019 09:08 21152 System.Linq.dll
-a---- 10.01.2019 09:08 22224 System.Linq.Expressions.dll
-a---- 10.01.2019 09:08 21192 System.Linq.Parallel.dll
-a---- 10.01.2019 09:08 21192 System.Linq.Queryable.dll
-a---- 10.01.2019 09:08 198472 System.Net.Http.dll
-a---- 10.01.2019 09:08 21208 System.Net.NameResolution.dll
-a---- 10.01.2019 09:08 22248 System.Net.NetworkInformation.dll
-a---- 10.01.2019 09:08 21168 System.Net.Ping.dll
-a---- 10.01.2019 09:08 22216 System.Net.Primitives.dll
-a---- 10.01.2019 09:08 21184 System.Net.Requests.dll
-a---- 10.01.2019 09:08 21696 System.Net.Security.dll
-a---- 10.01.2019 09:08 30544 System.Net.Sockets.dll
-a---- 10.01.2019 09:08 21232 System.Net.WebHeaderCollection.dll
-a---- 10.01.2019 09:08 21224 System.Net.WebSockets.Client.dll
-a---- 10.01.2019 09:08 21192 System.Net.WebSockets.dll
-a---- 10.01.2019 09:08 21696 System.ObjectModel.dll
-a---- 10.01.2019 09:08 22200 System.Reflection.dll
-a---- 10.01.2019 09:08 21224 System.Reflection.Extensions.dll
-a---- 10.01.2019 09:08 21736 System.Reflection.Primitives.dll
-a---- 10.01.2019 09:08 21200 System.Resources.Reader.dll
-a---- 10.01.2019 09:08 21232 System.Resources.ResourceManager.dll
-a---- 10.01.2019 09:08 21200 System.Resources.Writer.dll
-a---- 10.01.2019 09:08 21784 System.Runtime.CompilerServices.VisualC.dll
-a---- 10.01.2019 09:08 29360 System.Runtime.dll
-a---- 10.01.2019 09:08 21720 System.Runtime.Extensions.dll
-a---- 10.01.2019 09:08 21200 System.Runtime.Handles.dll
-a---- 10.01.2019 09:08 24296 System.Runtime.InteropServices.dll
-a---- 10.01.2019 09:08 28624 System.Runtime.InteropServices.RuntimeInformation.dll
-a---- 10.01.2019 09:08 21200 System.Runtime.Numerics.dll
-a---- 10.01.2019 09:08 21264 System.Runtime.Serialization.Formatters.dll
-a---- 10.01.2019 09:08 21240 System.Runtime.Serialization.Json.dll
-a---- 10.01.2019 09:08 27048 System.Runtime.Serialization.Primitives.dll
-a---- 10.01.2019 09:08 24816 System.Runtime.Serialization.Xml.dll
-a---- 10.01.2019 09:08 21200 System.Security.Claims.dll
-a---- 10.01.2019 09:08 47016 System.Security.Cryptography.Algorithms.dll
-a---- 10.01.2019 09:08 21240 System.Security.Cryptography.Csp.dll
-a---- 10.01.2019 09:08 21256 System.Security.Cryptography.Encoding.dll
-a---- 10.01.2019 09:08 21784 System.Security.Cryptography.Primitives.dll
-a---- 10.01.2019 09:08 22832 System.Security.Cryptography.X509Certificates.dll
-a---- 10.01.2019 09:08 21208 System.Security.Principal.dll
-a---- 10.01.2019 09:08 22392 System.Security.SecureString.dll
-a---- 10.01.2019 09:08 21696 System.Text.Encoding.dll
-a---- 10.01.2019 09:08 21232 System.Text.Encoding.Extensions.dll
-a---- 10.01.2019 09:08 21232 System.Text.RegularExpressions.dll
-a---- 10.01.2019 09:08 22192 System.Threading.dll
-a---- 10.01.2019 09:08 37752 System.Threading.Overlapped.dll
-a---- 10.01.2019 09:08 22224 System.Threading.Tasks.dll
-a---- 10.01.2019 09:08 21232 System.Threading.Tasks.Parallel.dll
-a---- 10.01.2019 09:08 21200 System.Threading.Thread.dll
-a---- 10.01.2019 09:08 21216 System.Threading.ThreadPool.dll
-a---- 10.01.2019 09:08 21200 System.Threading.Timer.dll
-a---- 10.01.2019 09:08 79176 System.ValueTuple.dll
-a---- 10.01.2019 09:08 21712 System.Xml.ReaderWriter.dll
-a---- 10.01.2019 09:08 21696 System.Xml.XDocument.dll
-a---- 10.01.2019 09:08 21712 System.Xml.XmlDocument.dll
-a---- 10.01.2019 09:08 21712 System.Xml.XmlSerializer.dll
-a---- 10.01.2019 09:08 21176 System.Xml.XPath.dll
-a---- 10.01.2019 09:08 22904 System.Xml.XPath.XDocument.dll
And this is the output directory of the console application after adding explicit support for.NET 4.6.1:
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 25.01.2019 07:12 211456 CommandLine.dll
-a---- 25.01.2019 07:12 64600 CommandLine.pdb
-a---- 25.01.2019 07:12 187024 CommandLine.xml
-a---- 25.01.2019 07:13 4608 ConsoleApp1.exe
-a---- 25.01.2019 07:05 189 ConsoleApp1.exe.config
-a---- 25.01.2019 07:13 15872 ConsoleApp1.pdb
The change needed is really small as Visual Studio 2017 supports building for multiple target frameworks out of the box. Furthermore all libraries are automatically packed into the NuGet package.
Greetings :-)