首页 新闻 会员 周边 捐助

ASP.NET CORE 在调试期间运行正常,发布到IIS后提示错误

0
[待解决问题]

System.MissingMethodException: Method not found: 'System.String Microsoft.EntityFrameworkCore.Metadata.Internal.Property.Format(System.Collections.Generic.IEnumerable`1<Microsoft.EntityFrameworkCore.Metadata.IProperty>, Boolean)'. at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.ValidateSharedTableCompatibility(IReadOnlyList`1 mappedTypes, String tableName) at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.ValidateSharedTableCompatibility(IModel model) at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.Validate(IModel model) at Microsoft.EntityFrameworkCore.Internal.SqlServerModelValidator.Validate(IModel model) at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator) at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel() at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model() at lambda_method(Closure , ServiceProviderEngineScope ) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies() at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider() at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies() at Microsoft.EntityFrameworkCore.DbContext.get_Model() at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.get_EntityType() at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.get_EntityQueryable() at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.System.Linq.IQueryable.get_Provider() at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate) at EnergyConsume2.Controllers.HomeController.BB2_Filter_d(DateTime d1, String device1) in C:\Mark's Document\Project\研发\能耗管理\Energy\EnergyConsume2\Controllers\HomeController.cs:line 69

markyangcontec的主页 markyangcontec | 菜鸟二级 | 园豆:204
提问于:2018-04-26 16:55

求大神指点迷津呀

markyangcontec 6年前
< >
分享
所有回答(2)
0

.net core sdk是同一个版本吗?

dudu | 园豆:30948 (高人七级) | 2018-04-26 22:00

菜鸟,不知道再哪看 .net core sdk的版本!以前项目文件中有 <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>,去掉后就不报错了;但是数据库连不上,但也不报错,没有异常抛出

支持(0) 反对(0) markyangcontec | 园豆:204 (菜鸟二级) | 2018-04-27 15:55
0

在Target Runtime中配置成WIN10的操作系统,运行正常;

markyangcontec | 园豆:204 (菜鸟二级) | 2018-05-07 08:55
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册