Forum Visual Studio

Error CS0246: The type or namespace 'Application' could not be found

Hello,

I know this is a commun error, but even after reading previous post on this problem I can't fix it. Could you help me to solve it?

I just created a new solution called Phoneword with using portable class library according to the quickstart made by Xamarin:

When I open my csproj project

I see that Profile78 can be the pb.

But I can't find any profil in my reference Assenblie :

What did I miss?

Thx a lot

Posts

  • mattwardmattward GBMember Xamurai

    Your projects do not seem to have the Xamarin.Forms NuGet package installed which is why the build is failing.

    If you are using Xamarin Studio 5.9 then Xamarin.Forms version 1.3.3.6323 would be used by default. I would try adding the NuGet packages to the PhoneWord and PhoneWord.Droid projects. You can do this by double clicking the Packages folder, or right clicking the Packages folder and selecting Add Packages. Then to find the same version of Xamarin.Forms you can search for the following in the Add Packages dialog:

    Xamarin.Forms version:*
    

    Then select the NuGet package and click the Add Package button. You should do that for both the PhoneWord and PhoneWord.Droid projects.

    The PhoneWord.UITest project would need the NUnit and the Xamarin.UITest NuGet package installed.

  • Maxime.7854Maxime.7854 USMember

    Thx mattward for your reply, however I do have a pb to add xamarin.Form package in my phoneWord project.

    Package Console :

    Adding Xamarin.Forms...
    Adding 'Xamarin.Forms 1.3.3.6323' to Phoneword.
    Could not install package 'Xamarin.Forms 1.3.3.6323'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5,Profile=Profile78', 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.

    Xamarin.Forms package is well installed in Phoneword.Droid

  • mattwardmattward GBMember Xamurai

    It looks like you do not have the Portable Class Library profiles installed on Windows. There is information on how to do that in the Installing Portable Class Libraries for Xamarin Studio blog post.

  • Maxime.7854Maxime.7854 USMember
    edited November 2015

    Hello mattward,

    Thx a lot for your answer. Sry I couldn't respond earlier.

    I followed your link and now I have the profil78 :)

    I repaired xamarin as well but I still have the following error :/

    Adding Xamarin.Forms...
    Adding 'Xamarin.Forms 1.3.3.6323' to Phoneword.
    Could not install package 'Xamarin.Forms 1.3.3.6323'. You are trying to install this package into a project that targets > > '.NETFramework,Version=v4.5,Profile=Profile78', 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.

    Do you have any idea ?

    Again I really appreciate your help, and I really hope that I will fix this pb.

  • Maxime.7854Maxime.7854 USMember

    I can't Edit my post, but I just needed to recreate the project to make it work.

Sign In or Register to comment.