essencebit / SignalRSwaggerGen

MIT License
70 stars 8 forks source link

Exception thrown on first request to WebAPI project when not using "Just my code" #46

Closed exedor closed 5 months ago

exedor commented 6 months ago

First request to webapi project produces 2 exceptions that are virtually the same:

System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly 'SignalRSwaggerGen.XmlSerializers, Version=4.5.0.0, Culture=neutral, PublicKeyToken=57a441116a7c7fc1, processorArchitecture=MSIL'. The system cannot find the file specified. Source= StackTrace:

There are many threads about this same kind of thing on stackexchange and also at this ms github project site: [https://github.com/dotnet/runtime/issues/83152](url) Should this have an XmlSerializers generated dll for the project?
Dorin-Mocan commented 6 months ago

@exedor hi! Could you please add some more details? What do you mean by “just my code”?

exedor commented 6 months ago

https://github.com/essencebit/SignalRSwaggerGen/issues/46#issuecomment-2145126052 https://learn.microsoft.com/en-us/visualstudio/debugger/just-my-code?view=vs-2022

It's possible that it's a MS thing and nothing can be done in this project or mine to really make it "clean."

Dorin-Mocan commented 5 months ago

@exedor The package doesn't contain any SignalRSwaggerGen.XmlSerializers assembly. It must be your custom assembly or another Nuget package. Please double-check your solution.

exedor commented 5 months ago

I don't know enough about what causes it, but as far as I can tell, it seems to be part of the package and related to how that package gets built. That is me reading between the lines a bit, but it's an MS default behavior thing, I don't know which of our packages needs to change to get it to stop looking for that, or to have the package simply generate/include it. I just wanted to make you aware that this is one of the few packages used in my project where that happens.

Dorin-Mocan commented 5 months ago

@exedor thanks for letting me know.