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
2
votes
1 answer

Use Fody.EmptyConstructor on a separate project?

I have a solution with two projects Business and Domain I'm using Fody.EmptyConstructor to create parameterless constructors for my domain models on runtime. It works well when I add the Fody.EmptyConstructor package to the Domain project, but I'd…
DLO
  • 914
  • 1
  • 13
  • 30
2
votes
2 answers

How to reference a Fody MethodDecorator in another project?

I'm trying to use the Fody MethodDecorator to log method entry/exit in multiple projects. I've created a project in visual studio and implemented the IMethodDecorator interface as described in the ReadMe.md in the Fody MethodDecorator project. The…
FluffyBike
  • 825
  • 1
  • 4
  • 17
2
votes
2 answers

How to include grpc_csharp_ext.x86.dll with Fody/Costura?

Looking forward to this article and issue: 1) https://idmedia.no/general/including-sqlite-interop-dll-into-your-c-project/ 2) https://github.com/Fody/Fody/issues/673 Could not resolve an issue. Did anyone have a similar issue? Costura/Fody can not…
I.Step
  • 613
  • 6
  • 22
2
votes
0 answers

Can you include Fody in compilation generated with Roslyn?

I have some code which I want to compile at runtime. I use Roslyn to compile the code. In that code I add a Fody MethodDecorator attributes because I want to capture the object instance passed to the method. However, the attribute doesn't get…
Marin
  • 861
  • 1
  • 11
  • 27
2
votes
1 answer

Is there any way to "tell" IntelliSense and compiler that class implements the interface without actually implementing it?

I use Fody.PropertyChanged and Fody.Validar in my C# project to avoid writing boilerplate code. Let's presume I've got some class A: [AddINotifyPropertyChanged] [InjectValidation] public class A { } I have to use objects of type A in other parts of…
K. Voroncov
  • 189
  • 1
  • 11
2
votes
1 answer

Namespace cannot be found for installed package after building

I'm trying to use a method interceptor so I can run a method before certain marked methods in my Xamarin app. I installed Fody from the NuGet Package Manager, then downloaded MethodBoundaryAspect.Fody. When creating my method interceptor class, the…
jarrad_obrien
  • 391
  • 1
  • 4
  • 15
2
votes
1 answer

Unable to load embedded dependencies from the GAC

I made an HttpModule that I'm adding to the GAC and then registering it in my web.config. I used Fody Costura to embed dependencies. The output in my bin folder consists of only one dll, one .config and one .pdb (Because all the dependencies are…
Jorge Zuverza
  • 885
  • 8
  • 26
2
votes
2 answers

Need workaround for restriction of virtual, abstract static members for .NET implementation of Facebook Flux

I've looked at a number of Flux implementations in .NET, and think that this approach is pretty swell: It uses static members instead of enums, making XAML nicer No need to convert to/from enum types (cleaner code) Easy integration with almost any…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
2
votes
3 answers

How to decompress a Fody.Costura packed assembly

A friend of mine gave me the challenge to decompress an assembly that was packed with Fody.Costura. The assembly has a dll dependency that was embedded as a resource. I tried to extract this .zip resource with dotPeek and decompress it with this…
Christian Klemm
  • 1,455
  • 5
  • 28
  • 49
2
votes
1 answer

Pass parameters to the constructor in Method Decorator Fody

This is my code of the Attribute Class that extends IMethodDecorator Interface [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Field)] public class…
Vasudha Gupta
  • 171
  • 11
2
votes
3 answers

Renaming project → "Could not resolve this reference. Could not locate the assembly"

Everytime I build my solution I get the following warning: Warning Could not resolve this reference. Could not locate the assembly "WordAPI". Check to make sure the assembly exists on disk. If this reference is required by your code, you may…
Alexander Derck
  • 13,818
  • 5
  • 54
  • 76
2
votes
1 answer

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

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>…
Abel
  • 56,041
  • 24
  • 146
  • 247
2
votes
1 answer

Rewrite IL to inject try-finally around method call

I want to inject sql logging into a few methods. Basically I want to transform public static object IDbCommandTest_ExecuteScalar(IDbCommand command) { // .. do stuff command.CommandText = "SELECT ..."; var obj =…
Lukas Rieger
  • 676
  • 10
  • 31
2
votes
3 answers

Is it safe to use Fody.PropertyChanged with MVVMCross Or it is down the performance of app?

Today I read about new plugin on net which Fody.PropertyChanged which is very simple and easy to use. Currently I am using MVVMCross where we have to call RaisePropertyChange(()=>Property) again and again. Is it safe to use Fody.PropertyChanged…
Waqas Idrees
  • 1,443
  • 2
  • 17
  • 36
2
votes
1 answer

Anotar.Serilog and logging

I premit that I'm quite new to Anotar / Serilog, I've my WPF application that uses the Repository Pattern and I've the repo strucured as public class CalendarRepository : DefaultRepositoryBase, ICalendarRepository { public…
advapi
  • 3,661
  • 4
  • 38
  • 73