Visual Studio for Mac.NET. Azure DevOps. Failure installing Xamarin. Cannot download Oracle dependency. Reported by Curtis Hendrix Mar 05 at 02:34 PM windows 10.0.10240 visual studio 2017 version 15.5 Setup. During the installation of Xamarin, there is an Oracle download that fails. Dependency Inversion Dependency Injection. Dependency resolution is very useful for moving logic that would normally have to be in platform-specific code, into the shared platform code.
Active5 months ago
We have change the apple developer account password then automatic provisioning failed in visual studio for Mac.Can you please help me to resolve this issue?
Sumit Mishra
Sumit MishraSumit Mishra
1 Answer
- Try to remove the certification and apple developer account from your
keychain
andXcode
. - Download and install a new certification of your account.
- Add your apple developer account in your Xcode.
- Tra again in Visual Studio.
3,78011 gold badge22 silver badges1111 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Not the answer you're looking for? Browse other questions tagged xamarinxamarin.ios or ask your own question.
Active4 years, 11 months ago
I am building a mobile application using Xamarin Forms and taking advantage of MVVM through Xamarin Forms Labs plugin. I have my solution set up as follows:
- iOS project
- UI Portable Class Library project (Views/Xaml only)
- Core Portable Class Library project (ViewsModels/Models/everything else)
- Testing Class Library project
I have successfully added the testing project with a reference to both Xamarin Forms and Xamarin Forms Labs, and can run tests instantiating the ViewModels. However as I am using Xamarin Forms Dependency Service for cross platform functionality and I thought I could use it as well in the Testing library to inject dummy implementations for those platform specific calls. This way I could more fully test the View Models and everything else.
However in the following code:
There is an InvalidOperationException thrown from Xamarin.Forms.Core.dll with the following information: 'You MUST call Xamarin.Forms.Init(); prior to using it.'
But in the testing project 'Init' is not a member of Forms!
Visual Studio For Mac Download
I suppose I could use some other injection service on top of the one that already is in Xamarin Forms but I was hoping not to do that.
Anyone else tried to do this?
DanielDaniel32411 gold badge44 silver badges1212 bronze badges
1 Answer
You have to assign a class that implements IPlatformServices to Device.PlatformServices static property. Now, that is tricky because both IPlatformServices interface and Device.PlatformServices are internal. But it is doable.
Name your unittest assembly as 'Xamarin.Forms.Core.UnitTests' because internals are visible to assembly named like that (among few other names).
You can put images and clips in the Drop Zone. But at first you have added it to your project as an Asset. Dvd studio pro free download for mac.
Implement fake PlatformServices, i.e.:
Take note that I am not returning any assembly in GetAssembly block (there assemblies are analyzed for types that implements the interfaces). Feel free to return an array of assemblies you need.
Assign an instance of PlatformServicesMock to Device.PlatformServices:
That's a dirty solution but it should work nevertheless. Also note that Visual Studio would probably draw a lot of squiggle lines indicating errors (internal not visible) but would compile just fine.
HTH
Miha MarkicMiha Markic
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.