Xamarin 错误 : Framework not installed: . NETPortable,版本=v4.5

标签 xamarin xamarin-studio

我成功安装了 Xamarin 并创建了一个新项目。根本没有代码,我在引用下收到以下错误,并收到 Xamarin.Forms 丢失的错误。我尝试搜索,但在修复建议有效的地方没有看到同样的错误。谢谢。

错误:

Framework not installed: .NETPortable, Version=v4.5

系统设置:

Windows 7(内部版本 7601:Service Pack 1)

Xamarin Studio 5.1.4(内部版本 0)

Visual Studio 11.0.50727.1 RTMREL 旗舰版

.NET框架版本4.5.50709

尝试从 VisualStudio 启动项目时出现以下错误: enter image description here

所以我通过以管理员身份启动尝试了其他方法,并且输出如下:

Adding Xamarin.Forms...
Installing 'Xamarin.Forms 1.0.6186'.
Added file 'Xamarin.Forms.Build.Tasks.dll' to folder 'Xamarin.Forms.1.0.6186\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.targets' to folder 'Xamarin.Forms.1.0.6186\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.Core.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoAndroid10'.
Added file 'Xamarin.Forms.Core.xml' to folder 'Xamarin.Forms.1.0.6186\lib\MonoAndroid10'.
Added file 'Xamarin.Forms.Platform.Android.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoAndroid10'.
Added file 'Xamarin.Forms.Xaml.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoAndroid10'.
Added file 'Xamarin.Forms.Xaml.xml' to folder 'Xamarin.Forms.1.0.6186\lib\MonoAndroid10'.
Added file 'Xamarin.Forms.Core.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoTouch10'.
Added file 'Xamarin.Forms.Core.xml' to folder 'Xamarin.Forms.1.0.6186\lib\MonoTouch10'.
Added file 'Xamarin.Forms.Platform.iOS.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoTouch10'.
Added file 'Xamarin.Forms.Xaml.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoTouch10'.
Added file 'Xamarin.Forms.Xaml.xml' to folder 'Xamarin.Forms.1.0.6186\lib\MonoTouch10'.
Added file 'Xamarin.Forms.Core.dll' to folder 'Xamarin.Forms.1.0.6186\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.Core.xml' to folder 'Xamarin.Forms.1.0.6186\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.Xaml.dll' to folder 'Xamarin.Forms.1.0.6186\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.Xaml.xml' to folder 'Xamarin.Forms.1.0.6186\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.Core.dll' to folder 'Xamarin.Forms.1.0.6186\lib\WP80'.
Added file 'Xamarin.Forms.Core.xml' to folder 'Xamarin.Forms.1.0.6186\lib\WP80'.
Added file 'Xamarin.Forms.Platform.WP8.dll' to folder 'Xamarin.Forms.1.0.6186\lib\WP80'.
Added file 'Xamarin.Forms.Xaml.dll' to folder 'Xamarin.Forms.1.0.6186\lib\WP80'.
Added file 'Xamarin.Forms.Xaml.xml' to folder 'Xamarin.Forms.1.0.6186\lib\WP80'.
Added file 'Xamarin.Forms.1.0.6186.nupkg' to folder 'Xamarin.Forms.1.0.6186'.
Successfully installed 'Xamarin.Forms 1.0.6186'.
Adding 'Xamarin.Forms 1.0.6186' to Test.
Could not install package 'Xamarin.Forms 1.0.6186'. You are trying to install this package into a project that targets 'portable-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.

最佳答案

如果您没有安装 Visual Studio,以下步骤对我有用:

  1. 下载Portable Tools 2扩展并使用 /buildmachine 开关安装它:PortableLibraryTools.exe/buildmachine

  2. 下载 Portable Class Libraries v4.6并安装它。

  3. 复制 C 的内容(目录 v4.0v4.5v4.6):\Program Files (x86)\Microsoft .NET Portable Library Reference Assemblies 4.6C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable (覆盖任何现有文件)。 [为了安全起见,请备份原始文件!]

关于Xamarin 错误 : Framework not installed: . NETPortable,版本=v4.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25066108/

相关文章:

xml - Xamarin 工作室 : Rebuild project error with error : The "DebugType" parameter is not supported by the "XamlCTask" task

c# - 在 Xamarin.Forms 中创建默认短信应用程序

c# - Xamarin Android 中的 System.IO.IsolatedStorage

xamarin.ios - 这是 MonoTouch GC 中的错误吗?

c# - ImageGalleryControl 未触发

c# - 绑定(bind)项目找不到类型 Basetype 属性

c# - 如何重写 CustomButton 类中的 TouchUpInside 事件?

ios - 将图片存储在设备上

android - 类人机器人 Steema.TeeChart.TChart : how to disable user interaction

c# - Xamarin 加载操作失败