Skip to content

Instantly share code, notes, and snippets.

View dsplaisted's full-sized avatar

Daniel Plaisted dsplaisted

View GitHub Profile
@dsplaisted
dsplaisted / Reference Assembly NuGet packages.md
Created April 11, 2017 22:37
Reference Assembly NuGet packages

Reference Assembly NuGet packages

Scenarios

  • Build a project which is multi-targeted to .NET Core or .NET Standard as well as .NET Framework on Mac OS or Linux using the .NET CLI
  • Build a project targeting Mono (which uses the same Target Framework Identifier as .NET Framework) using the .NET CLI

Design

  • There will be separate NuGet packages with reference assemblies for each version of .NET Framework. This means that projects targeting a single version of .NET Framework don't need to download and spend disk space on the reference assemblies and intellisense files for all the other possible versions of .NET Framework. It also means that when a new version of .NET Framework is released, the reference assemblies for the previous versions don't need to be re-shipped in an updated package along with the new assemblies.
@echo off
title SDK Build
set PATH=C:\git\dotnet-sdk\.dotnet_cli;%PATH%
set /P SDK_CLI_VERSION=<C:\git\dotnet-sdk\DotnetCLIVersion.txt
rem set DOTNET_MSBUILD_SDK_RESOLVER_SDKS_DIR=C:\git\dotnet-sdk\.dotnet_cli\sdk\%SDK_CLI_VERSION%\Sdks
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
@dsplaisted
dsplaisted / MSBuild.md
Last active November 26, 2023 15:52
NDC Oslo 2017 MSBuild presentation info
@dsplaisted
dsplaisted / Providing Binary Logs.md
Last active November 25, 2024 11:55
Providing Binary Logs

MSBuild Binary Logs

MSBuild has the ability to capture a detailed binary log file. If you are having a build issue and are able to provide a binary log, this will be very helpful for us to investigate the issue.

However, you should be aware of the type of information captured in the binary log to make sure you are not inadvertently sharing more than you intend. The binary log captures pretty much everything your build does, including the contents of your project files and any files (such as .props and .targets) that they import, all tasks that are run during the build as well as the input and output, as well as all environment variables. It generally won't include the contents of the source files that are compiled, but it will capture their full names and paths.

⚠ NOTE: some build environments make secrets available via environment variables. Before sharing a binary log, make sure it does not expose API tokens or other important secrets.

You can create a binary log by passing the /bl parameter to M