fody-costura

c#: How to embed exe file into resources?

那年仲夏 提交于 2020-08-02 12:28:33
问题 I use Costura.Fody. There is an app Test.exe which runs pocess internalTest.exe this way: ProcessStartInfo prcInfo = new ProcessStartInfo(strpath) { CreateNoWindow = false, UseShellExecute = true, Verb = "runas", WindowStyle = ProcessWindowStyle.Normal }; var p = Process.Start(prcInfo); Now I need to provide 2 exe files to user. Is it possible to embed internalTest.exe and then run it? 回答1: Copy the application to a folder within your solution called something like: Resources or

c#: How to embed exe file into resources?

て烟熏妆下的殇ゞ 提交于 2020-08-02 12:26:10
问题 I use Costura.Fody. There is an app Test.exe which runs pocess internalTest.exe this way: ProcessStartInfo prcInfo = new ProcessStartInfo(strpath) { CreateNoWindow = false, UseShellExecute = true, Verb = "runas", WindowStyle = ProcessWindowStyle.Normal }; var p = Process.Start(prcInfo); Now I need to provide 2 exe files to user. Is it possible to embed internalTest.exe and then run it? 回答1: Copy the application to a folder within your solution called something like: Resources or

How to disable Costura.Fody resources embedding in Debug mode?

冷暖自知 提交于 2019-12-21 04:00:52
问题 I'm using Costura.Fody to embed all dlls into my application assembly. Is there any way to disable Costura.Fody in Debug build mode? How to make Costura.Fody to work only in Release or custom build configuration? 回答1: One solution might be to check your .csproj file and add a condition to the Fody-related lines. Something like this: <Content Include="FodyWeavers.xml" Condition=" '$(Configuration)' == 'Release' " /> <Import Project="..\..\packages\Fody.1.29.4\build\dotnet\Fody.targets"

Fody and dynamic dependency update (AssemblyResolve event)

自闭症网瘾萝莉.ら 提交于 2019-12-13 07:17:31
问题 I'm writing an auto-update system, where WPF App loads its dependencies (dlls) dynamically. I'm using the AssemblyResolve event for that. Then I found Costura.Fody and saw that it simplifies things. However, Fody doesn't allow loading of an updated version of a dependency, for example if I have dll v1.0.0.0 embedded with Fody, but would have v2.0.0.0 loaded from the web server. Is there a hook in Fody for AssemblyResolve event so that I could then load whichever dependency I want, in stead of

.NET merge class library references

偶尔善良 提交于 2019-12-12 18:30:18
问题 I have a class library which contains WPF user control. This library has some dependencies but I want to deploy it as one assembly. As I know IlMerge has some problems with WPF. I tried Costura but it works only for applications, not for class libraries (as I have found out here). Is there any way to achieve my goal? 回答1: As one of the contributors to Costura I can now confirm that it works for libraries as well as applications. In fact all the unit tests for Costura are on a library, so it

using fody/costura in a project with cefsharp

核能气质少年 提交于 2019-12-11 17:08:01
问题 Currently I have a problem Failed to launch GPU process. while executing exe process where cefsharp is used. Here is what i observe: i take exe that is being produced with config file and copy it to a new folder starting executable creates a folder C:\Users\currentuser\AppData\Local\Temp\Costura\60B52F2D9303A2A6B945E41F3A43E7AC\32 with all files that are required by cefsharp The program throws an error Failed to launch GPU process. now, if I copy all files from Costura...\32 folder into the

The type initializer for '<Module>' threw an exception when try to embed Awesomium dlls

时光总嘲笑我的痴心妄想 提交于 2019-12-11 11:20:47
问题 I'm Trying to embed Awesomium into my project executable file. In the documentation of Awesomium, they said that set the target platform of your project to X86 . Is that mean there is only Unmanaged32Assemblies available? I add this line to FodyWeaver.xml file: <Costura Unmanaged32Assemblies='Awesomium.Core|Awesomium.Windows.Forms'/> But I got an exception that says: System.TypeInitializationException was unhandled Message: An unhandled exception of type 'System.TypeInitializationException'

Not able to get Costura.Fody to work, keeps asking for the DLL

蹲街弑〆低调 提交于 2019-12-10 10:16:41
问题 I have installed costura.fody into my project using nuget package. I have updated the FodyWeavers.xml file with: <Costura Unmanaged32Assemblies='dllname' Unmanaged64Assemblies='dllname' /> when I rebuild it and try to run the exe on seperate PC without the dll it doesnt work. Am I missing something ? Do I need to add anything else. I have also tried the following : <IncludeAssemblies> dllname </IncludeAssemblies> Thank you for the help in advance. 回答1: Make sure "Copy Local" is set to "True"

Cotura.Fody Not Working In JetBrains Rider EAP

时光总嘲笑我的痴心妄想 提交于 2019-12-08 06:36:09
问题 I'm working on a project, and it uses a few libraries (RestSharp, Newtonsoft.Json, CsQuery) and I didn't want to use the exe with all the dlls in the same directory, so I also installed Costura.Fody, and that worked when I used Visual Studio, but now I'm using JetBrains Rider EAP, and the output exe file does not include the embedded dlls/ If I move it, It crashes saying something like "Cant load CsQuery" etc. I'm running a 64 bit version of Windows 10, Visual Studio 2015 Community Update 3,

Not able to get Costura.Fody to work, keeps asking for the DLL

送分小仙女□ 提交于 2019-12-05 19:37:11
I have installed costura.fody into my project using nuget package. I have updated the FodyWeavers.xml file with: <Costura Unmanaged32Assemblies='dllname' Unmanaged64Assemblies='dllname' /> when I rebuild it and try to run the exe on seperate PC without the dll it doesnt work. Am I missing something ? Do I need to add anything else. I have also tried the following : <IncludeAssemblies> dllname </IncludeAssemblies> Thank you for the help in advance. Make sure "Copy Local" is set to "True" within the reference properties tab on your desired libraries. Costura will not embed anything that does not