[BUG] Refit - Paket - VS 2022: Incompatible csproj changes
Describe the bug When using refit 6.3.2 together with the Paket package manager the following snippet is added to the csproj file in use:
<Analyzer Include="..\..\..\packages\refit\analyzers\dotnet\roslyn4.0\cs\InterfaceStubGeneratorV2.dll">
<Paket>True</Paket>
</Analyzer>
This worked obviously for Visual Studio 2019, but in 2022 we get
Error CS0101: The namespace "RefitInternalGenerated" already contains a definition for "PreserveAttribute". (9, 19)
and a lot of follow-up errors.
Steps To Reproduce
- Use Visual Studio 2022
- Create a new example solution + e.g. netcore project
- Install Paket according to https://fsprojects.github.io/Paket/get-started.html
- Add refit package to it
- Build solution
Expected behavior Compile works normally
Screenshots
Environment
- OS: Win 10 64bit
- Device: n/a
- Version: 6.3.2
- Working Version: n/a
Additional context We do not know if this is a bug with refit´s nuget package contents, or how Paket does extract that, but we start here to file a bug. feel free to explain why this is a bug at Paket´s side :)
I also have this same problem and cannot figure out how to resolve it. Only thing that worked is that I had VS2019 installed and managed to build the project with it. But on VS2022 or JetBrains Rider, it throws exceptions.
Ok, I figured out a temporary solution. I switched back to MSBuild v16 and building the project now works. I hope developers can resolve this problem. There is already a ticket for it (https://github.com/reactiveui/refit/issues/1387)
