Rider fails to publish using valid .pubxml from VS 2022
I have several valid .pubxml files that I have used for months to publish from Visual Studio 2022. I recently started working in Rider 2023.1 and have faced this error when attempting to publish:
Microsoft.PackageDependencyResolution.targets(266, 5): [NETSDK1047] Assets file 'C:\Users\{redacted}\source\repos\{redacted}\{redacted}\obj\project.assets.json' doesn't have a target for 'net6.0/win-x64'. Ensure that restore has run and that you have included 'net6.0' in the TargetFrameworks for your project. You may also need to include 'win-x64' in your project's RuntimeIdentifiers.
The same occurs with .NET 7 projects. The suggested workaround of adding a runtime identifier to the .csproj fixes the issue:
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
However, it seems odd to me that VS has no problem publishing, while Rider fails. Is this an issue with Rider, or something else?
Please sign in to leave a comment.
Sure thing!