Skip to content

Instantly share code, notes, and snippets.

View ericstj's full-sized avatar

Eric StJohn ericstj

View GitHub Profile
@ericstj
ericstj / Program.cs
Created January 6, 2020 17:17
appsettings
using System;
namespace appsettings
{
class Program
{
static void Main(string[] args)
{
System.Configuration.ConfigurationManager.AppSettings["hello"] = "world";
Console.WriteLine("Hello World!");
@ericstj
ericstj / netstandard20-corefx-infra.md
Last active November 3, 2016 00:18
CoreFx build changes for .NETStandard2.0

##dotnet/CoreFx ###Libraries in NETStandard

  • ref
    • Default targetgroup should be NETCoreApp build
    • P2P references to other reference assembly CSProjs.
    • System.Runtime core assembly.
    • Cross-compiles for concrete frameworks (if different)
      • EG: exposes types/members not in NETStandard on NETCoreApp, but not on UWP
  • src
  • Default targetgroup should be NETCoreApp build
@ericstj
ericstj / http-desktop-core.md
Created July 7, 2016 22:50
Diff between desktop and nuget package reference assemblies for HttpClient

API Difference C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Net.Http.dll vs C:\Users\ericstj.nuget\packages\System.Net.Http\4.1.0\ref\netstandard1.1\System.Net.Http.dll

API listing follows standard diff formatting. Lines preceded by a '+' are additions and a '-' indicates removal.

System.Net.Http

 namespace System.Net.Http {
     public class ByteArrayContent : HttpContent {
@ericstj
ericstj / resolveNuPkgs.md
Created July 6, 2016 16:16
How to resolve binaries from NuGet packages

Resolving binaries from NuGet packages

NuGet is handy for sharing code but sometimes you need to deal with raw binaries. Picking those directly out of NuGet packages can be challenging since NuGet has many complex/inter-related conventions for determining which assets are applicable.

This document will describe a technique for resolving binaries using NuGet's asset selection algorithm via DotNET CLI.

Prerequisites

@ericstj
ericstj / project.json
Created July 6, 2016 16:12
.NET Core RTM NETStandard1.6
{
"buildOptions": {
"preserveCompilationContext": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc3-004308"
},
"Microsoft.CSharp": "4.0.1",
@ericstj
ericstj / rtmStablePackages.md
Last active June 9, 2016 19:54
Packages to mark stable for CoreFx 1.0.0 RTM

###core-setup

Package Id Version
Microsoft.NETCore.App 1.0.0
Microsoft.NETCore 5.0.1
Microsoft.NETCore.UniversalWindowsPlatform 5.2.0
Microsoft.NETCore.DotNetHost 1.0.1
Microsoft.NETCore.DotNetHostPolicy 1.0.1
Microsoft.NETCore.DotNetHostResolver 1.0.1
runtime.debian.8-x64.Microsoft.NETCore.DotNetHost 1.0.1
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputPath>DTAR_08E86330_4835_4B5C_9E5A_61F37AE1A077_DTAR</OutputPath>
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<TargetFrameworkProfile></TargetFrameworkProfile>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0</TargetPlatformVersion>
<FrameworkRegistryBase></FrameworkRegistryBase>
Error : Multiple projects built twice with the same target path C:\src\corefx\bin\ref\System.Reflection.TypeExtensions\4.1.0.0\System.Reflection.TypeExtensions.dll.
C:\src\corefx\build.proj -->
C:\src\corefx\src\dirs.proj -->
Global Properties:
DefaultBuildAllTarget = BuildAndTest
Dummy = src\dirs.proj
FilterToOSGroup = Windows_NT
BuildAllProjects = true
C:\src\corefx\src\tests.builds -->
Global Properties: