我成功安装了 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 启动项目时出现以下错误:
所以我通过以管理员身份启动尝试了其他方法,并且输出如下:
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,以下步骤对我有用:
下载Portable Tools 2扩展并使用
/buildmachine
开关安装它:PortableLibraryTools.exe/buildmachine
下载 Portable Class Libraries v4.6并安装它。
复制
C 的内容(目录
到v4.0
、v4.5
和v4.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/