Cadet 1st Class Cadet 1st Class
Cadet 1st Class
20948 views

Error Performing ASP.NET Precompilation

Jump to solution

I'm running VS2012 trying to do a Static Code Analysis.  My code builds with 0 errors and 0 warnings however I receive the following error from Fortify: "Error performing ASP.NET Precompilation.  Would you like to continue? Analysis will not contain complete ASP results until ASP Compilation issues are resolved."  Any ideas or at least a point in the direction to start looking?

 

Thanks

Tags (2)
0 Likes
1 Solution

Accepted Solutions
Absent Member.. Absent Member..
Absent Member..

Hey Ryan,

When building a project in VS, only the .cs and .vb source files are compled.  SCA also requires that the .aspx files be compiled in order to perform the translation.  That's what the ASP.NET precompilation does.  Go ahead and run the scan from the command line so you can see the precompilation errors.

 

As an example:

First open the VS command prompt.

Run the following commands:

 

Clean - sourceanalyzer -b "Build ID" -clean

 

Translate/Build - sourceanalyzer -b "Build ID" -verbose -debug -logfile trans.log devenv Sample.sln /Rebuild Debug

 

You'll be able to see the aspnet_compiler errors with the last command.  Once you get the errors from the compiler, you can google the errors to find out how to fix them.  (the aspnet_compiler is a Microsoft product and should have plenty of information out there)

 

Hope this helps,

Alec

View solution in original post

0 Likes
5 Replies
Absent Member.. Absent Member..
Absent Member..

Hey Ryan,

When building a project in VS, only the .cs and .vb source files are compled.  SCA also requires that the .aspx files be compiled in order to perform the translation.  That's what the ASP.NET precompilation does.  Go ahead and run the scan from the command line so you can see the precompilation errors.

 

As an example:

First open the VS command prompt.

Run the following commands:

 

Clean - sourceanalyzer -b "Build ID" -clean

 

Translate/Build - sourceanalyzer -b "Build ID" -verbose -debug -logfile trans.log devenv Sample.sln /Rebuild Debug

 

You'll be able to see the aspnet_compiler errors with the last command.  Once you get the errors from the compiler, you can google the errors to find out how to fix them.  (the aspnet_compiler is a Microsoft product and should have plenty of information out there)

 

Hope this helps,

Alec

View solution in original post

0 Likes
Cadet 1st Class Cadet 1st Class
Cadet 1st Class
Thanks Alec. This got me pointed in the right direction. Greatly appreciated
0 Likes
Absent Member.
Absent Member.

Even I am having the same issue, I have tried the commands in command prompt but no use. Can anyone help me on this error.

C: \ User|\xx\xx\xx sourceanalyzer -b "Build ID" -verbose -debug -logfile trans.lo devenv xyz.sln /Rebuild Debug

Fortify Static Code Analyzer 6.31.0012

'devenv' is not recognized as an internal or external command,

operable program or batch file.

compiler execution failed (exit code: 1).

this is the error I am getting in command prompt.

 

 

Thanks in advance 

 

0 Likes
Admiral Admiral
Admiral

That error message indicates (as it states) that devenv is missing from the machine or the path.  Sounds as though Visual Studio is not installed on the machine.  Could that be the case?

0 Likes
Absent Member.
Absent Member.

Please directly goto the devenv.exe directry and execute it will show the actual error .

note : I have recived this error 'devenv' is not recognized as an internal or external command

step 1: first find the where Devenv.exe is there might be below path 

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe

step2 : open the VS command propt goto this path 

step 3 : execute below command after chnaging the log path and solution folder path and name .

the command should be like below 

sourceanalyzer -b "Build ID" -verbose -debug -logfile C:\Project\trans.log devenv C:\Project\IWMCAC\SourceCode_TFS\IWM-CAC_Main2017\2017\IWMCAC.sln /Rebuild Debug

let me know if it did not help !!!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.