Giter VIP home page Giter VIP logo

Comments (9)

citizenmatt avatar citizenmatt commented on September 18, 2024

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.

brianpelton avatar brianpelton commented on September 18, 2024

This bit me too, but luckily I found this issue that explained it.

from methoddecorator.

Steinblock avatar Steinblock commented on September 18, 2024

Mabye it would be helpful to change the message to Could not find type 'global::IMethodDecorator' or 'global::MethodDecoratorAttribute'

from methoddecorator.

azrael1111 avatar azrael1111 commented on September 18, 2024

Ok? But how do I solve this bug. I can not bulid my solution since I added it

from methoddecorator.

mgroves avatar mgroves commented on September 18, 2024

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.

azrael1111 avatar azrael1111 commented on September 18, 2024

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.

mgroves avatar mgroves commented on September 18, 2024

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.

azrael1111 avatar azrael1111 commented on September 18, 2024

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.

mgroves avatar mgroves commented on September 18, 2024

You need to create the IMethodDecorator interface yourself.

from methoddecorator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.