C
C#14mo ago
vamaiotu

❔ how to reference all dlls in separate folder such as "bin" or "lib"

self explanatory title
19 Replies
vamaiotu
vamaiotu14mo ago
visual studio 2022
ero
ero14mo ago
<Reference Include="lib/*.dll" /> i guess?
jcotton42
jcotton4214mo ago
are you consuming libraries that aren't available on nuget or something? @Yorki
vamaiotu
vamaiotu14mo ago
I used costura fody To bundle all DLLs into one so I only got one dll I got to reference @jcotton42
jcotton42
jcotton4214mo ago
is that not automatic? also, there's native stuff for this now
jcotton42
jcotton4214mo ago
!!! READ THIS !!! Package is in maintenance mode !!! READ THIS !!! In .NET Core 3 there are two new features: Single-file executables Assembly linking With these features included in the dotnet tool set, the value proposition of Costura is greatly diminished. Therefore we strongly recommend to try out the alternatives mentioned above.
https://github.com/Fody/Costura#-read-this--package-is-in-maintenance-mode--read-this-
GitHub
GitHub - Fody/Costura: Embed references as resources
Embed references as resources. Contribute to Fody/Costura development by creating an account on GitHub.
vamaiotu
vamaiotu14mo ago
tried the native stuff but it created a folder full of dlls
jcotton42
jcotton4214mo ago
did you publish or just build? $singlefile
MODiX
MODiX14mo ago
dotnet publish -c Release -r <runtime identifier> -p:PublishSingleFile=true Use of -r|--runtime implies --self-contained true. Add --self-contained false to publish as runtime-dependent. -r RID and -p:PublishSingleFile=true can be moved to .csproj as the following properties:
<RuntimeIdentifier>RID</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<RuntimeIdentifier>RID</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
but to target multiple RIDs, you have to use dotnet publish with the -r option for each RID. You can also add -p:IncludeNativeLibrariesForSelfExtract=true to include native libraries (like Common Language Runtime dlls) in the output executable. You might want to instead publish your application compiled Ahead Of Time to native code, see $nativeaot for examples. https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file https://docs.microsoft.com/en-us/dotnet/core/rid-catalog https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish
Create a single file for application deployment - .NET
Learn what single file application is and why you should consider using this application deployment model.
.NET Runtime Identifier (RID) catalog
Learn about the runtime identifier (RID) and how RIDs are used in .NET.
vamaiotu
vamaiotu14mo ago
build Yea it created a file with even more dlls
jcotton42
jcotton4214mo ago
that's why it only affects publish
vamaiotu
vamaiotu14mo ago
Oh I've never published How do you publish
jcotton42
jcotton4214mo ago
read the blurb that @MODiX spat out
vamaiotu
vamaiotu14mo ago
What are the differences between publish and release Either way how do I put them all in a bin file is my question
jcotton42
jcotton4214mo ago
release is a configuration you can build or publish in they're orthogonal
vamaiotu
vamaiotu14mo ago
like the dll
jcotton42
jcotton4214mo ago
that's what singlefile publish is for
vamaiotu
vamaiotu14mo ago
Oh ok
Accord
Accord14mo 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.
Want results from more Discord servers?
Add your server
More Posts
✅ ✅ Vararg P/Invoke (x86) throws BadImageFormatException (0x80131124 "Index not found")I am attempting to perform vararg P/Invokes following signatures I see on pinvoke.net and, e.g., htt✅ Attachment upload to Jira through a custom application using AJAX and ASP .NET Core 6 - Rest SharpSo I have this ajax snippet with which I send the files to my custom controller, using the IFormFile❔ I looking for Game Engine / Framework!Is there any cool Game Engine / Framework✅ Weird values on accessing Database using EF DbContext under throughput load testHello! I'm testing an ASP.NET application that uses an SQL Database. To access this database I defiProperties of IConfigurationSection.Get are null?I have a very simple test case set up using Microsoft.Extensions.Configuration and Microsoft.ExtensiHow do I pass data from my partial view to my main layout in ASP Core?I have this code in my partial view: ``` // Partial View Lesson.html @{ ViewData["LessonTitle"] ✅ [wpf] how to solve autometically closed new window when I create new window..In StickyNotesView.xaml , I create new Window but If I click '+' that new window not only undisplayePlugin attempts to load dependency again, despite it already being loaded?I have a .NET (.NET 7, for posterity) hosting from C++ situation. I followed the .NET hosting tutori❔ Pathing error issue in forms app, only on LinuxHey! So i have this issue currently which i've been somewhat mindboggled over , basically all this f❔ Setting up C# in VSCodeSo I'm trying to learn c# right now, but when I try to run a test program, it just throws an error: