

- #VISUAL STUDIO FOR MAC NUGET CONSOLE HOW TO#
- #VISUAL STUDIO FOR MAC NUGET CONSOLE UPGRADE#
- #VISUAL STUDIO FOR MAC NUGET CONSOLE CODE#
CreateContainer() to convert a into a Gtk.Container class that can be inserted into a Gtk.Window. As we working with GTK, we call the extension method. To display the user interface for the Image Asset Browser, we use native embedding to convert our Xamarin.Forms UI into a conrol that can be used inside a GTK window. Next, it's time to create our user interface.Īs we are now using Xamarin.Forms, we can create our view in XAML and also create an accompanying view model. When the IDE opens, the Run() method of InitXamarinFormsCommand will be invoked and it will startup Xamarin.Forms! InitXamarinFormsCommand.cs public class InitXamarinFormsCommand : CommandHandlerĬonsole.WriteLine("Xamarin.Forms has been initialised") Īnd then in our we insert our InitXamarinFormsCommand into the /MonoDevelop/Ide/StartupHandlers extension point: We do this by creating a CommandHandler that invokes Forms.Init() within its Run() method like so: Once the package explorer has opened, search for and then add it.īefore we can show any user interfaces built using Xamarin.Forms, we need to startup Xamarin.Forms by calling Forms.Init(). In the solution explorer panel, locate your extensions project, open Dependencies and then double click on the NuGet item. You can find instructions to add the nightly builds feed here. At the time of writing, this is only available within the Xamarin.Forms nightly builds.
#VISUAL STUDIO FOR MAC NUGET CONSOLE CODE#
The best way to do this is to create a new extension project within the existing solution and then copy paste all the code files from the old project into the new project.Īfter you've set up your project, it's time to set up Xamarin.Forms inside our extension.įirstly, we need to add the nuget into our project.
#VISUAL STUDIO FOR MAC NUGET CONSOLE UPGRADE#
If you have an existing extension, you'll need to upgrade your main extensions project to an SDK style project and reference NuGet MonoDevelop.Addins v0.4.4. I've found that the Xamarin.Forms bootstrapping process does not work in Visual Studio Mac extensions that are not SDK style projects. Next, you'll need to create a new Visual Studio Mac extension that is an SDK style project and references the NuGet MonoDevelop.Addins v0.4.4. Based on my many, many failed attempts at getting this to work, AddinMaker v1.4.2 is the one that works. Using Xamarin.Forms Inside Visual Studio Macįirst things first, you must have version 1.4.2 of the Addin Maker installed into Visual Studio Mac.
#VISUAL STUDIO FOR MAC NUGET CONSOLE HOW TO#
So, read on to learn how to use Xamarin.Forms inside Visual Studio Mac to build rich user interfaces for your tooling.įull source code for this blog post can be found here.

To prove that this technique is valid for production-ready tooling and is not just a toy, we'll be building an image asset browser you can use to visually explore images inside a solution:
