我开发了一款xamarin.forms应用。一切都很好,我更新了我的Visual Studio安装。但现在我正在低于错误。这是代码:
using SQLite;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using Xamarin.Forms;
namespace SampleApp
{
[SQLite.Table("CSV_File")]
public class FileCSV : INotifyPropertyChanged
{
private int _id;
[ForeignKey("Id")]
[PrimaryKey, AutoIncrement, NotNull]
public int Id
{
get
{
return _id;
}
set
{
this._id = value;
OnPropertyChanged(nameof(Id));
}
}
而且是错误:
错误CS0246类型或命名空间名称' ForeignKey'不可能 发现(你错过了使用指令或程序集 引用?)
错误CS0234类型或命名空间名称' DataAnnotations'才不是 存在于命名空间中的System.ComponentModel' (你错过了吗? 部件 引用?)
答案 0 :(得分:0)
将共享项目的目标配置文件更改为Profile259。