WatsonWebserver.Core.dll - System.Text.Json loading issue. #151
Replies: 7 comments 3 replies
-
Strange, this isn't happening for me using WatsonWebserverTest. Any additional steps to help reproduce? |
Beta Was this translation helpful? Give feedback.
-
Yep, strange issue, the steps to reproduce are this: Go to this project https://github.com/GitHubProUser67/MultiServer3 Dowload it via the download zip function, then press build.bat After this go to ~BuildOutput/Multiserver/Debug|Release and start the HTTPServer.exe |
Beta Was this translation helpful? Give feedback.
-
Just built it and didn't receive an error. |
Beta Was this translation helpful? Give feedback.
-
Yep, that's because there is no plugins. Ideally compile a plugin such as HomeWebTools and start the server. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I built from VS instead of running build.bat. Reporting back in a moment. |
Beta Was this translation helpful? Give feedback.
-
Yep, I see the exception. It looks like you're running into an issue caused by dependency loading from using things like I've had to deal with this in other projects, and to get around it, I've had to ensure that subordinate projects correctly packed dependencies in their output. Specifically, this in the .csproj file. e.g. if project A is dynamically loading project B, project B must have this in the .csproj file, specifically within the top-level property group, to ensure the right DLLs are packed:
I'm happy to chat with you to go through a very, very similar example to yours that caused me to go through this exact exercise and deal with this same problem. Please feel free to email me at joel dot christner at gmail dot com. However, since this isn't an issue with the library, I'll close this and move it to discussions. Cheers, Joel |
Beta Was this translation helpful? Give feedback.
-
Closed in GitHubProUser67/MultiServer3@3493666 Many thanks to you Joel! |
Beta Was this translation helpful? Give feedback.
-
Hello, with the last version of the nuget package, an issue started to happen, which is related to assembly loading.
This states that the assembly System.Text.Json is unable to be loaded.
I tried to copy it to the output directory, didn't help.
For some reasons this happens when loading it as a library alone, loading it within a server using the package makes this issue disapear.
So to sum it up:
HTTPServer -> Plugin -> WatsonWebserver.Core.dll -> Fails.
WatsonWebserver.Core.dll -> Costura.Fody -> HTTPSecureServer -> Plugin -> Success.
Beta Was this translation helpful? Give feedback.
All reactions