Martin Christiansen
Martin Christiansen

Reputation: 1117

VS2019: Can't add OpenAPI service reference to .NET Standard class library?

When I try to add an OpenAPI service reference (from a valid .json file) to my .Net Standard 2.0 class library, Visual Studio 2019 throws the following error message at me (message box): "Project needs to be restored before the service reference can be added". What does that mean? What is the problem?

Upvotes: 3

Views: 1308

Answers (1)

Julian Ney
Julian Ney

Reputation: 21

I had the same problem. Then I tried it with a .Net Core Library instead and it worked without a hitch. I think .Net Standard is the wrong library type.

Upvotes: 2

Related Questions