• Stars
    star
    154
  • Rank 242,095 (Top 5 %)
  • Language
    C#
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Roslyn based csc.exe and aspnet_compiler.exe replacement with metaprogramming hooks for ASP.NET MVC projects from the pre-DNX era

StackExchange.Precompilation

Build status

Replacing csc.exe

  • Install-Package StackExchange.Precompilation.Build -Pre

Replacing aspnet_compiler.exe for .cshtml precompilation

  • Install-Package StackExchange.Precompilation.Build -Pre
  • Add <PropertyGroup><SEPrecompilerIncludeRazor>true</SEPrecompilerIncludeRazor></PropertyGroup> to your .csproj file (usually replacing the MvcBuildViews property)

Using precompiled views

Using C# 7 in ASP.NET MVC 5

Meta-programming

  • Create a new project
  • Install-Package StackExchange.Precompilation -Pre
  • Implement the ICompileModule interface
  • Install-Package StackExchange.Precompilation.Build -Pre in the target project
  • Configure your new module in the target project's web.config or app.config

Development

if you have an existing project with StackExchange.Precompilation packages and encounter a bug you can simply:

  • pull this repo
  • increment semver.txt
  • make the fix in the source code
  • run BuildAndPack.ps1 (requires a console with VS env vars in your PATH, I recommend powershell with Posh-VsVars)
  • setup a nuget source pointing at .\packages\obj
  • after that you can update the packages StackExchange.Precompilation in your target project from the packages\obj source
  • this gives you local *-local{timestamp} suffixed packages instead of the *-alpha{build} ones produced by the CI build
  • PROTIP: if you want to attach an debugger to the compilation of your project or any of the Test.* projects, add a System.Diagnostics.Debugger.Launch() statement somewhere in the code ;)
  • CI *-alpha{build} packages are available on the stackoverflow myget feed https://www.myget.org/F/stackoverflow/api/v2

More Repositories

1

blackbox

Safely store secrets in Git/Mercurial/Subversion
Go
6,670
star
2

StackExchange.Redis

General purpose redis client
C#
5,889
star
3

dnscontrol

Infrastructure as code for DNS!
Go
3,043
star
4

NetGain

A high performance websocket server library powering Stack Overflow.
C#
933
star
5

Stacks

Stack Overflowโ€™s Design System
Less
610
star
6

wmi

WMI for Go
Go
433
star
7

pagedown

The Markdown editor and converter used on Stack Overflow and the other Stack Exchange sites
JavaScript
419
star
8

Stacks-Editor

Stack Overflow's Combination Rich Text / Markdown Editor
TypeScript
362
star
9

StackExchange.DataExplorer

Stack Exchange Data Explorer
JavaScript
353
star
10

MarkdownSharp

Open source C# implementation of Markdown processor, used by Stack Overflow.
C#
246
star
11

stack-blog

Stack Overflow Blog
HTML
238
star
12

StackExchange.Utils

Utility class packages used at Stack Exchange...but on NuGet!
C#
195
star
13

httpunit

httpUnit tests compliance of web and net servers with desired output.
Go
164
star
14

StackExchange.Metrics

A .NET client to send metrics to a variety of metrics backends
C#
136
star
15

Stacks-Icons

Authoring tools for Stack Overflow's shared icon set.
TypeScript
35
star
16

NRediSearch

C#
31
star
17

stackegg

The core game logic of Stack Overflow's April 1st 2015 game, StackEgg.
C#
30
star
18

mayflower

A simple MS SQL Server database migrator using Node.js and TDS.
JavaScript
26
star
19

StackID

An OpenID provider implemented for the Stack Exchange network, built on top of dotNetOpenAuth.
C#
20
star
20

stackexchange.github.com

Source for stackexchange.github.com
HTML
19
star
21

apca-check

Axe rules to check against APCA bronze and silver+ conformance levels.
TypeScript
18
star
22

unikong

Stack Overflow's April 1, 2016 game
JavaScript
16
star
23

haproxy-kubefigurator

Dynamic haproxy configuration for Kubernetes services
Go
14
star
24

RyuJIT-TailCallBug

Tail Call Parameter Corruption Repro for .Net 4.6
C#
12
star
25

signalfx-powershell

This is a PowerShell wrapper around the SignalFx API
PowerShell
10
star
26

mof

Package mof parses and marshals Managed Object Format (MOF) structures
Go
9
star
27

pat

A wrapper for "puppet agent --test"
Go
9
star
28

stackexchange-superfirewall

A facade for firewall::firewall{} that adds enhanced functionality.
Puppet
7
star
29

browserslist-viewer

Static site to parse and display a browserslist string
TypeScript
6
star
30

stacks-utils

A monorepo containing a collection of Stacks config files and other utilities
JavaScript
6
star
31

Stacks-TagHelpers

A set of .Net Core Tag Helpers for use with Stacks
C#
5
star
32

DesignSprint

This repository was used for building a Stack Overflow Talent exploratory design sprint.
HTML
2
star
33

terraform-provider-stackoverflow

Terraform Provider for Stack Overflow
Go
2
star
34

sre-log-1

1
star
35

marketing-resources

1
star