Tôi đã cố gắng biên dịch my project với các hướng dẫn sau để tôi nhận được lỗi sau.Cách giải quyết vấn đề xbuild '.NETPortable, Version = v4.0, Hồ sơ = Profile344' trên Linux
Tập lệnh của tôi;
sudo apt-get install mono-complete
mozroots --import --sync
mkdir gthb
cd gthb/
git clone https://github.com/ziyasal/InfluxDB.Net.git
cd InfluxDB.Net/
mono .nuget/NuGet.exe install NUnit.Runners
mono .nuget/NuGet.exe restore InfluxDB.Net.sln
xbuild
Đầu ra;
Version XBuild Động cơ 12.0 Mono, phiên bản 3.2.8.0 Bản quyền (C) 2005-2013 tác giả Mono khác nhau
Build started 2015/01/06 18:31:01.
Dự án "/home/ziyasal/gthb/InfluxDB.Net/InfluxDB.Net.sln" (target mặc định (s)): Target ValidateSolutionConfiguration: Xây dựng cấu hình giải pháp "Debug | Bất kỳ CPU". Mục tiêu xây dựng: Dự án "/home/ziyasal/gthb/InfluxDB.Net/InfluxDB.Net/InfluxDB.Net.csproj" ((các) đích mặc định): Mục tiêu RestorePackages: Thi hành: mono --runtime = v4. 0.30319 "/home/ziyasal/gthb/InfluxDB.Net/.nuget/NuGet.exe" cài đặt "/home/ziyasal/gthb/InfluxDB.Net/InfluxDB.Net/packages.config" -source "" -RequireConsent -solutionDir "/home/ziyasal/gthb/InfluxDB.Net/" Khôi phục các gói NuGet ... Để ngăn NuGet tải xuống các gói trong khi xây dựng, hãy mở hộp thoại Tùy chọn Visual Studio, nhấp vào nút Trình quản lý Gói và bỏ chọn 'Cho phép NuGet tải xuống các gói bị thiếu '. Target PrepareForBuild: Cấu hình: Debug Hệ điều hành: AnyCPU Tạo thư mục "bin/Debug /" thư mục tạo "obj/Debug /" GetReferenceAssemblyPaths Target: /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common .targets: warning: Không thể tìm thấy khung công tác tương ứng với biệt danh khung mục tiêu '.NETPortable, Version = v4.0, Profile = Profile344'. Framework ass tham chiếu ngầm định sẽ được giải quyết từ GAC, có thể không phải là hành vi dự định. /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets: lỗi: PCL Reference Assemblies not installed. Tác vụ "GetReferenceAssemblyPaths" thực hiện - FAILED Hoàn thành mục tiêu xây dựng "GetReferenceAssemblyPaths" trong dự án "/home/ziyasal/gthb/InfluxDB.Net/InfluxDB.Net/InfluxDB.Net.csproj".-- FAILED Xong dự án xây dựng"/Trang chủ/ziyasal/gthb/InfluxDB.Net/InfluxDB.Net/InfluxDB.Net.csproj ".-- FAILED Tác vụ" MSBuild "thực hiện - FAILED Hoàn thành mục tiêu xây dựng" Xây dựng "trong dự án"/home/ziyasal/gthb/InfluxDB.Net/InfluxDB.Net.sln".-- FAILED Hoàn thành dự án xây dựng "/home/ziyasal/gthb/InfluxDB.Net/InfluxDB.Net.sln".-- FAILED
Xây dựng FAILED.
Cảnh báo:
/home/ziyasal/gthb/InfluxDB.Net/InfluxDB.Net.sln (mục tiêu mặc định) -> (Xây dựng mục tiêu) -> /home/ziyasal/gthb/InfluxDB.Net /InfluxDB.Net/InfluxDB.Net.csproj (mục tiêu mặc định) -> /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.mục tiêu (mục tiêu GetReferenceAssemblyPaths) ->
/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets: warning : Unable to find framework corresponding to the target framework moniker '.NETPortable,Version=v4.0,Profile=Profile344'. Frame
tham chiếu lắp ráp công việc sẽ được giải quyết khỏi GAC, có thể không phải là hành vi dự định.
Lỗi:
/home/ziyasal/gthb/InfluxDB.Net/InfluxDB.Net.sln (mục tiêu mặc định) -> (Xây dựng mục tiêu) -> /home/ziyasal/gthb/InfluxDB.Net /InfluxDB.Net/InfluxDB.Net.csproj (mục tiêu mặc định) -> /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets (GetReferenceAssemblyPaths mục tiêu) ->
/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets: error : PCL Reference Assemblies not installed.
1 Warning(s)
1 Error(s)
thời gian trôi qua 00: 00: 03.8459340
Bạn có thể gửi một lỗi trên https://bugzilla.xamarin.com/ để tham chiếu đến các tập tin giới thiệu PCL không? Tôi đã có thể mong đợi các referenceassemblies-pcl để cài đặt tất cả mọi thứ bạn cần, nhưng tôi có thể sai. –
OK Tôi thấy vấn đề là gì. Các referenceassemblies-pcl được dựa trên những gì Microsoft phát hành và không phải những gì Visual Studio cài đặt (cũng như những gì có sẵn với Mono trên Mac). Referenceassemblies-pcl thiếu cấu hình 344 là cấu hình bạn đang sử dụng. –
@MattWard Jo vừa đẩy bản cập nhật của gói referenceassemblies-pcl bao gồm Profile344. –