refit icon indicating copy to clipboard operation
refit copied to clipboard

Adding Refit Version 6.3.2 to MVC Application causes Error and Renders Application Unusable

Open QueenBee61 opened this issue 2 years ago • 9 comments

When I try to add Refit Version 6.3.2 I receive the following error on build:

Packages.config does not support Analyzers, including Source Generators. Migrate to PackageReference: 'https://devblogs.microsoft.com/nuget/migrate-packages-config-to-package-reference/'

It is not usable in MVC Applications? Is there a particular version I must use? I am able to install version 4.0, in the MVC application but then I can't use the SDK created with 6.3.2. I tried to create the SDK using 4.0 and receive the error "ApiResponse" does not exist.

QueenBee61 avatar Apr 28 '22 14:04 QueenBee61

Isn't this telling you what to do?

anaisbetts avatar Apr 28 '22 18:04 anaisbetts

It doesn't work. It tells me either the project is not using packages.config or is not eligible, or something on that order.

QueenBee61 avatar Apr 28 '22 18:04 QueenBee61

@QueenBee61 there are ways to force VisualStudio to think its eligible. You need to edit the .csproj file and change it to a class library then you can migrate it. I just did it. It was lots of work with a big repo, but doable. This StackOverflow article helped me https://stackoverflow.com/questions/57581514/vs-2015-to-2017-migrate-to-package-reference-failed

Stack Overflow
I've inherited a VS-2015 C# application and would like to migrate it to VS 2017 or 2019. It has a packages.config file with 4 packages: <package id="AjaxControlToolkit" version="...

jakeshoemaker avatar Jun 02 '22 13:06 jakeshoemaker

@jakeshoemaker - thanks!

QueenBee61 avatar Jun 02 '22 16:06 QueenBee61

What version of Refit do I need to downgrade to that will support packages.config? I can't afford to migrate a huge MVC project on full framework today.

jrummell avatar Jun 27 '22 20:06 jrummell