This procedure is an alternative to compiling your ASP.NET applications using the Veracode Visual Studio Extension.
- In the Visual Studio Solution Explorer, locate the web project you want to precompile.
- Right-click the project and select Publish.
- In the Profile page, click the dropdown profile menu and select
- Enter a profile name and click OK.
- In the Connection page, from the Publish method dropdown menu, select File System.
- Enter the filepath where you want to publish the precompiled web files, and click Next.
- In the Settings page, from the Configuration dropdown menu, select the appropriate build configuration.
- Expand the File Publish Options menu, and select all three items.Note: The first item, when selected, deletes all existing files from the location you chose above. This step makes it easier for you to find the most recent DLL to upload, however, as it does delete pre-existing files, be careful when deciding the publish location.
- Click the Configure link in the Precompile during
publishing list item.
- In the Advanced Precompile Settings popup:
- Deselect Allow precompiled site to be updateable.
- Select Emit debug information.
- Select Do not merge. Create a separate assembly for each page and control.
- Click OK.
- Click Publish to deploy the precompiled files.
You can now browse to the bin directory in the published precompiled web files folder and upload them to Veracode.
Automating the Precompilation of ASP.NET WebForms and MVC Views with MSBUILD
MSBuild scripts can automate the building of your Visual Studio solution and also interface with the Veracode Platform. You use the target folder built from the binaries to upload the .dll, .exe, and .pdb files to Veracode. You can resolve precompilation errors by looking up the errors in MSDN to prepare the application completely, including any MVC views if it is an MVC application.
For more information, read this procedure.