This procedure is an alternative to compiling your ASP.NET applications using Veracode Static for Visual Studio.
You can use the native Microsoft Publish utility in Visual Studio to prepare binaries for a specific project in the Visual Studio solution. To precompile and deploy ASP.NET files for uploading to Veracode, you can use this procedure with Visual Studio 2005 and later.
To complete this task:
- 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 <New Profile...>.
- 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.
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:
a. Clear Allow precompiled site to be updateable.
b. Select Emit debug information.
c. Select Do not merge. Create a separate assembly for each page and control.
Click Publish to generate the precompiled files.
You can now browse to the
bin directory in the published precompiled web files folder and upload them to Veracode.
As of ASP.NET Core 6.0, both views and applicaton types are included in a single AppName.dll assembly. See Microsoft changes here: Compiler no longer produces a Views assembly