Skip to content

Commit 63620c4

Browse files
authored
Update compiled-languages-csharp.md
1 parent 8cd1c7f commit 63620c4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

troubleshooting/codeql-builds/compiled-languages-csharp.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,18 @@ For `Error ASPCONFIG: It is an error to use a section registered as allowDefinit
174174

175175
For `Error ASPCONFIG: Could not load type 'X.Y.Z'`, ensure that you do not have excluded `.cshtml`, `.ashx`, `.ashx.cs`, `.aspx` or `.aspx.cs` files on disk in existing `Views` folders or the Root folder of your project! You can show hidden files in your solution view to hunt these down and remove from these folders. MvcBuildViews does not observe the file include from the csproj when compiling the application. You may have to hunt these down one by one, so adding `<MvcBuildViews>true</MvcBuildViews>` to your local .csproj may help you get this done on your local machine with Visual Studio. The `Error List` view in Visual Studio will have a column that shows you the actual File name you need to delete.
176176

177-
To avoid building and scanning any view code in your project (potential false negatives in the scan as view engine code may not be evaluated for vulnerabilities) and to workaround the requirement that MvcBuildViews is automatically injected.
177+
To avoid building and scanning any view engine generated code in your project (potential false negatives in the scan as view engine code may not be evaluated for vulnerabilities) and to workaround the requirement that MvcBuildViews is automatically injected.
178178

179179
- If using GitHub Actions, plug in this step before `CodeQL-Init`: https://github.com/felickz/codeql-tracer-netframework?tab=readme-ov-file#codeql-tracer-netframework
180-
- Consider this [community contributed suggestion](https://github.com/github/codeql/issues/11890#issuecomment-1496970164) to modify the csproj to exclude building views:
180+
181+
```yml
182+
- name: Custom Lua Config Tracer for ASPNET MVC
183+
uses: felickz/codeql-tracer-netframework@main
184+
with:
185+
MvcBuildViews: false
186+
```
187+
188+
- Otherwise, consider this [community contributed suggestion](https://github.com/github/codeql/issues/11890#issuecomment-1496970164) to modify the csproj to exclude building views:
181189
182190
```powershell
183191
# tweaking the csproj file with powershell during the build so that the hard-coded target condition "gets fooled", basically. Something like this:

0 commit comments

Comments
 (0)