Bamboo 无法找到与目标框架名字对应的框架?
Bamboo unable to find framework corresponding to the target framework moniker?
我正在尝试实施 Bamboo 以使用 Xbuild 创建 IPA 文件或 APK 文件,但我收到 1 个警告和 1 个错误:
警告如下:
/usr/local/Cellar/mono/4.6.2.7/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: warning : Unable to find framework corresponding to the target framework moniker '.NETPortable,Version=v4.5,Profile=Profile78'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.
错误是这样的:
/usr/local/Cellar/mono/4.6.2.7/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : PCL Reference Assemblies not installed.
我不确定为什么会这样,因为当我在 Xamarin studio 中打开项目并构建它时,它会成功,而当我 运行 它时,应用程序功能齐全,没有任何问题。我已经在版本 4.5 中找到了配置文件 78 的文件位置并且它存在,我安装了最新版本的 Mono 开发工具包 (MDK)。它如何在 Xamarin 中正确构建而不是在 Bamboo 中正确构建,这与我如何定位文件有关吗?
我也试过在终端上创建 APK 文件,但也遇到了同样的错误。我尝试了很多修复程序,例如卸载单声道并重新安装,我将 .NETPortable 从 windows 添加到 Mac,但这没有用,为什么我的 mac 找不到配置文件 78它位于我的 mac 上。
文件 /usr/local/Cellar/mono/4.6.2.7/lib/mono/xbuild/14.0/bin/microsoft.common.targets
似乎正在寻找 .NetPortable,Version=v4.5,Profile=78
但我在这个位置找到了它:Library/Frameworks/Mono.framework/Versions/4.6.2/lib/mono/xbuild.frameworks/.NetPortable/v4.5/Profile/Profile78
我已将 .NetPortable 文件夹粘贴到多个位置以尝试修复此错误。我哪里错了?
虽然我已经有一段时间(3 年多)没有接触 Bamboo,但我个人做的一件事是确保您的 xbuild
命令在具有类似设置的本地环境中像魅力一样工作。看到您尝试通过终端创建 .apk
并得到相同的错误,听起来像是安装错误。 PCL Reference Assemblies
应该是 MacOS 上 MDK 的一部分。看到你已经安装了它,这听起来像是 Bamboo 用户帐户的文件权限的潜在问题。
要创建一个 .apk
文件,您需要在调用 xbuild
.
时针对您的 Android 项目使用 /t:PackageForAndroid
目标
EX:
xbuild XamarinAndroidApplication.csproj /p:Configuration=Release /t:PackageForAndroid
根据此处的注释,您也可以使用 SignAndroidPackage
目标:
https://developer.xamarin.com/guides/android/under_the_hood/build_process/#Build_Targets
xbuild XamarinAndroidApplication.csproj /p:Configuration=Release /t:SignAndroidPackage
如果您想使用 MSBuild
等价物,它看起来像这样:
msbuild MyAndroidApp.sln
msbuild /t:SignAndroidPackage MyAndroidApp.csproj
我正在尝试实施 Bamboo 以使用 Xbuild 创建 IPA 文件或 APK 文件,但我收到 1 个警告和 1 个错误:
警告如下:
/usr/local/Cellar/mono/4.6.2.7/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: warning : Unable to find framework corresponding to the target framework moniker '.NETPortable,Version=v4.5,Profile=Profile78'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.
错误是这样的:
/usr/local/Cellar/mono/4.6.2.7/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : PCL Reference Assemblies not installed.
我不确定为什么会这样,因为当我在 Xamarin studio 中打开项目并构建它时,它会成功,而当我 运行 它时,应用程序功能齐全,没有任何问题。我已经在版本 4.5 中找到了配置文件 78 的文件位置并且它存在,我安装了最新版本的 Mono 开发工具包 (MDK)。它如何在 Xamarin 中正确构建而不是在 Bamboo 中正确构建,这与我如何定位文件有关吗?
我也试过在终端上创建 APK 文件,但也遇到了同样的错误。我尝试了很多修复程序,例如卸载单声道并重新安装,我将 .NETPortable 从 windows 添加到 Mac,但这没有用,为什么我的 mac 找不到配置文件 78它位于我的 mac 上。
文件 /usr/local/Cellar/mono/4.6.2.7/lib/mono/xbuild/14.0/bin/microsoft.common.targets
似乎正在寻找 .NetPortable,Version=v4.5,Profile=78
但我在这个位置找到了它:Library/Frameworks/Mono.framework/Versions/4.6.2/lib/mono/xbuild.frameworks/.NetPortable/v4.5/Profile/Profile78
我已将 .NetPortable 文件夹粘贴到多个位置以尝试修复此错误。我哪里错了?
虽然我已经有一段时间(3 年多)没有接触 Bamboo,但我个人做的一件事是确保您的 xbuild
命令在具有类似设置的本地环境中像魅力一样工作。看到您尝试通过终端创建 .apk
并得到相同的错误,听起来像是安装错误。 PCL Reference Assemblies
应该是 MacOS 上 MDK 的一部分。看到你已经安装了它,这听起来像是 Bamboo 用户帐户的文件权限的潜在问题。
要创建一个 .apk
文件,您需要在调用 xbuild
.
/t:PackageForAndroid
目标
EX:
xbuild XamarinAndroidApplication.csproj /p:Configuration=Release /t:PackageForAndroid
根据此处的注释,您也可以使用 SignAndroidPackage
目标:
https://developer.xamarin.com/guides/android/under_the_hood/build_process/#Build_Targets
xbuild XamarinAndroidApplication.csproj /p:Configuration=Release /t:SignAndroidPackage
如果您想使用 MSBuild
等价物,它看起来像这样:
msbuild MyAndroidApp.sln
msbuild /t:SignAndroidPackage MyAndroidApp.csproj