fody

How to use MethodDecorator.Fody Decorator in another project

会有一股神秘感。 提交于 2020-04-30 05:41:46
问题 I used Fody Nuget package as follows Install package PM> Install-Package MethodDecorator.Fody Decorate the method public class BusinessLayerClass { [LogMethod] public string BusinessLayerMethod() { DataLayerClass dataLayerClass = new DataLayerClass(); return dataLayerClass.DataLayerMethod(); } } Write the interceptor using System; using System.Reflection; [module: LogMethod] // Attribute should be "registered" by adding as module or assembly custom attribute // Any attribute which provides

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"

MEF - Get assembly from embedded DLL

隐身守侯 提交于 2019-12-20 01:11:48
问题 I am using MEF to create "plugins" for my WPF application. Some of these plugins I want to embed directly into the EXE file as the EXE needs to be standalone. I am using Costura by Fody to embed the resource along with all my other references. As the exe file needs to be standalone I am unable to create a directory for these plugins and use the DirectoyCatalog Is there anyway I can either load the assembly from the embedded resource, or simply specify the assembly name such as: catalog

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

How to do I prevent NuGet asking about overwriting a file when restoring packages?

依然范特西╮ 提交于 2019-12-12 01:37:52
问题 We recently added Fody to some of our projects and locally this goes fine, but on the TeamCity build server, this causes problems, which I can replicate locally by running the following command in the Package Manager Console of VS2015: PM> Update-package -reinstall <snip ... /> Successfully uninstalled 'Fody 1.29.4' from Example.Project Package 'Fody.1.29.4' already exists in folder 'D:\Projects\Examples\MySolutions\packages' File Conflict File 'FodyWeavers.xml' already exists in project

NuGet Package Restore does not fetch Build Target Assemblies (Tools)

﹥>﹥吖頭↗ 提交于 2019-12-05 02:44:50
问题 I added Fody ProperyChanged to two projects in my solution. Package Restore is enabled on the solution. However, the TFS Build Service fails building with the following error: WindowsUI.csproj (443): The imported project "SolutionDir\Tools\Fody\Fody.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. The folder is indeed not there. I could check it into source control, obviously. However, should it not be populated by the NuGet

Fody is only supported on MSBuild 16 and above. Current version: 15

我是研究僧i 提交于 2019-12-03 14:25:57
问题 Visual Studio 2017 let me know there was an upgrade to Fody version 5 this morning. I accepted and did a NuGet package update of both Fody and PropertyChanged.Fody. Now, my project/solution will no longer build. The error is: "Fody is only supported on MSBuild 16 and above. Current version: 15." I tried uninstalling, shutting down VS, and reinstalling to no avail. 回答1: Please downgrade Fody to version 4.2.1. 回答2: Upgrade to Visual Studio 2019 https://visualstudio.microsoft.com/downloads/ 回答3:

Fody is only supported on MSBuild 16 and above. Current version: 15

我的未来我决定 提交于 2019-12-03 09:22:54
Visual Studio 2017 let me know there was an upgrade to Fody version 5 this morning. I accepted and did a NuGet package update of both Fody and PropertyChanged.Fody. Now, my project/solution will no longer build. The error is: "Fody is only supported on MSBuild 16 and above. Current version: 15." I tried uninstalling, shutting down VS, and reinstalling to no avail. Colonel Software Please downgrade Fody to version 4.2.1. Upgrade to Visual Studio 2019 https://visualstudio.microsoft.com/downloads/ For what it's worth - I ran into the same situation. A colleague added Fody with no other reason

“Fody not properly installed” error exception. (Xamarin.forms)

ε祈祈猫儿з 提交于 2019-12-02 16:26:46
问题 I'm making app with using Xamarin.forms. (PCL Project) Today, I added new three solution packages named SVG.Forms.Plugin.Abstractions, SVG.Forms.Plugin.iOS, SVG.Forms.Plugin.Android on workspace that downloaded from github. I have used realm for Xamarin. But After I added new packages, "Realms.RealmException has been thrown". Message is "Fody not properly installed. allbX.Baby is a RealmObject but has not been woven." Is it Fody's problem or Realm's or new packages'(SGV Control)? And could

MEF - Get assembly from embedded DLL

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 19:32:11
I am using MEF to create "plugins" for my WPF application. Some of these plugins I want to embed directly into the EXE file as the EXE needs to be standalone. I am using Costura by Fody to embed the resource along with all my other references. As the exe file needs to be standalone I am unable to create a directory for these plugins and use the DirectoyCatalog Is there anyway I can either load the assembly from the embedded resource, or simply specify the assembly name such as: catalog.Catalogs.Add(new AssemblyCatalog("My.Assembly.Name)); I have tried looping through the Manifest resources but