Questions tagged [fody]

Extensible tool for weaving .net assemblies

Extensible tool for weaving .NET assemblies

Uses Mono.Cecil and an add-in based approach to modifying the IL of .net assemblies at compile time.

  • No install required to build
  • No attributes required
  • No references required
  • Supports .NET 3.5, .NET 4, .NET 4.5, Silverlight 3, Silverlight 4, Silverlight 5, Windows Phone 7 and .NET Metro on Windows 8, MonoTouch, MonoDroid, Mono
  • Supports client profile mode

Links:

181 questions
4
votes
4 answers

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

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 …
Matthias Meid
  • 12,455
  • 7
  • 45
  • 79
3
votes
1 answer

Is it possible to use an Attribute implementing a Fody weaver outside the project it is implemented?

I can't intercept method join points when using an Attribute implementing a Fody weaver on methods outside the project the Attribute has been implemented in. I have implemented a MethodDecorator.Fody weaver in a project but when I try to add the…
3
votes
0 answers

FODY - Duplicate type with name 'ProcessedByFody' in assembly

I haven't figured out the exact duplication steps but I'm frequently getting this at runtime. A full rebuild fixes things. An unhandled exception of type 'System.BadImageFormatException' occurred in Unknown Module. Additional information: Duplicate…
Derek
  • 7,615
  • 5
  • 33
  • 58
3
votes
2 answers

How to pass only some properties of an object in method parameters to Fody/MethodTimer Interceptor

I want to log the execution time for my methods by Fody/MethodTimer. I Cannot pass only some properties of my methods' parameters (which are a class type). My Method : [Time("'{obj.EventId}'")] private static void testFody(TestClass obj) { for…
Javad Norouzi
  • 327
  • 4
  • 11
3
votes
2 answers

F# Async Equivalent of Task.ContinueWith

I have been implementing a [] attribute for some of our larger .NET solutions that will allow configurable analytics to be easily added to any functions/methods that are considered important. I'm using Fody and the MethodBoundaryAspect to…
Aaron M. Eshbach
  • 6,380
  • 12
  • 22
3
votes
1 answer

C# Fody.PropertyChanged The "Fody.WeavingTask" task could not be initialized

I was using the Fody and Fody.PropertyChanged NuGet packages successfully in my solution until I was installing another package and saw there we're updates available to those previously mentioned packages. After updating, the following errors are…
JohnWick
  • 4,929
  • 9
  • 37
  • 74
3
votes
1 answer

Handling deps.json due to embedded assembly using Costura.Fody

I have a .NET Core console application that references a .NET Standard assembly. I've also added a NuGet package for Costura.Fody and a FodyWeavers.xml file (see below). This builds fine and everything seems great, but when I try to run my app…
Broots Waymb
  • 4,713
  • 3
  • 28
  • 51
3
votes
2 answers

How to use MethodDecorator.Fody Decorator in another project

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…
Tom
  • 175
  • 1
  • 14
3
votes
0 answers

Fody.Propertychanged preventing Edit and Continue when used with MVVMLight

I understand that using AOP tooling could/should interfere with edit and continue for a class that is weaved. But I have a case where simply using MVVMLight and Fody.PropertyChanged in the same project prevents edit and continue anywhere if there…
3
votes
1 answer

Mobile Center is Xamarin Build is failing with pthread_mutex_lock error

I'm building a Xamarin.Forms app into Xamarin.Android using Visual Studio App Center. The app builds fine in develop and release configurations on my machine, but when I try to build on Mobile Center, the build almost completes (i.e. the MSBuild…
3
votes
1 answer

Why Can i Not call OnPropertyChanged when using [ImplementPropertyChanged]

I am implementing a class using fody ImplementPropertyChanged: [ImplementPropertyChanged] public class Translator { public string this[string Text] { get { ... } } public void Invalidate() { …
Nathan
  • 7,099
  • 14
  • 61
  • 125
3
votes
1 answer

Create an Instruction for Type

Using Mono.Cecil, given this method private Instruction LoadOnStack(MetadataType type, object value) { switch (type) { case MetadataType.String: return _processor.Create(OpCodes.Ldstr, (string) value); case…
swestner
  • 1,881
  • 15
  • 19
3
votes
1 answer

Fody.stamp timeout configuration

We using Stamp.Fody package in some of our .NET projects and they sometimes intermittently fail Build with the following error: Fody: Failed to apply product version to Win32 resources in 1 second. Apparently 1 second is a default timeout and it…
Victor
  • 985
  • 2
  • 28
  • 53
3
votes
2 answers

Integrating Fody NotifyPropertyChanged in MvvmCross

What is the correct way of integrating Fody with MvvmCross? Do I need any special plumbing code or configuration to ensure that the correct RaisePropertyChanged in class MvxNotifyPropertyChanged is getting called?
Telemat
  • 398
  • 2
  • 14
3
votes
2 answers

How to force init of a module when there is no types used in main execution assembly?

ModuleInit.Fody NuGet package is used for IL-code injection to call ModuleInitializer.Initialize(). When there are no types used in main execution assembly, other referenced assembly is not initialized with ModuleInitializer. Only in case of some…
some_engineer
  • 1,844
  • 1
  • 19
  • 26
1 2
3
12 13