Skip to content

Instantly share code, notes, and snippets.

@srasch
srasch / dotnetlayout.md
Created September 13, 2019 08:28 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
FROM mcr.microsoft.com/dotnet/core/aspnet:2.1-stretch-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:2.1-stretch AS build
WORKDIR /src
COPY ["UI/UI.csproj", "UI/"]
COPY ["Models/Models.csproj", "Models/"]
RUN dotnet restore "UI/UI.csproj"
@srasch
srasch / Common.props
Created February 28, 2017 08:27 — forked from Antaris/Common.props
Flexible package management with MSBuild
<Project>
<!-- TARGET FRAMEWORKS -->
<ItemGroup Condition="'$(TargetFramework)'=='netstandard1.6'">
<PackageReference Include="NETStandard.Library" Version="1.6.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp1.1'">
<PackageReference Include="Microsoft.NETCore.App" Version="1.1.0" />
</ItemGroup>
<!-- /TARGET FRAMEWORKS -->
@srasch
srasch / OutToFile.cs
Created July 3, 2014 08:26
Redirect Console.Out to a file.
// Redirection Utility
// Author: Hai Vu (haivu2004 on Google mail)
// http://wuhrr.wordpress.com/2008/01/05/how-to-redirect-console-output-to-a-file-in-c/
using System;
using System.IO;
namespace RedirectIO
{
/// <summary>

Keybase proof

I hereby claim:

  • I am srasch on github.
  • I am srasch (https://keybase.io/srasch) on keybase.
  • I have a public key whose fingerprint is FA0A E91B 32DD E5FB 0A48 4836 D227 7A61 B141 535F

To claim this, I am signing this object: