3
votes

I tried to find a solution to use Xamarin.Forms but the solution in other question don't work for Xamarin studio 5.9.6 (same as for version 5.9.7 build 22 after an update)

using System;

using Xamarin.Forms;

namespace test
{
    public class App : Application
    {
        public App ()
        {
            // The root page of your application
            MainPage = new ContentPage {
                Content = new StackLayout {
                    VerticalOptions = LayoutOptions.Center,
                    Children = {
                        new Label {
                            XAlign = TextAlignment.Center,
                            Text = "Welcome to Xamarin Forms!"
                        }
                    }
                }
            };
        }   

    }
}

The only available References when I tried to add that is Xamarin.Andoid.NUnitLite

I get the error cs0103

I just found how to add the package to the project , right click package in project solution and try add Xamarin.Forms but i have another error

enter image description here

And now the error is:

Adding Xamarin.Forms... Adding 'Xamarin.Forms 1.3.3.6323' to test. Could not install package 'Xamarin.Forms 1.3.3.6323'. You are trying to install this package into a project that targets 'portable-net45+dnxcore50+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

I tried to install the 4.6 Assembly with this link http://www.microsoft.com/en-us/download/details.aspx?id=40727

because it seems Xamarin.Forms needs the 4.6 one, some one can confirm that ?

but i don't know how to add that correctly to the directory: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework

If of course it is the solution, and try to repair the xamarian install to include that

Under OSX here is the working pcl profile78: enter image description here

Because of this same error:

Could not install package 'Xamarin.Forms 1.5.0.6447'. You are trying to install this package into a project that targets 'portable-net45+sl50+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Can some one tell witch Assembly contained in Xamarin.Forms 1.5.0.6447 ?

1
some solutions explained here but they are not working for me, the profile Profile78 give the same error: link-> lastexitcode.com/blog/2014/11/16/…HDJEMAI
Why aren't you just creating a new XF project from the File --> New Project menu option?Jason
i did that, I created the project with File new solution Blank Xamarin.Forms App, and I tried to add the Forms package to the app but it's not working for the reason I mentionedHDJEMAI
I installed xamarin under OSX and there is no problem with Xamarin Forms projectHDJEMAI

1 Answers

1
votes

Try removing the ASP.NET Core 5.0 reference or deleting the ASP.NET Core 5.0.xml file from the Profile78\SupportedFrameworks directory.

I had a similar error when making a new project.

Check this thread. https://bugzilla.xamarin.com/show_bug.cgi?id=34520