Cannot find Microsoft.CodeAnalysis.dll -- for some people in the same build system #55933
Replies: 5 comments
-
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Beta Was this translation helpful? Give feedback.
-
It seems part of the issue is when you build a .Net standard analyzer with .Net 50 and then try to run with |
Beta Was this translation helpful? Give feedback.
-
@nschuessler Analyzers should target .NET Standard. They cannot target .NET 5 (or .NET Core or .NET Framework) |
Beta Was this translation helpful? Give feedback.
-
I did target .Net standard, but there may be some dependency that got picked up that ties them to .Net 5 along the way. |
Beta Was this translation helpful? Give feedback.
-
It's expected to work with 3.9. So you may wait for someone from the compilers team to better assist then. |
Beta Was this translation helpful? Give feedback.
-
Version Used:
Roslyn 3.9, Visual Studio 16.9.6
Steps to Reproduce:
Expected Behavior:
Since we have Visual Studio 16.9 and Roslyn 3.9, it should find it right?
Actual Behavior:
We get the cannot find Microsoft.CodeAnalysis.dll error.
The strange this is that once it happens, it seems to always happen, even if you revert back to a previous version of the custom analyzer. So there seems to be a cache somewhere that remembers a bad state.
This does not seem to get fixed by:
dotnet --version
doesn't seem to be relevant, as the same version install can or cannot show the result (repros under dotnet 3.1.409)Q: How can I debug this?
Q: Are there other caches to clear?
Note: the custom analyzer package does not have Microsoft.CodeAnalysis.dll included in the nuget. The documentation seems to indicate they are to be excluded.
We cannot have customers use or analyzers if it randomly fails. Blocking issue.
Beta Was this translation helpful? Give feedback.
All reactions