entity-framework – 由于Entity Framework引用无法解析,Visual Studio Online无法构建项目

我该怎么做来修复这个版本?实体框架已通过NuGet添加到此项目中.

所有项目在本地系统上编译时没有问题.但是Visual Studio Online上的构建失败了.

通过启用诊断日志记录,我能够跟踪此警告,这使我的构建失败:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework.SqlServer". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

最佳答案 不要右键单击该项目并选择“启用NuGet包还原”.这是按照
Nuget Docs进行包恢复的“旧方法”.

默认情况下,包恢复应作为构建过程的一部分进行.如果不是(似乎是这种情况),你会遇到另外一个问题,但是没有足够的信息可以说明什么.

点赞