【发布时间】:2020-06-22 17:40:19
【问题描述】:
从 .net 4 更新到更高版本后,例如4.5, 4.72 我得到以下错误。我更新了参考资料等。
使用 TargetFrameworkMigrator 手动执行更新。
Error 9209 'Note.Svc.Models.ps_AddNoteBrs_Result' does not contain a definition for 'Modified' and no extension method 'Modified' accepting a first argument of type 'Note.Svc.Models.ps_AddNoteBrs_Result' could be found (are you missing a using directive or an assembly reference?) C:\Work\Note\Note.Svc\TakeAddSvc.svc.cs 1492 31 Note.Svc
Error 9224 'Note.Svc.Models.ps_AddNoteBrs_Result' does not contain a definition for 'Modified' and no extension method 'Modified' accepting a first argument of type 'Note.Svc.Models.ps_AddNoteBrs_Result' could be found (are you missing a using directive or an assembly reference?) C:\Work\Note\Note.Svc\TakeAddSvc.svc.cs 1500 31 Note.Svc
Error 9249 'Note.Svc.Models.ps_AddNoteBrs_Result' does not contain a definition for 'Modified' and no extension method 'Modified' accepting a first argument of type 'Note.Svc.Models.ps_AddNoteBrs_Result' could be found (are you missing a using directive or an assembly reference?) C:\Work\Note\Note.Svc\TakeAddSvc.svc.cs 1513 35 Note.Svc
Error 4777 'Note.Svc.Models.NoteRun' does not contain a definition for 'Checked' and no extension method 'Checked' accepting a first argument of type 'Note.Svc.Models.NoteRun' could be found (are you missing a using directive or an assembly reference?) C:\Work\Note\Note.Svc\QualityControlTrackingService.svc.cs 511 58 Note.Svc
Error 5712 Cannot implicitly convert type 'System.Collections.Generic.List<Note.Svc.Models.ps_RerportNote_Result> [c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll]' to 'System.Collections.Generic.List<Note.Svc.Models.ps_RerportNote_Result> [c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll]' C:\Work\Note\Note.Svc\AddRepSvc.svc.cs 647 42 Note.Svc
Error 5700 Cannot implicitly convert type 'System.Collections.Generic.List<Note.Svc.Models.ps_ReportAddNote_Result> [c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll]' to 'System.Collections.Generic.List<Note.Svc.Models.ps_ReportAddNote_Result> [c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll]' C:\Work\Note\Note.Svc\AddRepSvc.svc.cs 646 37 Note.Svc
Error 5838 Cannot implicitly convert type 'System.Collections.Generic.List<Note.Svc.Models.ps_ReportAddNote_Result> [c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll]' to 'System.Collections.Generic.List<Note.Svc.Models.ps_ReportAddNote_Result> [c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll]' C:\Work\Note\Note.Svc\AddRepSvc.svc.cs 664 37 Note.Svc
【问题讨论】:
-
什么是
Note.Svc.Models.ps_AddNoteBrs_Result、Note.Svc.Models.NoteRun、Note.Svc.Models.ps_ReportAddNote_Result和Note.Svc.Models.ps_RerportNote_Result? -
报告和更新程序。
-
用这么旧的 VS 版本定位 4.8 非常乐观。您正在跳过完整的 C# 编译器重写(又名 Roslyn)、3 个主要的 VS 更新和 3 个主要的框架更新。当社区版免费时,它没有多大意义。
标签: c# .net visual-studio visual-studio-2013 upgrade