症状
我一直在尝试在 Visual Studio 2017 RC1 中修复我的 Xamarin 表单解决方案,该解决方案生成为全新模板。虽然 android 和 iOS 子解决方案都正确引用了所有 .dll 引用,但我的 UWP(通用 Windows)子解决方案似乎缺少对以下 .dll 文件的基本引用:
'系统'
'Xamarin'
'应用程序'
'Linq'
我能够在 C:\Program Files (x86)\中找到
,但我无法找到 UWP (Windows) 的特定 'System'
和 'System.Linq'
的 .dll 引用引用 Assemblies\Microsoft\Framework'Xamarin'
引用。我相当确定找到 'Xamarin'
引用也将解析 'Application'
引用,因为我相信它是 'Xamarin'
的派生物.
尝试修复
<强>1。清洁溶液
结果:Clean 立即取消,重新生成错误
<强>2。创建新解决方案
结果:没有变化
<强>3。重新安装 Visual Studio 2017(多次)然后创建新的解决方案
结果:没有变化
具体错误
CS0246 The type or namespace name '-insert reference here-' could not be found (are you missing a using directive or an assembly reference?)
这发生在 App.xaml.cs
文件中的项目平台 -solution name-.UWP
中。
最佳答案
我遇到了同样的问题。卸载并重新加载 UWP 项目,突然间我丢失的所有 nuget 引用都出现了(Xamarin.Forms、Microsoft.NETCore.UniversalWindowsPlatform、sqlite-net-pcl,...)
关于c# - Visual Studio Xamarin 模板缺少程序集引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41916801/