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
._frank2y 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
._frank2y ago
I'm not using Nuget
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frank2y ago
ah
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frank2y 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
._frank2y 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
._frank2y ago
Ahh it's under /sdks
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
._frank
._frank2y 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
._frank2y 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
._frank2y 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
._frank2y 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
._frank2y 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
More Posts
❔ load .dds to BitmapImageHi, I am working on a small WPF application for a game. The game's icons are stored as `.dds` files✅ Not able to locate web api controllers in a class libraryHello, I'm having some issues with trying to load web api controllers from a class library. I did t❔ [System.Text.Json] When to close the streamI have a very large json file (500 mb or more), so naturally i would use ``System.Text.Json`` in co✅ ClientWebSocket concurrency questionHello. Can `ReceiveAsync` and `CloseAsync` methods be used concurrently? And also the same for `Send❔ "Net.Core SDK cant be located"I dont understand what to do , i pressed get the sdk and downloaded it but it dosent matter the erro❔ which is the key for write a good code? my 1st exercise of advent of calendarProblem: https://adventofcode.com/2015/day/1 My code: ```cs namespace AOC_2015_1 { internal cla✅ Modify/prepend method implementation on buildHey I was wondering if it is possible to modify a methods implementation. My first guess were source❔ I just created a Assembly issue post in Stackoverflow all help are welcomehttps://stackoverflow.com/questions/75135984/what-else-can-i-do-when-the-project-could-not-load-file❔ How to remove 00:00 in datetime?I have following datetime: `"{Value:dd.MM.yy HH:mm}" `which returns this: `01.01.2001 00:00` is it p✅ ive got a few compile errors and I cant seem to be able to fix itI was doing a tutorial and no matter how much I try I just cant seem to fix it so if you guys can he