Full Code of davidfowl/NetStandard for AI

master cfbaaeb8b1b4 cached
11 files
27.3 KB
8.1k tokens
63 symbols
1 requests
Download .txt
Repository: davidfowl/NetStandard
Branch: master
Commit: cfbaaeb8b1b4
Files: 11
Total size: 27.3 KB

Directory structure:
gitextract_fz8wdp6f/

├── FAQ.md
├── NETFrameworkToNetStandard.md
├── NETStandard2.0WithNuGet.md
├── PclToNetStandard.md
├── RC1ToRC2.md
├── README.md
├── XProjNetStandard.md
├── examples.cs
├── packages/
│   ├── aspnet.json
│   └── corefx.json
└── platforms.cs

================================================
FILE CONTENTS
================================================

================================================
FILE: FAQ.md
================================================
# Frequently Asked Questions


================================================
FILE: NETFrameworkToNetStandard.md
================================================
# Converting a .NET Framework class library to NETStandard


================================================
FILE: NETStandard2.0WithNuGet.md
================================================
## Registry of NuGet.org packages tried with .NET Core 2.0

- [NuGet.Core](https://www.nuget.org/packages/nuget.core/) - Explodes with the following exception

    ```
    Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
       at NuGet.PackageBuilder.Save(Stream stream)
    ```

- [HtmlAgilityPack](https://www.nuget.org/packages/HtmlAgilityPack/) - Seems to work
- [ClosedXML](https://www.nuget.org/packages/ClosedXML/) - Explodes with the following exception

   ```
   Unhandled Exception: System.TypeLoadException: Could not load type 'System.Drawing.ColorTranslator' from assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at ClosedXML.Excel.XLColor.FromHtml(String htmlColor)
   at ClosedXML.Excel.XLWorkbook.InitializeTheme() in C:\Projects\ClosedXML\ClosedXML\Excel\XLWorkbook.cs:line 332
   at ClosedXML.Excel.XLWorkbook..ctor(XLEventTracking eventTracking) in C:\Projects\ClosedXML\ClosedXML\Excel\XLWorkbook.cs:line 678
   at ConsoleApp3.Program.Main(String[] args) in c:\users\davifowl\documents\visual studio 2017\Projects\ConsoleApp3\ConsoleApp3\Program.cs:line 13
   ```
- [EPPlus](https://www.nuget.org/packages/EPPlus/) - Explodes with the following exception

    ```
    Unhandled Exception: System.ArgumentException: 'IBM437' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
    Parameter name: name
    at System.Globalization.EncodingTable.internalGetCodePageFromName(String name)
    at System.Globalization.EncodingTable.GetCodePageFromName(String name)
    at System.Text.Encoding.GetEncoding(String name)
    at OfficeOpenXml.Packaging.ZipPackage.Save(Stream stream)
    at OfficeOpenXml.ExcelPackage.Save()
    at OfficeOpenXml.ExcelPackage.SaveAs(Stream OutputStream)
    at ConsoleApp3.Program.Main(String[] args) in c:\users\davifowl\documents\visual studio 2017\Projects\ConsoleApp3\ConsoleApp3\Program.cs:line 34
    ```
- [PayPal .NET SDK](https://www.nuget.org/packages/paypal/) - Explodes with the following exception

	```
    Unhandled Exception: FileNotFoundException: Could not load file or assembly 'System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    ```


================================================
FILE: PclToNetStandard.md
================================================
# Converting a PCL to netstandard

Here are the compatible PCL profiles and their .NET Standard Mapping:

| Profile | .NET Platform Standard version |
| ---------| --------------- |
| Profile7  .NET Portable Subset (.NET Framework 4.5, Windows 8) | 1.1 |
| Profile31 .NET Portable Subset (Windows 8.1, Windows Phone Silverlight 8.1)| 1.0 |
| Profile32 .NET Portable Subset (Windows 8.1, Windows Phone 8.1) | 1.2 |
| Profile44 .NET Portable Subset (.NET Framework 4.5.1, Windows 8.1) | 1.2 |
| Profile49 .NET Portable Subset (.NET Framework 4.5, Windows Phone Silverlight 8) | 1.0 |
| Profile78 .NET Portable Subset (.NET Framework 4.5, Windows 8, Windows Phone Silverlight 8) | 1.0 |
| Profile84 .NET Portable Subset (Windows Phone 8.1, Windows Phone Silverlight 8.1) | 1.0 |
| Profile111 .NET Portable Subset (.NET Framework 4.5, Windows 8, Windows Phone 8.1) | 1.1 |
| Profile151 .NET Portable Subset (.NET Framework 4.5.1, Windows 8.1, Windows Phone 8.1) | 1.2 |
| Profile157 .NET Portable Subset (Windows 8.1, Windows Phone 8.1, Windows Phone Silverlight 8.1) | 1.0 |
| Profile259 .NET Portable Subset (.NET Framework 4.5, Windows 8, Windows Phone 8.1, Windows Phone Silverlight 8) | 1.0 |



================================================
FILE: RC1ToRC2.md
================================================
# Migrating an RC1 DNX project to an RC2 .NET CLI project


================================================
FILE: README.md
================================================
# Netstandard Guide

[![Join the chat at https://gitter.im/davidfowl/NetStandard](https://badges.gitter.im/davidfowl/NetStandard.svg)](https://gitter.im/davidfowl/NetStandard?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This is a work in progress and will change as we fix bugs in the product to improve the porting user experience. The target audience for this is package authors. It assumes that you have built and published a NuGet package before.

## What is it?

Netstandard is the next step after Portable Class Libraries. Please read [the full Netstandard document](https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md) for more information.

## Who is this for?

Moving to Netstandard is the way to go, going forward, to maximize reusability of your code. Here are a few situations you may find yourself in:

- [I already have a PCL csproj and I want to move to netstandard.](PclToNetStandard.md)
- [I already have a PCL csproj and I'm willing to change my current project system and build to use the new xproj project system.](XProjNetStandard.md)
- [I'm starting from scratch and I want to support netstandard.](XProjNetStandard.md)
- [I'm migrating an RC1 DNX project to an RC2 .NET CLI project.](RC1ToRC2.md)
- [I'm starting from my .NET Framework library and I want to go to netstandard.](NETFrameworkToNetStandard.md)

## Mapping .NET Standard versions to platforms

[Explaination using C# interfaces](https://github.com/davidfowl/NetStandard/blob/master/platforms.cs)

| Target Platform Name | Alias |  |  |  |  |  | |
| :---------- | :--------- |:--------- |:--------- |:--------- |:--------- |:--------- |:--------- |
|.NET Platform Standard | netstandard | 1.0 | 1.1 | 1.2 | 1.3 | 1.4 | 1.5 |
|.NET Core|netcoreapp|→|→|→|→|→|1.0|
|.NET Framework|net|→|→|→|→|→|4.6.2|
|||→|→|→|→|4.6.1||
|||→|→|→|4.6|||
|||→|→|4.5.2||||
|||→|→|4.5.1||||
|||→|4.5|||||
|Universal Windows Platform|uap|→|→|→|→|10.0||
|Windows|win|→|→|8.1||||
|||→|8.0|||||
|Windows Phone|wpa|→|→|8.1||||
|Windows Phone Silverlight|wp|8.1||||||
|||8.0||||||
|Mono/Xamarin Platforms||→|→|→|→|→|*|
|Mono||→|→|*|||||

## Considerations
- There are currently few or no packages using the `netstandard` target framework, because it was only recently created. This means that you may need to use a new feature called `project.json` [**imports**](https://github.com/aspnet/Home/wiki/Project.json-file) to bypass the NuGet compatiblity check when pulling in other packages as dependencies (see the compatiblity section of this document for more information).
- There are two NuGet experiences, `packages.config` and `project.json`. Most projects support `packages.config` today but NuGet is pushing people towards `project.json`. This is not the default experience in any other project except Windows Universal Applications and .NET Core projects.
- This process only works with Visual Studio 2015 Update 2 or later. It means when you convert your project, you'll only be able to use it in Visual Studio 2015, or from the command-line. Even though the library's project can only be used in Visual Studio 2015, but downstream consumers of the package will still be able to consume it from earlier versions of Visual Studio (see next point).
- It's possible to author packages that work in Visual Studio 2012 - 2015 but the NuGet client on 2012 and 2013 does not currently support the netstandard moniker. This doesn't mean things won't work, it just means you'll also need to include another dll in the package. The NuGet team is looking at down level support for this moniker.
- Windows Universal platform applications do not yet work with RC2 packages. This means that in order to build a NuGet package that targets all platforms , you'll need to have a different set of dependencies in your nuspec/project.json for `netcore50`.
- If you need to support .NET Framework 4.0 or lower, then you’ll have to support multiple target frameworks in your NuGet package. Netstandard supports .NET Framework 4.5 and higher.
- If you need to target multiple frameworks there are 2 approaches:
 - Use `.xproj` + `project.json`. This is a single project that can target multiple frameworks.
 - Use multiple `.csproj` files with different references

## Packages

Everything in Netstandard is represented as packages. The biggest benefit to this is that it no longer requires an installed SDK or Visual Studio to compile for a specific target framework. This is also beneficial for cross platform builds since the only thing you need is the .NET CLI tool chain.

## Required tools
- [Visual Studio 2015 Update 2](https://www.visualstudio.com/en-us/news/vs2015-update2-vs.aspx) or later
- [NuGet.exe 3.4.2-rc](https://dist.nuget.org/win-x86-commandline/v3.4.2-rc/nuget.exe) or later



================================================
FILE: XProjNetStandard.md
================================================
# Creating Netstandard packages with xproj and the .NET CLI


================================================
FILE: examples.cs
================================================
namespace Analogy
{
    /// <summary>
    /// This example shows that a library that needs access to target .NET Standard 1.3
    /// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET 
    /// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
    /// </summary>INetCoreApp10
    class Example1
    {
        public void Net45Application(INetFramework45 platform)
        {
            // .NET Framework 4.5 has access to all .NET Framework APIs
            platform.FileSystem();

            platform.Console();


            // This fails because .NET Framework 4.5 does not implement .NET Standard 1.3
            // Argument 1: cannot convert from 'Analogy.INetFramework45' to 'Analogy.INetStandard13'
            NetStandardLibrary13(project);
        }

        public void NetStandardLibrary13(INetStandard13 platform)
        {
            platform.FileSystem();

            platform.Console();
        }
    }


    /// <summary>
    /// This example shows a library targeting multiple frameworks and 2 different applications
    /// using that library. MultipleTargetsLibrary needs access to the FileSystem, that API was only available
    /// in .NET Standard 1.3. .NET Standard 1.3 only works with .NET Framework 4.6. Because of this
    /// MultipleTargetsLibrary needs to add support for .NET Framework 4.5 explicitly.
    /// </summary>
    class Example2
    {
        public void Net45Application(INetFramework451 platform)
        {
            // On the .NET 4.5.1 application, the INetFramework45 implementation is choson
            MultipleTargetsLibrary(platform);
        }

        public void NetCoreApplication(INetCoreApp10 platform)
        {
            // On the .NET Core 1.0 application, the INetStandard13 implementation is choson
            MultipleTargetsLibrary(platform);
        }

        public void MultipleTargetsLibrary(INetFramework45 platform)
        {
            platform.FileSystem();
        }

        public void MultipleTargetsLibrary(INetStandard13 platform)
        {
            platform.FileSystem();
        }
    }

    /// <summary>
    /// This example shows how future platforms can be added without the need to change libraries that
    /// target the .NET Standard. JSN.NET targets .NET Standard 1.0 and can run on *ANY* platform that implements
    /// the standard.
    /// </summary>
    class Example3
    {
        /// <summary>
        /// This future platform implements .NET Standard 1.3
        /// </summary>
        public void FuturePlatformApplication(ISomeFuturePlatform platform)
        {
            // You are able to use JSON.NET with the future platform without recompiling JSON.NET
            JsonNet(platform);
        }

        /// <summary>
        /// This method represents the implementation of JSON.NET. JSON.NET supports .NET Standard 1.0.
        /// </summary>
        public void JsonNet(INetStandard10 platform)
        {
            platform.Linq();

            platform.Reflection();

            platform.Collections();
        }
    }
}


================================================
FILE: packages/aspnet.json
================================================


{
  "dependencies": {
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
    "Microsoft.Net.WebSockets.Server": "0.1.0",
    "Microsoft.Net.Http.Server": "0.1.0",
    "Microsoft.Net.Http.Headers": "1.0.0",
    "Microsoft.Extensions.WebEncoders": "1.0.0",
    "Microsoft.Extensions.Primitives": "1.0.0",
    "Microsoft.Extensions.PlatformAbstractions": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
    "Microsoft.Extensions.Options": "1.0.0",
    "Microsoft.Extensions.ObjectPool": "1.0.0",
    "Microsoft.Extensions.Logging.TraceSource": "1.0.0",
    "Microsoft.Extensions.Logging.Filter": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Abstractions": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Localization.Abstractions": "1.0.0",
    "Microsoft.Extensions.Localization": "1.0.0",
    "Microsoft.Extensions.Globalization.CultureInfoCache": "1.0.0",
    "Microsoft.Extensions.FileSystemGlobbing": "1.0.0",
    "Microsoft.Extensions.FileProviders.Physical": "1.0.0",
    "Microsoft.Extensions.FileProviders.Embedded": "1.0.0",
    "Microsoft.Extensions.FileProviders.Composite": "1.0.0",
    "Microsoft.Extensions.FileProviders.Abstractions": "1.0.0",
    "Microsoft.Extensions.DiagnosticAdapter": "1.0.0",
    "Microsoft.Extensions.DependencyModel": "1.0.0",
    "Microsoft.Extensions.DependencyInjection.Specification.Tests": "1.0.0",
    "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0",
    "Microsoft.Extensions.DependencyInjection": "1.0.0",
    "Microsoft.Extensions.Configuration.Xml": "1.0.0",
    "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Configuration.Ini": "1.0.0",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
    "Microsoft.Extensions.Configuration.Binder": "1.0.0",
    "Microsoft.Extensions.Configuration.Abstractions": "1.0.0",
    "Microsoft.Extensions.Configuration": "1.0.0",
    "Microsoft.Extensions.CommandLineUtils": "1.0.0",
    "Microsoft.Extensions.Caching.SqlServer": "1.0.0",
    "Microsoft.Extensions.Caching.Memory": "1.0.0",
    "Microsoft.Extensions.Caching.Abstractions": "1.0.0",
    "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.0.0",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0",
    "Microsoft.EntityFrameworkCore.Sqlite.Design": "1.0.0",
    "Microsoft.EntityFrameworkCore.Sqlite": "1.0.0",
    "Microsoft.EntityFrameworkCore.Relational.Design": "1.0.0",
    "Microsoft.EntityFrameworkCore.Relational": "1.0.0",
    "Microsoft.EntityFrameworkCore.InMemory": "1.0.0",
    "Microsoft.EntityFrameworkCore.Commands": "1.0.0",
    "Microsoft.EntityFrameworkCore": "1.0.0",
    "Microsoft.Data.Sqlite": "1.0.0",
    "Microsoft.AspNetCore.WebUtilities": "1.0.0",
    "Microsoft.AspNetCore.WebSockets.Server": "0.1.0",
    "Microsoft.AspNetCore.WebSockets.Protocol": "0.1.0",
    "Microsoft.AspNetCore.TestHost": "1.0.0",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0",
    "Microsoft.AspNetCore.Session": "1.0.0",
    "Microsoft.AspNetCore.Server.WebListener": "0.1.0",
    "Microsoft.AspNetCore.Server.Kestrel.Https": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Routing.Abstractions": "1.0.0",
    "Microsoft.AspNetCore.Routing": "1.0.0",
    "Microsoft.AspNetCore.Razor.Runtime": "1.0.0",
    "Microsoft.AspNetCore.Razor": "1.0.0",
    "Microsoft.AspNetCore.Proxy": "0.1.0",
    "Microsoft.AspNetCore.Owin": "1.0.0",
    "Microsoft.AspNetCore.Mvc.WebApiCompatShim": "1.0.0",
    "Microsoft.AspNetCore.Mvc.ViewFeatures": "1.0.0",
    "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0",
    "Microsoft.AspNetCore.Mvc.Razor.Host": "1.0.0",
    "Microsoft.AspNetCore.Mvc.Razor": "1.0.0",
    "Microsoft.AspNetCore.Mvc.Localization": "1.0.0",
    "Microsoft.AspNetCore.Mvc.Formatters.Xml": "1.0.0",
    "Microsoft.AspNetCore.Mvc.Formatters.Json": "1.0.0",
    "Microsoft.AspNetCore.Mvc.Dnx": "1.0.0",
    "Microsoft.AspNetCore.Mvc.DataAnnotations": "1.0.0",
    "Microsoft.AspNetCore.Mvc.Cors": "1.0.0",
    "Microsoft.AspNetCore.Mvc.Core": "1.0.0",
    "Microsoft.AspNetCore.Mvc.ApiExplorer": "1.0.0",
    "Microsoft.AspNetCore.Mvc.Abstractions": "1.0.0",
    "Microsoft.AspNetCore.Mvc": "1.0.0",
    "Microsoft.AspNetCore.MiddlewareAnalysis": "1.0.0",
    "Microsoft.AspNetCore.Localization": "1.0.0",
    "Microsoft.AspNetCore.JsonPatch": "1.0.0",
    "Microsoft.AspNetCore.Internal.libuv-Linux": "1.0.0-rc2-10018",
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0",
    "Microsoft.AspNetCore.Identity": "1.0.0",
    "Microsoft.AspNetCore.HttpOverrides": "1.0.0",
    "Microsoft.AspNetCore.Http.Features": "1.0.0",
    "Microsoft.AspNetCore.Http.Extensions": "1.0.0",
    "Microsoft.AspNetCore.Http.Abstractions": "1.0.0",
    "Microsoft.AspNetCore.Http": "1.0.0",
    "Microsoft.AspNetCore.Html.Abstractions": "1.0.0",
    "Microsoft.AspNetCore.Hosting.Server.Abstractions": "1.0.0",
    "Microsoft.AspNetCore.Hosting.Abstractions": "1.0.0",
    "Microsoft.AspNetCore.Hosting": "1.0.0",
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",
    "Microsoft.AspNetCore.Diagnostics.Elm": "0.1.0",
    "Microsoft.AspNetCore.Diagnostics.Abstractions": "1.0.0",
    "Microsoft.AspNetCore.Diagnostics": "1.0.0",
    "Microsoft.AspNetCore.DataProtection.Extensions": "1.0.0",
    "Microsoft.AspNetCore.DataProtection.Abstractions": "1.0.0",
    "Microsoft.AspNetCore.DataProtection": "1.0.0",
    "Microsoft.AspNetCore.Cryptography.KeyDerivation": "1.0.0",
    "Microsoft.AspNetCore.Cryptography.Internal": "1.0.0",
    "Microsoft.AspNetCore.Cors": "1.0.0",
    "Microsoft.AspNetCore.CookiePolicy": "1.0.0",
    "Microsoft.AspNetCore.Buffering": "0.1.0",
    "Microsoft.AspNetCore.Authorization": "1.0.0",
    "Microsoft.AspNetCore.Authentication.Twitter": "1.0.0",
    "Microsoft.AspNetCore.Authentication.OpenIdConnect": "0.1.0",
    "Microsoft.AspNetCore.Authentication.OAuth": "1.0.0",
    "Microsoft.AspNetCore.Authentication.MicrosoftAccount": "1.0.0",
    "Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0",
    "Microsoft.AspNetCore.Authentication.Google": "1.0.0",
    "Microsoft.AspNetCore.Authentication.Facebook": "1.0.0",
    "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
    "Microsoft.AspNetCore.Authentication": "1.0.0",
    "Microsoft.AspNetCore.Antiforgery": "1.0.0"
  },
  "frameworks": {
    "net451": {
      "dependencies": {
        "Microsoft.Owin.Security.Interop": "1.0.0",
        "Microsoft.Extensions.Logging.EventLog": "1.0.0",
        "Microsoft.Extensions.Caching.Redis": "1.0.0",
        "Microsoft.AspNetCore.WebSockets.Client": "0.1.0",
        "Microsoft.AspNetCore.Hosting.WindowsServices": "1.0.0",
        "Microsoft.AspNetCore.DataProtection.SystemWeb": "1.0.0"
      }
    }
  }
}


================================================
FILE: packages/corefx.json
================================================
{
  "dependencies": {
    "NETStandard.Library": "1.6.0",
    "Microsoft.CSharp": "4.0.1",
    "Microsoft.VisualBasic": "10.0.1",
    "Microsoft.Win32.Primitives": "4.0.1",
    "Microsoft.Win32.Registry.AccessControl": "4.0.0",
    "Microsoft.Win32.Registry": "4.0.0",
    "System.AppContext": "4.1.0",
    "System.Buffers": "4.0.0",
    "System.Collections.Concurrent": "4.0.12",
    "System.Collections.Immutable": "1.2.0",
    "System.Collections.NonGeneric": "4.0.1",
    "System.Collections": "4.0.11",
    "System.Collections.Specialized": "4.0.1",
    "System.ComponentModel.Annotations": "4.1.0",
    "System.ComponentModel.EventBasedAsync": "4.0.11",
    "System.ComponentModel": "4.0.1",
    "System.ComponentModel.Primitives": "4.0.1",
    "System.ComponentModel.TypeConverter": "4.0.1",
    "System.Console": "4.0.0",
    "System.Data.Common": "4.0.1",
    "System.Data.SqlClient": "4.1.0",
    "System.Diagnostics.Contracts": "4.0.1",
    "System.Diagnostics.Debug": "4.0.11",
    "System.Diagnostics.DiagnosticSource": "4.0.0",
    "System.Diagnostics.FileVersionInfo": "4.0.0",
    "System.Diagnostics.Process": "4.1.0",
    "System.Diagnostics.StackTrace": "4.0.1",
    "System.Diagnostics.TextWriterTraceListener": "4.0.0",
    "System.Diagnostics.Tools": "4.0.1",
    "System.Diagnostics.TraceSource": "4.0.0",
    "System.Diagnostics.Tracing": "4.1.0",
    "System.Dynamic.Runtime": "4.0.11",
    "System.Globalization.Calendars": "4.0.1",
    "System.Globalization.Extensions": "4.0.1",
    "System.Globalization": "4.0.11",
    "System.IO.Compression": "4.1.0",
    "System.IO.Compression.ZipFile": "4.0.1",
    "System.IO.FileSystem.AccessControl": "4.0.0",
    "System.IO.FileSystem.DriveInfo": "4.0.0",
    "System.IO.FileSystem": "4.0.1",
    "System.IO.FileSystem.Primitives": "4.0.1",
    "System.IO.FileSystem.Watcher": "4.0.0",
    "System.IO.IsolatedStorage": "4.0.1",
    "System.IO.MemoryMappedFiles": "4.0.0",
    "System.IO": "4.1.0",
    "System.IO.Packaging": "4.0.0",
    "System.IO.Pipes": "4.0.0",
    "System.IO.UnmanagedMemoryStream": "4.0.1",
    "System.Linq.Expressions": "4.0.11",
    "System.Linq": "4.1.0",
    "System.Linq.Parallel": "4.0.1",
    "System.Linq.Queryable": "4.0.1",
    "System.Net.Http": "4.0.1",
    "System.Net.Http.Rtc": "4.0.1",
    "System.Net.Http.WinHttpHandler": "4.0.0",
    "System.Net.NameResolution": "4.0.0",
    "System.Net.NetworkInformation": "4.1.0",
    "System.Net.Ping": "4.0.0",
    "System.Net.Primitives": "4.0.11",
    "System.Net.Requests": "4.0.11",
    "System.Net.Security": "4.0.0",
    "System.Net.Sockets": "4.1.0",
    "System.Net.WebHeaderCollection": "4.0.1",
    "System.Net.WebSockets.Client": "4.0.0",
    "System.Net.WebSockets": "4.0.0",
    "System.Numerics.Vectors": "4.1.1",
    "System.ObjectModel": "4.0.12",
    "System.Reflection.Context": "4.0.1",
    "System.Reflection.DispatchProxy": "4.0.1",
    "System.Reflection.Emit.ILGeneration": "4.0.1",
    "System.Reflection.Emit.Lightweight": "4.0.1",
    "System.Reflection.Emit": "4.0.1",
    "System.Reflection.Extensions": "4.0.1",
    "System.Reflection.Metadata": "1.3.0",
    "System.Reflection": "4.1.0",
    "System.Reflection.Primitives": "4.0.1",
    "System.Reflection.TypeExtensions": "4.1.0",
    "System.Resources.Reader": "4.0.0",
    "System.Resources.ReaderWriter": "4.0.0",
    "System.Resources.ResourceManager": "4.0.1",
    "System.Resources.Writer": "4.0.0",
    "System.Runtime.CompilerServices.VisualC": "4.0.0",
    "System.Runtime.Extensions": "4.1.0",
    "System.Runtime.Handles": "4.0.1",
    "System.Runtime.InteropServices": "4.1.0",
    "System.Runtime.InteropServices.PInvoke": "4.0.0",
    "System.Runtime.InteropServices.RuntimeInformation": "4.0.0",
    "System.Runtime.InteropServices.WindowsRuntime": "4.0.1",
    "System.Runtime.Loader": "4.0.0",
    "System.Runtime.Numerics": "4.0.1",
    "System.Runtime": "4.1.0",
    "System.Runtime.Serialization.Json": "4.0.2",
    "System.Runtime.Serialization.Primitives": "4.1.1",
    "System.Runtime.Serialization.Xml": "4.1.1",
    "System.Security.AccessControl": "4.0.0",
    "System.Security.Claims": "4.0.1",
    "System.Security.Cryptography.Algorithms": "4.1.0",
    "System.Security.Cryptography.Cng": "4.1.0",
    "System.Security.Cryptography.Csp": "4.0.0",
    "System.Security.Cryptography.Encoding": "4.0.0",
    "System.Security.Cryptography.OpenSsl": "4.0.0",
    "System.Security.Cryptography.Primitives": "4.0.0",
    "System.Security.Cryptography.X509Certificates": "4.1.0",
    "System.Security.Principal": "4.0.1",
    "System.Security.Principal.Windows": "4.0.0",
    "System.ServiceModel.Duplex": "4.0.1",
    "System.ServiceModel.Http": "4.1.0",
    "System.ServiceModel.NetTcp": "4.1.0",
    "System.ServiceModel.Primitives": "4.1.0",
    "System.ServiceModel.Security": "4.0.1",
    "System.ServiceProcess.ServiceController": "4.1.0",
    "System.Text.Encoding.CodePages": "4.0.1",
    "System.Text.Encoding.Extensions": "4.0.11",
    "System.Text.Encoding": "4.0.11",
    "System.Text.Encodings.Web": "4.0.0",
    "System.Text.RegularExpressions": "4.0.12",
    "System.Threading.AccessControl": "4.0.0",
    "System.Threading": "4.0.11",
    "System.Threading.Overlapped": "4.0.1",
    "System.Threading.Tasks.Dataflow": "4.6.0",
    "System.Threading.Tasks.Extensions": "4.0.0",
    "System.Threading.Tasks": "4.0.11",
    "System.Threading.Tasks.Parallel": "4.0.1",
    "System.Threading.Thread": "4.0.0",
    "System.Threading.ThreadPool": "4.0.10",
    "System.Threading.Timer": "4.0.1",
    "System.Xml.ReaderWriter": "4.0.11",
    "System.Xml.XDocument": "4.0.11",
    "System.Xml.XmlDocument": "4.0.1",
    "System.Xml.XmlSerializer": "4.0.11",
    "System.Xml.XPath": "4.0.1",
    "System.Xml.XPath.XDocument": "4.0.1",
    "System.Xml.XPath.XmlDocument": "4.0.1"
  }
}


================================================
FILE: platforms.cs
================================================

namespace Analogy
{
    // Each interface represents a target framework and methods represents groups of APIs available on that target framework. 
    // The goal is to show the relationship between .NET Standard API surface and other .NET platforms


    // .NET Standard

    interface INetStandard10
    {
        void Primitives();
        void Reflection();
        void Tasks();
        void Xml();
        void Collections();
        void Linq();
    }

    interface INetStandard11 : INetStandard10
    {
        void ConcurrentCollections();
        void LinqParallel();
        void Compression();
        void HttpClient();
    }

    interface INetStandard12 : INetStandard11
    {
        void ThreadingTimer();
    }

    interface INetStandard13 : INetStandard12
    {
        void FileSystem();
        void Console();
        void ThreadPool();
        void Crypto();
        void WebSockets();
        void Process();
        void Sockets();

        void AsyncLocal();
    }

    interface INetStandard14 : INetStandard13
    {
        void IsolatedStorage();
    }

    interface INetStandard15 : INetStandard14
    {
    }

    // .NET Framework 

    interface INetFramework45 : INetStandard11
    {
        void FileSystem();
        void Console();
        void ThreadPool();
        void Crypto();
        void WebSockets();
        void Process();
        void Drawing();
        void SystemWeb();
        void WPF();
        void WindowsForms();
        void WCF();
    }

    interface INetFramework451 : INetFramework45, INetStandard12
    {
        // TODO: .NET Framework 4.5.1 specific APIs
    }

    interface INetFramework452 : INetFramework451, INetStandard12
    {
        // TODO: .NET Framework 4.5.2 specific APIs
    }

    interface INetFramework46 : INetFramework452, INetStandard13
    {
        // TODO: .NET Framework 4.6 specific APIs
    }

    interface INetFramework461 : INetFramework46, INetStandard14
    {
        // TODO: .NET Framework 4.6.1 specific APIs
    }

    interface INetFramework462 : INetFramework461, INetStandard15
    {
        // TODO: .NET Framework 4.6.2 specific APIs
    }

    // Windows Universal Platform

    interface IWindowsUniversalPlatform : INetStandard13
    {
        void GPS();
        void Xaml();
    }

    // Xamarin 

    interface IXamarinIOS : INetStandard15
    {
        void AppleAPIs();
    }

    interface IXamarinAndroid : INetStandard15
    {
        void GoogleAPIs();
    }

    // .NET Core

    interface INetCoreApp10 : INetStandard15
    {

    }

    // Future platform

    interface ISomeFuturePlatform : INetStandard13
    {
        // A future platform chooses to implement a specific .NET Standard version.
        // All libraries that target that version are instantly compatible with this new
        // platform
    }
}
Download .txt
gitextract_fz8wdp6f/

├── FAQ.md
├── NETFrameworkToNetStandard.md
├── NETStandard2.0WithNuGet.md
├── PclToNetStandard.md
├── RC1ToRC2.md
├── README.md
├── XProjNetStandard.md
├── examples.cs
├── packages/
│   ├── aspnet.json
│   └── corefx.json
└── platforms.cs
Download .txt
SYMBOL INDEX (63 symbols across 2 files)

FILE: examples.cs
  class Example1 (line 8) | class Example1
    method Net45Application (line 10) | public void Net45Application(INetFramework45 platform)
    method NetStandardLibrary13 (line 23) | public void NetStandardLibrary13(INetStandard13 platform)
  class Example2 (line 38) | class Example2
    method Net45Application (line 40) | public void Net45Application(INetFramework451 platform)
    method NetCoreApplication (line 46) | public void NetCoreApplication(INetCoreApp10 platform)
    method MultipleTargetsLibrary (line 52) | public void MultipleTargetsLibrary(INetFramework45 platform)
    method MultipleTargetsLibrary (line 57) | public void MultipleTargetsLibrary(INetStandard13 platform)
  class Example3 (line 68) | class Example3
    method FuturePlatformApplication (line 73) | public void FuturePlatformApplication(ISomeFuturePlatform platform)
    method JsonNet (line 82) | public void JsonNet(INetStandard10 platform)

FILE: platforms.cs
  type INetStandard10 (line 10) | interface INetStandard10
    method Primitives (line 12) | void Primitives();
    method Reflection (line 13) | void Reflection();
    method Tasks (line 14) | void Tasks();
    method Xml (line 15) | void Xml();
    method Collections (line 16) | void Collections();
    method Linq (line 17) | void Linq();
  type INetStandard11 (line 20) | interface INetStandard11 : INetStandard10
    method ConcurrentCollections (line 22) | void ConcurrentCollections();
    method LinqParallel (line 23) | void LinqParallel();
    method Compression (line 24) | void Compression();
    method HttpClient (line 25) | void HttpClient();
  type INetStandard12 (line 28) | interface INetStandard12 : INetStandard11
    method ThreadingTimer (line 30) | void ThreadingTimer();
  type INetStandard13 (line 33) | interface INetStandard13 : INetStandard12
    method FileSystem (line 35) | void FileSystem();
    method Console (line 36) | void Console();
    method ThreadPool (line 37) | void ThreadPool();
    method Crypto (line 38) | void Crypto();
    method WebSockets (line 39) | void WebSockets();
    method Process (line 40) | void Process();
    method Sockets (line 41) | void Sockets();
    method AsyncLocal (line 43) | void AsyncLocal();
  type INetStandard14 (line 46) | interface INetStandard14 : INetStandard13
    method IsolatedStorage (line 48) | void IsolatedStorage();
  type INetStandard15 (line 51) | interface INetStandard15 : INetStandard14
  type INetFramework45 (line 57) | interface INetFramework45 : INetStandard11
    method FileSystem (line 59) | void FileSystem();
    method Console (line 60) | void Console();
    method ThreadPool (line 61) | void ThreadPool();
    method Crypto (line 62) | void Crypto();
    method WebSockets (line 63) | void WebSockets();
    method Process (line 64) | void Process();
    method Drawing (line 65) | void Drawing();
    method SystemWeb (line 66) | void SystemWeb();
    method WPF (line 67) | void WPF();
    method WindowsForms (line 68) | void WindowsForms();
    method WCF (line 69) | void WCF();
  type INetFramework451 (line 72) | interface INetFramework451 : INetFramework45, INetStandard12
  type INetFramework452 (line 77) | interface INetFramework452 : INetFramework451, INetStandard12
  type INetFramework46 (line 82) | interface INetFramework46 : INetFramework452, INetStandard13
  type INetFramework461 (line 87) | interface INetFramework461 : INetFramework46, INetStandard14
  type INetFramework462 (line 92) | interface INetFramework462 : INetFramework461, INetStandard15
  type IWindowsUniversalPlatform (line 99) | interface IWindowsUniversalPlatform : INetStandard13
    method GPS (line 101) | void GPS();
    method Xaml (line 102) | void Xaml();
  type IXamarinIOS (line 107) | interface IXamarinIOS : INetStandard15
    method AppleAPIs (line 109) | void AppleAPIs();
  type IXamarinAndroid (line 112) | interface IXamarinAndroid : INetStandard15
    method GoogleAPIs (line 114) | void GoogleAPIs();
  type INetCoreApp10 (line 119) | interface INetCoreApp10 : INetStandard15
  type ISomeFuturePlatform (line 126) | interface ISomeFuturePlatform : INetStandard13
Condensed preview — 11 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (30K chars).
[
  {
    "path": "FAQ.md",
    "chars": 29,
    "preview": "# Frequently Asked Questions\n"
  },
  {
    "path": "NETFrameworkToNetStandard.md",
    "chars": 59,
    "preview": "# Converting a .NET Framework class library to NETStandard\n"
  },
  {
    "path": "NETStandard2.0WithNuGet.md",
    "chars": 2487,
    "preview": "## Registry of NuGet.org packages tried with .NET Core 2.0\n\n- [NuGet.Core](https://www.nuget.org/packages/nuget.core/) -"
  },
  {
    "path": "PclToNetStandard.md",
    "chars": 1195,
    "preview": "# Converting a PCL to netstandard\n\nHere are the compatible PCL profiles and their .NET Standard Mapping:\n\n| Profile | .N"
  },
  {
    "path": "RC1ToRC2.md",
    "chars": 58,
    "preview": "# Migrating an RC1 DNX project to an RC2 .NET CLI project\n"
  },
  {
    "path": "README.md",
    "chars": 5006,
    "preview": "# Netstandard Guide\n\n[![Join the chat at https://gitter.im/davidfowl/NetStandard](https://badges.gitter.im/davidfowl/Net"
  },
  {
    "path": "XProjNetStandard.md",
    "chars": 60,
    "preview": "# Creating Netstandard packages with xproj and the .NET CLI\n"
  },
  {
    "path": "examples.cs",
    "chars": 3137,
    "preview": "namespace Analogy\n{\n    /// <summary>\n    /// This example shows that a library that needs access to target .NET Standar"
  },
  {
    "path": "packages/aspnet.json",
    "chars": 7228,
    "preview": "\n\n{\n  \"dependencies\": {\n    \"Microsoft.VisualStudio.Web.BrowserLink.Loader\": \"14.0.0\",\n    \"Microsoft.Net.WebSockets.Ser"
  },
  {
    "path": "packages/corefx.json",
    "chars": 5847,
    "preview": "{\n  \"dependencies\": {\n    \"NETStandard.Library\": \"1.6.0\",\n    \"Microsoft.CSharp\": \"4.0.1\",\n    \"Microsoft.VisualBasic\": "
  },
  {
    "path": "platforms.cs",
    "chars": 2842,
    "preview": "\nnamespace Analogy\n{\n    // Each interface represents a target framework and methods represents groups of APIs available"
  }
]

About this extraction

This page contains the full source code of the davidfowl/NetStandard GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 11 files (27.3 KB), approximately 8.1k tokens, and a symbol index with 63 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!