Comments (9)
It was intentional, yes (and a readme would certainly help in this regard). The reason it was in the global namespace was to ensure that there could only be one attribute or interface to check for. If it can be allowed in any namespace, the it would need to work for any and all attributes/interfaces with the appropriate name. And then you'd also need to issue a warning or something if there is an interface or attribute with the same name but different signature. So, it was simpler to just insist there be only one marker type, in the global namespace.
That said, I'm not against changing this, but I think any patch would need to consider what happens if there is more than one marker type in the assembly.
from methoddecorator.
This bit me too, but luckily I found this issue that explained it.
from methoddecorator.
Mabye it would be helpful to change the message to Could not find type 'global::IMethodDecorator' or 'global::MethodDecoratorAttribute'
from methoddecorator.
Ok? But how do I solve this bug. I can not bulid my solution since I added it
from methoddecorator.
You just have to move it out of any namespace. For instance, instead of:
namespace MyProject {
public interface IMethodDecorator {
// ...
}
}
Do:
public interface IMethodDecorator {
// ...
}
namespace MyProject {
}
from methoddecorator.
That's the problem. I have not even used it. I just got it from nuget. tried to build it and faild misserably.
from methoddecorator.
Now I'm confused. Are you experiencing this issue or not? If so, just move the IMethodDecorator out of any namespace (into the global namespace). If you are seeing some other error, you should create a separate issue and describe that error there.
from methoddecorator.
I am expiriencing it while not even using it. I just added the package from nuget and get the error immediatelly without even using it at all. there is nothing to move to a different namespace and I still get the error.
At the same moment I added several other fody packages from nuget. It is a reocurring bug, with some of them as well. Without even using it I am getting the error. same with anotar
from methoddecorator.
You need to create the IMethodDecorator interface yourself.
from methoddecorator.
Related Issues (20)
- MethodDecorator attribute on method in interface should be cascaded to implementation. HOT 1
- Icon, package url are broken HOT 2
- Update to Fody 6
- Interceptor Attribute in Class Library not Triggered HOT 10
- Decide whether to rethrow exception HOT 2
- Ability to decorate all methods in project HOT 1
- Debugging decorated methods yields "Source Not Available" error. HOT 4
- OnExit is invoked before the end of the function happens. HOT 9
- How about `Attribute.GetCustomAttributes()` performance? HOT 3
- Ability to control throwing exception HOT 3
- Add an interceptor type that wraps the method execution HOT 2
- System.IO.FileLoadException on dotnet 5 HOT 1
- .NET Core support HOT 2
- Compatibility with new Fody HOT 8
- Can Fody be used for handling exceptions? HOT 4
- Build Error after adding MethodDecorator.Fody to the project HOT 1
- Constructor support of instance reference HOT 2
- Can't view static variables in debug mode HOT 1
- Async equivalents of OnEntry and OnExit HOT 2
- Flag to prevent rethrow #26 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from methoddecorator.