Costura | Embed references as resources
kandi X-RAY | Costura Summary
kandi X-RAY | Costura Summary
Add to FodyWeavers.xml.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Costura
Costura Key Features
Costura Examples and Code Snippets
Community Discussions
Trending Discussions on Costura
QUESTION
I want to release my WPF app just in an .exe file. I have 3 dll's from the WebView2 nuget package.
...ANSWER
Answered 2022-Mar-02 at 05:27What version of .NET are you targeting? This will be easiest if you're on .NET 5+ (ideally 6).
This page documents how to publish a .NET application as a single file, with instructions for the dotnet
CLI and Visual Studio. I believe you will need to follow the instructions under "Including native libraries" and set the IncludeNativeLibrariesForSelfExtract
MSBuild property to true, as both WPF and the WebView2 bindings use a native DLL.
QUESTION
I try to embed the dll of a class library into my exe. I use visual studio 2019 and .net 5. I created two projects in one solution one is class library (dll), and the second is console application both targeted for .net core 5. I selected the console application as startup project. the class library contain only public static hello function which print out hello. I referenced the project of the class library into the console application then in the console application i only called the ClassNamespace.library.hello function. when I compile it, it workes fine. then I installed costura.fody as described in their readme, i added the to the console project by:
...ANSWER
Answered 2021-Jul-24 at 09:40This can be accomplished without any additional package. Since NET 5 you have to set two options.
QUESTION
I would like to get a Single .EXE File so I'm using Costura.Fody
.
After adding its NuGet package all of the DLLs are embeded to the .EXE file as expected. The problem is that I get all of those .xml files:
PS1: I'm using .NET Framework 4.6.1 (not able to use newer releases becouse of some of the DLLs).
PS2: Are those files required? Maybe I can delete them straight away...
...ANSWER
Answered 2022-Jan-11 at 11:24This is the default and sometimes frustrating behavior of costura.fody
.
If you notice, all of the following assemblies have their build option:
- Generate Xml Documentation set to true
costura.fody
takes those dlls and generates xml documentations that are oversizing your folder.
The solution is to exclude those files, look it up at the costura.fody
github channel.
QUESTION
Im trying to make newlines in the body of the SMTPJS
...ANSWER
Answered 2021-Jan-13 at 15:52We could try with HTML with the br tag (this is what it works in the OP):
QUESTION
I am trying to code a section in HTML where you click a div it will expand its contents and other divs will toggle/hide. This is what I have and it is working perfectly:
If I click in the Personaliza
title it will expand its contents and toggle/hide the other two titles.
Check the website in the third section: https://uniformaguatemalapruebas.herokuapp.com/
I am trying to add an icon -
when the div is selected or expanded and the other two will show +
icon. And If I click any title it will show +
others will show -
. If none are expanded they all will show +
.
My issue is very simple but I am struggling at this.
This is what I have so far:
...ANSWER
Answered 2021-Feb-05 at 03:13maybe you can try this
QUESTION
I'm working on a bilingual site (spanish/english), I took the advice from the 2nd answer in this post.
This is the bit of code in the navbar that I use to pick a language:
...ANSWER
Answered 2020-Oct-29 at 08:18Method 1:
You can use Jquery Cookie to persist the language values.
QUESTION
We have a desktop Windows app (written in WFP/C#) that we distribute as a single .exe file with no installer (it bundles all its dependencies via a Fody/Costura plugin).
We would like to integrate a local Action Center toast functionality where the app can display a toast and respond to it when it's clicked.
Displaying the toast is straightforward and can be done by using the Microsoft.Toolkit.Uwp.Notifications nuget package. However, in order to actually receive proper notifications when the toast is clicked in the Action Center (as opposed to the balloon tip) we need to register with notification platform.
The guide on how to do this seems to be focused on apps with an installer (e.g. Wix): https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop?fbclid=IwAR2AoHRKI88VNGRG-pTUytwhkMuovWT4bEr0RoXEayWpWsoGlghtZeq4Mo4#step-4-register-with-notification-platform
The specific task we're trying to achieve is, from the documentation:
If you're using classic Win32 (or if you support both), you have to declare your Application User Model ID (AUMID) and toast activator CLSID (the GUID from step #3) on your app's shortcut in Start.
How can we do it without writing an installer? We would like our app to do this registration on first run.
Note: the app already has provisions for elevating itself through UAC if needed by restarting itself in Administrator context.
Additional references: WPF native windows 10 toasts
[Update]
I managed to follow the instructions in https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop and https://docs.microsoft.com/en-us/windows/win32/shell/enable-desktop-toast-with-appusermodelid to put together what should have been a working solution, but in the end, clicking on toasts in the Action Center does not trigger OnActivated() in my NotificationActivatior.
Salient points:
Sending notification
...
ANSWER
Answered 2020-Jun-26 at 13:53I have the same problem with my project now.
Managed to find this repository - https://github.com/felixrieseberg/electron-windows-interactive-notifications
Here's C++ implementation for installing shortcut (InteractiveNotifications file, InstallShortcut method). I guess the problem is how we set the value to PropertyStore, string GUID is not suitable for some reason. Still, I wasn't able to solve the problem for now.
UPDATED: Finally, was able to install shortcut from code! Check my example at Github. https://github.com/romayavorskyi/WpfNotificationTest (still a lot of hardcode, but it should give you the general idea). And you were right, shortcut path matters. It seems shortcut should be in the ProgramData folder for correct work.
QUESTION
I have a class library project that is referencing .Net Framework 4.7.2 . I need to create an exe which will contain all the references of the project. I will not have access to any code or project references on the VM, where this exe needs to be run. Everything should be included in this one exe.
I have come across this question on SO.
Are solutions such as costura.Fody
and ILMerge
mentioned in that question addresses the same issue that I have?
( I am new to .Net and C#) and I was in doubt because I am not sure of managed assemblies vs. any other as mentioned in one of the answer in question that I referenced
Can someone help in clearing this or suggesting any other solution, if there is any.
...ANSWER
Answered 2020-May-12 at 17:44Costura.fody worked pretty much out of the box for .net 4.7.2 framework. When executable was compiled it included everything. One way to know is that the size of your executable will increase . The other way is to use tool like ILSpy to look inside executable
QUESTION
My WPF program is using Entity Framewok Core 3.1.1 (code-first) with a SQLite database. If the database file does not exist on startup, the program calls context.Database.Migrate()
to create one. Works great.
When I added Costura.Fody (using NuGet), that huge collection of DLLs disappeared and the program still works - until it needs to create a new database file. Then the Migrate()
function fails with an error:
The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception - The path is not of a legal form.
I have a similar issue if I try to use the Package Manager Console to add a migration manually - I get
Your startup project doesn't reference Microsoft.EntityFrameworkCore.Design
Removing the Fody Costura package causes everything to start working again. I haven't found anything on SO or elsewhere that references this issue, and Fody seems to be very popular, so I must be doing something dumb, but I don't know where to look.
Does anyone know how to get Fody Costura and EF Core migrations to coexist?
Many thanks.
...ANSWER
Answered 2020-Apr-24 at 23:02Thanks to Tronald for putting me on the right track. For anyone else who comes across this, for me the trick was to exclude all the SQLitePCLRaw DLLs like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Costura
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page