Precompile ASP.NET Core MVC 2.0 Views with Visual Studio 2017

Compilation Guide

You can use the file Publish functionality in Visual Studio 2017 to produce a precompiled views DLL file.

About this task

You can precompile your application using the Visual Studio Publish feature in the following steps, or you can automate the precompilation using the MSBuild command-line tool.

The following procedure applies to precompiling an application using Visual Studio using ASP.NET Core MVC 2.0.

Procedure

  1. From the Solution Explorer, right-click the web application project file and select Publish....
  2. Verify the Configuration is set to Debug.
  3. From the Publish tab of your web application, create a folder, and click Publish.


    The output folder contains the application binaries in combination with the precompiled views.
  4. After precompiling the web application, zip the folder containing the published output, and upload it to the Veracode Platform by clicking Add in the Additional Files section.


  5. Scan the folder used for the precompilation file output.