This project complements the MSBuild.SDK.SystemWeb SDK (based on the discussion and ideas in Add support for ASP.NET (non-Core) projects) by adding an SDK project type for Razor Libraries. This uses the RazorGenerator project to provide compile time support for MVC5 views with-in a library.
When using an MSBuild Project SDK obtained via NuGet (such as the SDKs in this repo) a specific version must be specified.
Either append the version to the package name:
<Project Sdk="MSBuild.SDK.SystemWeb.RazorLibrary/4.0.88">
...
Or omit the version from the SDK attribute and specify it in the version in global.json
, which can be useful to synchronise versions across multiple projects in a solution:
{
"msbuild-sdks": {
"MSBuild.SDK.SystemWeb.RazorLibrary" : "4.0.88"
}
}
You can also use the templates to easily create new projects.
For more information see