{"id":36924216,"url":"https://github.com/StackExchange/StackExchange.Precompilation","last_synced_at":"2026-01-28T10:00:57.981Z","repository":{"id":32246979,"uuid":"35821274","full_name":"StackExchange/StackExchange.Precompilation","owner":"StackExchange","description":"Roslyn based csc.exe and aspnet_compiler.exe replacement with metaprogramming hooks for ASP.NET MVC projects from the pre-DNX era","archived":false,"fork":false,"pushed_at":"2023-08-10T18:10:03.000Z","size":3235,"stargazers_count":157,"open_issues_count":8,"forks_count":39,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-11-27T14:29:21.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"prudhvitella/terraform-provider-infoblox","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StackExchange.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-05-18T14:02:17.000Z","updated_at":"2025-07-22T10:27:44.000Z","dependencies_parsed_at":"2022-08-17T20:50:20.879Z","dependency_job_id":"ebc2c8d4-04ed-485e-849c-3c9940c4de3e","html_url":"https://github.com/StackExchange/StackExchange.Precompilation","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/StackExchange/StackExchange.Precompilation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2FStackExchange.Precompilation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2FStackExchange.Precompilation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2FStackExchange.Precompilation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2FStackExchange.Precompilation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StackExchange","download_url":"https://codeload.github.com/StackExchange/StackExchange.Precompilation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2FStackExchange.Precompilation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-12T19:00:25.489Z","updated_at":"2026-01-28T10:00:57.973Z","avatar_url":"https://github.com/StackExchange.png","language":"C#","funding_links":[],"categories":["C# #"],"sub_categories":[],"readme":"StackExchange.Precompilation\n============================\n\n[![Build status](https://ci.appveyor.com/api/projects/status/lvt06wa9io6k64c3/branch/master?svg=true)](https://ci.appveyor.com/project/StackExchange/stackexchange-precompilation/branch/master)\n\nReplacing csc.exe\n-----------------\n\n- `Install-Package StackExchange.Precompilation.Build -Pre`\n\nReplacing aspnet_compiler.exe for .cshtml precompilation\n--------------------------------------------------------\n\n- `Install-Package StackExchange.Precompilation.Build -Pre`\n- Add `\u003cPropertyGroup\u003e\u003cSEPrecompilerIncludeRazor\u003etrue\u003c/SEPrecompilerIncludeRazor\u003e\u003c/PropertyGroup\u003e` to your .csproj file (usually replacing the `MvcBuildViews` property)\n\n#### Using precompiled views\n\n- [Add the PrecompiledViewEngine to ViewEngines](https://github.com/StackExchange/StackExchange.Precompilation/blob/fd536b764983e2674a4549b7be6f26e971190c1e/Test.WebApp/Global.asax.cs#L29)\n\n#### Using C# 7 in ASP.NET MVC 5\n\n- [Add the RoslynRazorViewEngine to ViewEngines](https://github.com/StackExchange/StackExchange.Precompilation/blob/fd536b764983e2674a4549b7be6f26e971190c1e/Test.WebApp/Global.asax.cs#L32)\n\nMeta-programming\n----------------\n\n- Create a new project \n- `Install-Package StackExchange.Precompilation -Pre`\n- Implement the ICompileModule interface\n- `Install-Package StackExchange.Precompilation.Build -Pre` in the target project\n- [Configure your new module](https://github.com/StackExchange/StackExchange.Precompilation/blob/fd536b764983e2674a4549b7be6f26e971190c1e/Test.ConsoleApp/App.config#L8) in the target project's web.config or app.config\n\n\nDevelopment\n-----------\n\nif you have an existing project with StackExchange.Precompilation packages and encounter a bug you can simply:\n\n- pull this repo\n- increment semver.txt\n- make the fix in the source code\n- run BuildAndPack.ps1 (requires a console with VS env vars in your PATH, I recommend powershell with Posh-VsVars)\n- setup a nuget source pointing at .\\packages\\obj\n- after that you can update the packages StackExchange.Precompilation in your target project from the packages\\obj source\n- this gives you local *-local{timestamp} suffixed packages instead of the *-alpha{build} ones produced by the CI build\n- 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 ;)\n- CI *-alpha{build} packages are available on the stackoverflow myget feed https://www.myget.org/F/stackoverflow/api/v2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStackExchange%2FStackExchange.Precompilation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStackExchange%2FStackExchange.Precompilation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStackExchange%2FStackExchange.Precompilation/lists"}