Skip to content

Instantly share code, notes, and snippets.

View davkean's full-sized avatar

David Kean davkean

View GitHub Profile
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using Microsoft.VisualStudio.ProjectSystem;
using PathHelpers;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using Microsoft.VisualStudio.ProjectSystem;
using PathHelpers;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using Microsoft.VisualStudio.ProjectSystem;
using PathHelpers;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
This file has been truncated, but you can view the full file.
Build started 1/9/2017 5:11:58 PM.
Environment at start of build:
ALLUSERSPROFILE = C:\ProgramData
APPDATA = C:\Users\davkean\AppData\Roaming
BatchFile = build
BinariesDirectory = E:\project-system2\bin\Debug\
BuildConfiguration = Debug
CommonProgramFiles = C:\Program Files (x86)\Common Files
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
CommonProgramW6432 = C:\Program Files\Common Files
Build started 1/9/2017 5:09:52 PM.
Environment at start of build:
ALLUSERSPROFILE = C:\ProgramData
APPDATA = C:\Users\davkean\AppData\Roaming
BatchFile = build
BinariesDirectory = E:\project-system2\bin\Debug\
BuildConfiguration = Debug
CommonProgramFiles = C:\Program Files (x86)\Common Files
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
CommonProgramW6432 = C:\Program Files\Common Files
This file has been truncated, but you can view the full file.
Build started 1/9/2017 4:32:10 PM.
Environment at start of build:
ALLUSERSPROFILE = C:\ProgramData
APPDATA = C:\Users\davkean\AppData\Roaming
BatchFile = build
BinariesDirectory = E:\project-system2\bin\Debug\
BuildConfiguration = Debug
CommonProgramFiles = C:\Program Files (x86)\Common Files
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
CommonProgramW6432 = C:\Program Files\Common Files
This file has been truncated, but you can view the full file.
Build started 8/25/2016 4:06:23 PM.
Environment at start of build:
ALLUSERSPROFILE = C:\ProgramData
APPDATA = C:\Users\davkean\AppData\Roaming
BatchFile = build
BinariesDirectory = D:\roslyn-project-system\bin\Debug\
BuildConfiguration = Debug
CommandPromptType = Native
CommonProgramFiles = C:\Program Files (x86)\Common Files
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
@davkean
davkean / project.xml
Created February 26, 2016 16:14
Converting Content -> AndroidAssert
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
...
<Import Project="..\SharedProject\SharedProject.projitems" Label="Shared" />
<ItemGroup>
<AndroidAsset Include="@(Content)" />
</ItemGroup>
...
</Project>
This file has been truncated, but you can view the full file.
Build started 11/19/2015 4:56:27 PM.
1>Project "d:\j\workspace\roslyn_prtest_win_dbg_unit32\BuildAndTest.proj" on node 1 (BuildAndTest target(s)).
1>Project "d:\j\workspace\roslyn_prtest_win_dbg_unit32\BuildAndTest.proj" (1) is building "d:\j\workspace\roslyn_prtest_win_dbg_unit32\Roslyn.sln" (2) on node 1 (Build target(s)).
2>ValidateSolutionConfiguration:
Building solution configuration "Debug|Mixed Platforms".
The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.Net.CoreRuntime.targets (68,11)" does not exist in the project, and will be ignored.
The target "_GeneratePrisForPortableLibraries" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.Net.CoreRuntime.targets (177,11)" does not exist in the project, and will be ignored.
The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)
@davkean
davkean / AssemblyLoadFile.md
Last active June 2, 2017 22:36
Why Assembly.LoadFile is not the right API to call

Assembly.LoadFile is almost always the wrong API to call inside an application. It says to the CLR “hands off, this assembly will live in its own little universe and don’t you apply any of your normal rules for loading assemblies”. Below you’ve effectively loaded two of these universes and one doesn’t see the other. LoadFile also forces you to hook onto AssemblyResolve (like you’ve done below[1]) and tell the CLR about every dependency that assembly needs to resolve. It also opts you out of other things such as binding redirects, retargeting (v1 portable won’t load below) and a few other things.

Assembly.LoadFile is used by designers, and should be called Assembly.LoadFile_ForDesignerUseOnly, it’s unfortunate it has such as tempting name.

If this is inside of VS, it is most definitely not the correct API to call. You want to use Assembly.Load, Assembly.LoadFrom and/or use VS related APIs for registering binding paths. It already has an assembly resolve, and no one else should be hooking onto it.

[1] That