C
C#2y ago
._frank

✅ Which dll do I need to load for Microsoft.AspNetCore.Builder WebApplication Class to be loaded?

Hi, I'm trying to get the .NET framework loaded without relying on Nuget. Which dll do I need to load using Assembly.Load in order for Microsoft.AspNetCore.Builder WebApplication to be available? I tried all dll's under /usr/lib/dotnet/shared/Microsoft.AspNetCore.App/6.0.13/ without any success. Microsoft.AspNetCore.Builder WebApplicationBuilder is found though OhNo
25 Replies
._frank
._frankOP2y ago
For anyone interested, the reason why I'm not using nuget is because I'm using C# and .NET 6 from https://github.com/clojure/clojure-clr (clojure-clr, a functional programming language that runs on the clr. The tooling is a bit meh but we can fix that!)
Anton
Anton2y ago
I think you need to load all packages from a metapackage you won't be able to fix the tooling for a general case all of .net ecosystem is tied to msbuild, to replicate that you'll need to replicate msbuild
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frankOP2y ago
I'm not using Nuget
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frankOP2y ago
ah
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frankOP2y ago
I expected the class to be available if I loaded everything from /usr/lib/dotnet/shared/Microsoft.AspNetCore.App/6.0.13/
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frankOP2y ago
ah
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Anton
Anton2y ago
you're not wrong, but it probably loads a dozen more besides that one
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frankOP2y ago
Ahh it's under /sdks
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frankOP2y ago
Sounds to me like it would be easier to make clojure-clr compatible with msbuild than to build some own tooling
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frankOP2y ago
😄 It's xml at least, it can be parsed
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frankOP2y ago
msbuild is open source right?
Anton
Anton2y ago
yes
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frankOP2y ago
Well, yeah the dll I need to load must be somewhere in /usr/share/dotnet/sdk/6.0.405/. Ur screenshots are helpful (I need to install Rider of Visual Studio for this digging :D) I've loaded all dll's under /usr/share/dotnet/shared/Microsoft.AspNetCore.App/6.0.13/ and it still can't be found, hmm. I was guessing that the above manifests were looking there. Current status, loaded all dll's under: /usr/share/dotnet/shared/Microsoft.AspNetCore.App/6.0.13/ Microsoft.AspNetCore.Builder WebApplication can still not load. Microsoft.AspNetCore.Builder WebApplicationBuilder works fine According to packs/Microsoft.AspNetCore.App.Ref/6.0.13/ref/net6.0/Microsoft.AspNetCore.xml the Microsoft.AspNetCore.dll should contain that the Microsoft.AspNetCore.Builder WebApplication class
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
._frank
._frankOP2y ago
@TeBeConsulting I resolved the issue. The issue all along was that I was calling: Assembly.LoadFile instead of Assembly.LoadFrom
Want results from more Discord servers?
Add your server