-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to resolve numerous CS8032 warnings #6395
Comments
These warnings mention Can you use a more recent version? |
@Youssef1313 That's strange because this project was only created a year or so ago. Either way, I don't see how to update it. As I indicated, it doesn't appear in the NuGet package manager, and all my NuGet packages are current. This is a black box to me. |
@SoftCircuits Is it possible for you to create a repro project? |
@Youssef1313 What would be needed for that? And can I ask how you would update this file? Are you expecting it to appear in the package manager? |
Just upload a project that has this warning. If your current project is closed source or can't be shared, try to reproduce the warning in a new project that you can share.
It depends on how you get the analyzer. If it's not an explicit/direct dependency, then you might have a dependency on something that brings Microsoft.CodeAnalysis.Analyzers 1.1.0.
|
@Youssef1313 Sorry, I was writing a response and lost power (big snowstorm here, on my phone now). I can try getting the project enough so that I could upload it. It will take me some time. I added the reference in my main project. It builds fine but still see the warning. (The warnings don't really seem related to the build process.) I searched my solution for other references to that package but found none. |
Great. It will help investigating this. Ping me when you get it ready. |
I think there might be some issue with Microsoft.CodeAnalysis.Analyzers. I was hitting this problem running v3.3.4. I downgraded to v3.3.3 and it went away. |
@adstep Can you please provide a repro or a binary log? |
@Youssef1313 what binary log are you looking for? |
@adstep Compile with Alternatively, you can upload a project that reproduces the issue. Note:
|
@Youssef1313 here's a link to our build logs. The problem occurs when the Microsoft.TestBase.Fabric.ExtendableEnums is using Microsoft.CodeAnalysis.Analyzers 3.3.4. Here's the warnings I'm seeing.
|
@adstep I suspect the root issue here is you have multiple projects in your solution referencing different versions of |
this was my case. The 3.3.3 was a transitive dependency from a different package. So I added 3.3.4 directly to this .net7.0 lib csproj and this warning went away. |
Thanks for the confirmation |
Disclaimer: I am new at this
Any guidance would be greatly appreciated. Thanks, Matt |
i had the very same issue when i was trying to write my own analyzer in a project that is also using avalonia. i figured out that this issue is only happening because avalonia is using a different version of the analyzer packages than i do... so i tried to reproduce this issue in an isolated project and it was pretty easy to reproduce. i created 2 analyzer project that are using a different package version of the analyzer packages and a project that is using both analyzers. however, i could not imagine that this use case was not thought of since this would be very common that a consumer uses analyzers of different version... so i thought usually you would not reference an analyzer by project... you would reference a package usually instead... so i packed both analyzers and referenced the packages and then the warnings disappeared. this issue is really annoying because it stops you from developing a own anaylzer in an environment it is thought to be used, because you arent always in control and in knowledge that you get other analyzers through other dependencies... (like i did with avalonia) if you are interested in the isolated example you can investigate it here |
you also have this transitive dependency issue. Microsoft.CodeAnalysis.CSharp.Workspaces depends on Microsoft.CodeAnalysis.Analyzers 3.3.3. Add 3.3.4 directly |
this really should not be needed... a package consumer wont always even know that any of his packages ships with an analyzer at all |
since this issue does not really happen if you install multiple analyzers via package references but if you install any vie project reference (like i tried to illustrate with my examples above) it seems that nuget itself would resolve the dependencies correctly and solve the version conflict. it seems that the project reference breaks version resolution chain when its used in a analyzer project as far as i experienced
but this wont
|
I am getting numerous CS8032 warnings with .NET 7 and don't seem to be able to solve them.
Steps To Reproduce
Rebuild All of my solution. Builds without any errors (or, initially, warnings). Then these warnings appear.
Expected behavior
No warnings.
Actual behavior
Warnings.
Additional context
I tried the following:
But the problem persists. I'm not familiar with exactly what the analyzers do. But I don't see anything that says analyzer in the list of installed NuGet packages. This project was working just fine at one point.
The text was updated successfully, but these errors were encountered: