installing F# Nuget packages on Xamarin for Mac OS X - xamarin

hi i am used to VS2015 when developing in F#.
I just bought a new iMAC and installed Xamarin fine as suggested
i would like to install the Nuget library called Spreads
it seems i failed to do it. don't know if its my poor handling of this issue or if that library is not available for MAC OS X (i installed it ok on my laptop running on Win8.1 and VS2015)
when i am in Xamarin Studio, if i click on Project,
i see the scrolling bar with "Update Nuget Packages" and "Restore Nuget Packages" but the button "Install Nuget Packages" is greyed and cannot be used.
is there a tutorial on how to install packages ?
bonus question:
where are the files of the solutions saved ?
thanks for your help

I was able to add a copy of Spreads to an F# console app, using the latest Alpha version of Xamarin Studio (6.x) and Mono (4.4). These versions introduce far greater support of F#
If you are attempting to add the package to a mobile project, such as iOS or Android, this will fail as Spreads does not offer a version that targets the mobile framework.
If you want to test version 6.x of Xamarin, I suggest upgrading to the Alpha channel via:
https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/
Thanks!

Try this :-
First open the solution pad by going through the View -> Pads -> Solution menu.
Solution pad menu
Next, right click on the "Packages" node that appears in your project
Package menu
The default location on disk for new projects is ~/Projects

Have you tried any of these actions?
Open the Solution pad and right click on packages. Select "Add Packages..."
Open the Solution pad and right click on the project. Select "Add -> Add Nuget Packages..."
Open the Solution pad and right click on the solution. Select "Manage packages..."
Xamarin article on Nuget support
Additionally, perhaps this extension would also help you?

Related

Xamarin iOS Release Build fails

I am using Xamarin iOS in Visual Studio 2017 for Windows!
Building and debugging the debug Version of my App via a build host works great. But when I try to build the Release Version it says:
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3463,5): error MSB6006: "sgen.exe" exited with code 1.
Signing Identities are installed and vislible in VS.
I also found this Blog post. But the workaround is only for Mac Users.
Does anyone know what's wrong here?
Thanks!
Have you configured your iOS release? if not this may be the solution.
In Visual Studio, open Solution Explorer (Keyboard: Ctrl + Alt + L).
Right-click your solution and then click Configuration Manager.
On the configuration manager dialog box open the active solution configuration drop-down menu and click New.
On the new solution configuration dialog box:
For Name, enter iOS Release
Open Copy settings from drop-down menu and select Release.
Clear the Create new project configurations dialog box.
Open the Active solution platform drop-down menu:
Select iPhoneSimulator and clear the check boxes on all rows except
your Xamarin.iOS project and any projects (for example, portable class libraries) it depends on.
Repeat this step for iPhone.

Manage NUGET Packages menu missing after update

I have recently updated the package manager (VSIX extension) for NUGET to version 3.5.
Afterwards I noticed the UI is missing:
Normally there is a 3rd menu item available
(right between console and settings menu items), which opens the dialog for searching, installing, updating and removing nuget packages.
I tried to uninstall/reinstall it, but had no luck.
Also looking in Google and on the NuGET site did not help me finding an answer.
Can someone help, please?
Maybe the option wasn't showing because the project was running?
Answer provided by Matt Ward, as taken from the comments:
"The Manage NuGet Packages for Solution menu is the third menu. That is only shown, if a solution is open in Visual Studio 2015. It is also available if you right click the solution in the Solution Explorer."
Another possibility why it is missing is because you haven't created a solution file and just opened the project. Create a solution file and then re-load the solution in Visual Studio (thank you DeveloperDan for this hint).
(Note: The NUGET update I did required a restart of Visual Studio, and when I opened the Tools / Nuget Manager Menu after the restart I did not notice that the solution was closed.)

Xamarin Forms intellisense working for some attributes only

I'm using Visual Studio 2015 Update 3 and Xamarin 4.2.1.62 (the latest stable). The issue I have is that when editing a Xamarin Forms file (.xaml), I don't get IntelliSense for all elements' attributes. For example, with StackLayout, I get suggestion for Orientation, but not for HorizontalOptions or BackgroundColor (although both are definitely valid attributes):
I've tried all the different suggestions from this question: Cannot get Xamarin Xaml Intellisense working in VS 2015, but no luck:
The suggested extension is no longer available.
I don't use ReSharper.
When I try to open the XAML file by right clicking -> Open with... and selecting XAML Designer, I get an error saying "The file cannot be opened with the selected editor. Please choose another editor."
Is there some way to get the IntelliSense working for all attributes? Or is this normal currently?
I have also faced the same issue recently, which I resolved following these steps:
Update to latest stable version of Xamarin from Tools>>Options>>Xamarin>>Other and check now, download and install latest update.
Right click on solution explorer and click on Manage NuGet Packages For solution. select all the projects which are in your solution and update the version of Xamarin.Forms in all projects.
Now go to your PCL project and add a single new XAML page, you can check that Intellisense will now work, but only on that page.
Now Close the solution and restart the system, re-open your project, and your problem shoudl now be solved.

Unable to select android emulator in Xamarin VS

I'm using Visual Studio Enterprise 2015 Edition (Update 3), with Xamarin 4.2 installed.
I have the emulators downloaded via Xamarin Android Player, however I don't have an option to select the emulators from Visual Studio (Refer attached image).
VS Select Emulator
There is no emulator dropdown next to debug button in toolbar, and VS always defaults to the first emulator, and doesn't let me choose one, even if there are multiple emulators available in XAP.
Any help is greatly appreciated.
Thanks!
After trying to figure out the problem for days, I was finally able to identify the real cause of the issue. I had to enable Standard toolbar in VS (Right-click on Toolbar, and select Standard. Refer Screenshot) to finally have the ability to select emulators.
I was under the assumption that the emulator list appears in Debug toolbar, and did not try checking the toolbar menu earlier.
Thanks for all the replies, and hope this helps someone else facing this issue.
This would appear to be this bug:
https://bugzilla.xamarin.com/show_bug.cgi?id=44487
If so, the issue occurs when selecting the startup project with the drop down list in the tool bar. Instead try selecting the start up project by right-clicking on the project on the Solution Explorer and choose "Set as startup project"
It seems you didn't select the startup project. In Solution Explorer right click on your Android project and choose "Set as StartUp Project". Then default emulator options should be visible and you can change it via drop down menu.
Anyway I recomend you to use Visual Studio emulator

MAC | Xamarin Studio | UiTest | File -> New and Build menu options are grayed out after opening existing project

Whenever I open an existing UiTest project in Xamarin Studio almost all of the menu options become grayed out (not clickable). And the only way to fix it, is to uninstall and reinstall Xamarin.
If I only create New projects, this problem doesnt happen. Has anyone experienced this? What can i do?
Maybe, that existing project was out-of-date and is not using the same format as your new Xamarin Studio. It could be that someone create that project along time ago, and you recently update your Xamarin Studio. Therefore, the format of that existing project is not quite compatible with the new Xamarin Studio.
I have seen some similar issues. For example, when I open my existing game project in Xamarin Studio Community, and select the button "Project" on the top menu bar, I can see that the button "Project Options" is gray out. I ask people at Xamarin and no one can explain why.

Resources