-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on build - dependency to Microsoft.Bcl.AsyncInterfaces #233
Comments
@folbrecht thanks for taking the time to report this. I haven't tried using Refitter with a MAUI project, but I'll try that myself over the weekend and see if I can reproduce it, and even better, see what could be wrong... As a workaround, have you tried using the Refitter CLI tool? |
@all-contributors please add @folbrecht for bugs |
I've put up a pull request to add @folbrecht! 🎉 |
@folbrecht I could easily reproduce your problem, but I haven't figured out why this happens with MAUI projects. One good thing is that Refit itself works fine with MAUI but the As a workaround, you can remove the My schedule is a bit packed these days leading up to the holidays. I'll eventually, and hopefully, figure out what's wrong when working with MAUI, and work on a fix for the problem. Until then, I apologize for the inconvenience and the delays |
Thank you for your efforts. Jan
ne 10. 12. 2023 v 23:39 odesílatel Christian Helle ***@***.***>
napsal:
… @folbrecht <https://github.com/folbrecht> I could easily reproduce your
problem, but I haven't figured out why this happens with MAUI projects.
One good thing is that Refit itself works fine with MAUI but the
Refitter.SourceGenerator package reference is causing the problems.
As a workaround, you can remove the Refitter.SourceGenerator package
reference and add the Refit package reference. Then you can keep the
generated file as it is or re-generate it using the Refitter CLI tool
My schedule is a bit packed these days leading up to the holidays. I'll
eventually, and hopefully, figure out what's wrong when working with MAUI,
and work on a fix for the problem. Until then, I apologize for the
inconvenience and the delays
—
Reply to this email directly, view it on GitHub
<#233 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCWLWNRU4FWQXLI57WV6RITYIY23XAVCNFSM6AAAAABALLPWJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGEYTAMJXGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I have run into exactly the same problem on compiling, but it seems not be MAUI related (or, at least, not exclusively), because my project was a Web API and the build error occurred when building a class library, which was the project the nuget package was added to. |
@manuel-fernandez-rodriguez Interesting... I primarily use this myself on Web API (Minimal API) projects. What version of .NET do you target and what version of Refitter do you use? I just put this little Minimal API project together to test it out: I could build and run it without any issues |
I have downloaded the zip, and the openapi definition for the PetStore was missing, so I downloaded it from https://petstore3.swagger.io/api/v3/openapi.json. The Refit interface was successfully generated, but I get exactly the same error that we have been mentioning from the start:
Surprisingly, if I build it from the command line:
So I have to presume the problem is not the code itself, but something related to Visual Studio or its interaction with the code generation. My Visual Studio version is:
And I have the following SDK and runtimes installed:
|
@manuel-fernandez-rodriguez Thanks for all the input! This will be very helpful. My excuse for not running into this - I spend most of my day in JetBrains Rider and the CLI 😞 I'll see what I can do |
@manuel-fernandez-rodriguez Good news is that I found the line of code that throws an exception. The bad news is that I don't understand why it does, and why it doesn't... For now, I think I'll add a try/catch around the deserialization code in the source generator project and just jump out if anything unexpected happens |
@all-contributors please add @manuel-fernandez-rodriguez for bugs |
I've put up a pull request to add @manuel-fernandez-rodriguez! 🎉 |
I released a preview version to NuGet <PackageReference Include="Refitter.SourceGenerator" Version="0.8.6.38-preview" /> It works for me in my Visual Studio setup. Can you also try it on your machines @manuel-fernandez-rodriguez @folbrecht ? |
@christianhelle Thank you SO much for the quick workaround. |
@folbrecht I tested the latest release preview on a new MAUI app and it seems to work fine. I'm closing this |
REFITTER000 System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Systém nemůže nalézt uvedený soubor.
I tried to install package Microsoft.Bcl.AsyncInterfaces, but it did not help. VS 2022, MAUI app project.
Thanks for help
The text was updated successfully, but these errors were encountered: