w1ve
w1ve

Reputation: 31

JsonApiDotNetCore 5.0.1 Breaks with latest version of Visual Studio 2022 (Version 17.3.0)

We are developing a rich REST Api using the very nice JsonApiDotNetCore library (5.0.1). We have many dozens of APIs working just fine.

However, today I updated my VS 2022 to 17.3.0, and now when I try to run I get the error JsonApiDotNetCore.Errors.InvalidConfigurationException with the message "Multiple controllers found for resource type ...

Running the same source on a non-updated VS2022 works just fine.

Any clues out there?

Upvotes: 0

Views: 292

Answers (1)

w1ve
w1ve

Reputation: 31

Thanks to the JsonApiDotNetCore dev team, especially bkoelman, he responded with a bunch of info on the github Issue Tracker In our case, we needed to have a scaffold controller, due to requirements in our app for attributes supporting security. We were also using the [Resource] attribute on our controller scaffold. The Resource tag was generating the full controllers therefore our scaffold was producing the error. I guess this is a known bug in the .Net Core 6 SDK. The fix was to remove the [Resource] attribute.

Upvotes: 1

Related Questions