Xamarin工作室5.9.7无法找到类型或名称空间名称'Xamarin'

问题描述:

我试图找到解决方案来使用Xamarin.Forms,但其他问题的解决方案不适用于Xamarin工作室5.9.6(与用于更新14-10-2015)之后的版本5.9.7构建22Xamarin工作室5.9.7无法找到类型或名称空间名称'Xamarin'

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!" 
         } 
        } 
       } 
      }; 
     } 

    } 
} 

唯一可用的参考,当我试图添加是Xamarin.Andoid.NUnitLite

我得到的错误cs0103

我刚刚发现如何将该包添加到项目中,右键单击包中的项目sol ution并尝试添加Xamarin.Forms但我还有一个错误

enter image description here

而现在的错误是:

添加Xamarin.Forms ... 添加 'Xamarin.Forms 1.3.3.6323' 测试。 无法安装包'Xamarin.Forms 1.3.3.6323'。您正尝试将此软件包安装到一个针对'portable-net45 + dnxcore50 + win + wp80 + MonoAndroid10 + xamarinios10 + MonoTouch10'的项目中,但该软件包不包含任何与该框架兼容的程序集引用或内容文件。有关更多信息,请联系软件包作者。

我想,因为它似乎Xamarin.Forms需要4.6之一,有人可以证实,这个链接 http://www.microsoft.com/en-us/download/details.aspx?id=40727

安装4.6大会?

,但我不知道如何正确添加到目录: C:\ Program Files文件(x86)的\参考大会\微软\框架

如果它当然是解决方案,并尝试修xamarian安装到包括

在OSX这里是工作PCL profile78: enter image description here

因为同样的错误的:

无法安装包'Xamarin.Forms 1.5.0.6447'。您正尝试将此程序包安装到一个项目中,该项目的目标是'portable-net45 + sl50 + win + wpa81 + wp80 + MonoAndroid10 + xamarinios10 + MonoTouch10',但该程序包不包含任何与该框架兼容的程序集引用或内容文件。有关更多信息,请联系软件包作者。

有人能告诉女巫Xamarin.Forms 1.5.0.6447包含的程序集吗?

+0

这里解释了一些解决方案,但它们不适用于我,配置文件Profile78给出了相同的错误:link-> http://lastexitcode.com/blog/2014/11/16/InstallingPortableClassLibrariesForXamarinStudio/ – HDJEMAI

+0

https://论坛。xamarin.com/discussion/48563/could-not-install-package-xamarin-forms-1-3-3-6323 – HDJEMAI

+0

为什么不是从文件 - >新建项目菜单选项创建一个新的XF项目? – Jason

尝试从Profile78 \ SupportedFrameworks目录中删除ASP.NET Core 5.0参考或删除ASP.NET Core 5.0.xml文件。

我在制作新项目时遇到了类似的错误。

检查此主题。 https://bugzilla.xamarin.com/show_bug.cgi?id=34520