“Cannot locate class…” Errors
Question
How do I resolve issues reported by the Fortify scan of the form:
“Cannot locate class… in the given search path and the Microsoft .NET Framework libraries.”
Answer
This error is typically caused by Fortify not being able to locate the DLLs containing those resources.
This issue may be resolved by setting the -libdirs
If working within the Visual Studio plugin this option may be added by:
- Select the Fortify->Options menu item
- Select “Project Settings”
- Select the “Enable Project Specific Settings” checkbox
- Click on the “Advanced Scan Options” Tab
- Select the “Use additional SCA arguments” checkbox
- Enter the
-libdirs <dirs>
option in the “Translate” text box
For example, see the sample options dialog below: