I have 5 to 6 projects. Project A and B use a same file via Linked File. Now, if I use this class in Razor I will get,
The call is ambiguous between the following methods or properties:
Because Razor views reference all the dlls in bin. It is referencing the same class from Project A and B. How to tell the Razor during compilation use Project A and not Project B?
You should not use Linked Files when including the assembly too. Why do you need the referenced class twice? There is no point in that.
You have to put that file in a separate project and reference that one in A, B and your MVC project. This makes you don't need the linked files any more.
Another way is to get the assembly and from this assembly, get the type using reflection and then call the method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With