I have a referral conflict problem in the Google API.
In my API classes I always rename it as follows: SiteTeste.APIS.Google.<Servico>
, where service is, Gmail, Translate, Drive or whatever.
Google Translate I name it:
namespace SiteTeste.APIS.Google.Translate
The new API I'm using that's from GMAIL I've named:
namespace SiteTeste.APIS.Google.Gmail
The problem is in the Gmail API where I need to import some namespaces:
using Google.Apis.Auth.OAuth2;
using Google.Apis.Gmail.v1;
using Google.Apis.Gmail.v1.Data;
using Google.Apis.Services;
using Google.Apis.Util.Store;
If I call the following line in my code, the compiler says:
Google.Apis.Gmail.v1.Data.Message message = new Google.Apis.Gmail.v1.Data.Message();
Error CS0234 The type name or namespace "Apis" does not exist in the "SiteTest.APIS.Google" namespace
In other words, it is interpreting Google.Apis.Gmail.v1.Data.Message
from "SiteTest.APIS.Google", I could solve this by renaming my APIS namespace and remove Google, but I believe there is another way to resolve this conflict. If anyone can give me a try to solve this problem ...