簡體   English   中英

安裝/使用下載的 nuget 包的問題(在 Xamarin-Forms 中)

[英]Issues with installing/using a downloaded nuget package (in Xamarin-Forms)

我正在我的 mac (Xamarin-Studio) 上編碼,我的目標是為 Android 和 IOS 編寫 C# 應用程序。 這是我的問題。

我成功下載了一個 nuget 包(ZXing.Net.Mobile)(因為我可以在解決方案的包文件夾中看到它)。 然后我去解決方案ZXing.Net.Mobile.Forms.iOS.Platform.Init();AppDelegate並想應用這個代碼ZXing.Net.Mobile.Forms.iOS.Platform.Init(); (如 github 自述文件中所述)但隨后它說

/Users/summerdream/Projects/Secretary/iOS/AppDelegate.cs(13,13): 錯誤 CS0103: 當前上下文中不存在名稱“ZXing” (CS0103) (Secretary.iOS)

我已經嘗試擺脫這個問題 3 天了,但我什么也沒得到。 誰能給我一些提示?

請嘗試使用 2.1.47 版本

ZXing.Net.Mobile.2.1.47

您需要為您的解決方案安裝ZXing.Net.Mobile.Forms ,而不是Zxing.Net.Mobile

  1. 右鍵單擊解決方案
  2. 單擊“管理解決方案的 NuGet 包...”
  3. 卸載Zxing.Net.Mobile包。
  4. 搜索ZXing.Net.Mobile.Forms包並安裝。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM