Why am I getting this exception, even though I only have 1 OnUnzipHttpTriggered
defined?
I did a global search:
And it showed that indeed I had only 1 one of these classes defined:
What I have tried:
Why am I getting this exception?
Here's my VS info:
Have a look at the first result in your search. It states pretty clearly that DestinationFileNamer.cs
has the namespace AlidadeUtilities.OnUnzipHttpTriggered.Extensions
. That's where the problem is, because both the class and (part of) the namespace of that file are AlidadeUtilities.OnUnzipHttpTriggered
.
A class cannot have the same name as a namespace in the same namespace as where the class is.
By the way, just a tip: anything starting with On sounds a LOT like an event handler. Please reconsider the name.
EDIT:
The full name of the class you're creating is this:
AlidadeUtilities.OnUnzipHttpTriggered
The namespace of the class DestinationFileNamer
is this:
AlidadeUtilities.OnUnzipHttpTriggered.Extensions
Your problem is the fact that those two bold parts are the same.
Solution:
The solution would be to either rename the class OnUnzipHttpTriggered
or rename the namespace AlidadeUtilities.OnUnzipHttpTriggered**.Extensions
.