Commit 3091787
authored
chore: Add msbuild diagnostic logging (#74)
This PR adds logging msbuild workspace diagnostics after the index
operation finishes. This is important to figure out why a index command
may not have found all the proper files. MSBuild logs diagnostics in two
levels Failure and Warning.
When MSBuild reports a Failure I am logging these as an Error since
these will block indexing of that project. For example
```
fail: Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace[0] Failure: Msbuild failed when processing the file '/Users/mmanela/dev/me/diffplex/DiffPlex.App/DiffPlex.App.csproj' with message: /usr/local/share/dotnet/sdk/8.0.307/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets: (90, 5): To build a project targeting Windows on this operating system, set the EnableWindowsTargeting property to true. (occurred 1 times)
```
However, when MSBuild reports a warning, I am logging at the debug level
since these are noisier and don't often relate to issues that are
blocking indexing. For example
```
dbug: Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace[0] Warning: Found project reference without a matching metadata reference: /Users/mmanela/dev/me/diffplex/DiffPlex/DiffPlex.csproj (occurred 9 times)
```1 parent 3caa711 commit 3091787
1 file changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
52 | 80 | | |
53 | 81 | | |
54 | 82 | | |
| |||
0 commit comments