For projects based on package references in package files (PackageReference), the following flags setup is recommended:
...
For both package manager formats, please set the nuget.runPreStep to true if the project is not built prior to the scan.
For more information, see the Configuration File & Parameters page.