简体   繁体   中英

C# Costura.Fody - resources not embedded

Some years ago I used Costura.Fody and it worked after the installation via NuGet perfectly. Yesterday I tried it at home, and got first the error, that Fody is missing (I just installed Fody via NuGet). Then I was missing the FodyWeavers.xml, which I created as in another post mentioned. Afterwards it wokred fine for me, I just had to start debugging and the dll's would be included in the exe. Today I wanted to do the same at work, so I installed Costura.Fody, but this time Fody was installed with it as well. As a result I got two errors:

First: Could not find a weaver named 'PropertyChanged'

Second: FodyWeavers.xml is missing

I installed PropertyChanged.Fody and created the FodyWeavers File. Now I can run my application, but the dll's are not embedded.

A few years ago I used Win7 + VS Community 15

At home: Win 10 + VS 15

At work: Win7 + VS Community 15

Please help :(

EDIT

I tried soooooo many approaches but I coudln't make it work. I managed to find a blogpost which let's me embedded the dll's in the exe without 3rd party libraries. I can highly recommend to use this instead of Costura, because it seems several People online have now a Problem with this library

Link to my <3 http://adamthetech.com/2011/06/embed-dll-files-within-an-exe-c-sharp-winforms/

Best regards!

Probably you need to extract your application's starting point to new project, as fody cannot embedd resources located in your starting project. In other words, add new project that has no resources and start your app from there

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM