Open criistii opened 3 years ago
Are you saying that because both of our namespaces start with Mvx it causes issues?
In the meantime perhaps you could add a using statement to redefine my namespace to something that doesn't conflict.
The problem is that it happens in classes where I am not using your namespace. Let me give you an example: Let's say in your demo project, the StartViewModel class, I need to call Mvx.IoCProvider. There is no "using Mvx.Forms. ..." in it, but I am adding a "using MvvmCross" in it. Normally "Mvx.IoCProvider" would be enough. But because of the namespace conflict I need to call "MvvmCross.Mvx.IoCProvider". I have the same issue in my project. To fix it I would need to change code in some way in 400+ files. Changing the namespace of the assembly and all classes in it would be a safer option since I imagine this will affect all of the users.
Would changing it to MvvmCross.Mvx.Forms.PageWrapper
work?
Just did a quick test: MvvmCross.Mvx.Forms.PageWrapper
would work. If I have this namespace in my app, there are no conflicts. As soon as I change it to Mvx.Forms.PageWrapper
I am getting the compile error mentioned above.
In short: YES, it will work. But please test that scenario on your side as well.
I am trying to integrate your nuget in my project to slowly move to Forms Pages.
I do however have an issue with the namespace "Mvx.Forms.PageWrapper" Once the nuget is added to the project, I am getting compilation errors anywhere I am calling
Mvx.IoCProvider.Resolve<IMyInterface>();
I know that I could do an explicit call like below, I think that a better long-term solution is to change the namespace to something that does not match a MvvmCross class. Perhaps "MvxForms.PageWrapper" ?
MvvmCross.Mvx.IoCProvider.Resolve<IMyInterface>();
In my case I would have to update 400+ files and I would rather avoid that.