I have taken the latest code based on 2.0 and tried to merge it with old code.
I'm getting too many errors on build solution, please help.
Severity Code Description Project File Line Suppression State Error CS0117 'AppSettings' does not contain a definition for 'HostManagement' Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 169 Active Error CS0117 'AppSettings' does not contain a definition for 'HostManagement' Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 170 Active Error CS1061 'IModuleConfigurations' does not contain a definition for 'AspNetZero' and no extension method 'AspNetZero' accepting a first argument of type 'IModuleConfigurations' could be found (are you missing a using directive or an assembly reference?) Test.ABCD.Web.Public C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Web.Public\Startup\ABCDWebFrontEndModule.cs 28 Active Error CS0006 Metadata file 'C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\bin\Debug\netcoreapp1.1\Test.ABCD.Application.dll' could not be found Test.ABCD.Web.Public C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Web.Public\CSC 1 Active Error CS0006 Metadata file 'C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Business.Data\bin\Debug\netcoreapp1.1\Test.ABCD.Business.Repositories.dll' could not be found Test.ABCD.Web.Public C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Web.Public\CSC 1 Active Error CS0006 Metadata file 'C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Business.Dto\bin\Debug\netcoreapp1.1\Test.ABCD.Business.Dto.dll' could not be found Test.ABCD.Web.Public C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Web.Public\CSC 1 Active Error CS0006 Metadata file 'C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Business.Services\bin\Debug\netcoreapp1.1\Test.ABCD.Business.Services.dll' could not be found Test.ABCD.Web.Public C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Web.Public\CSC 1 Active Error CS0006 Metadata file 'C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Web.Core\bin\Debug\netcoreapp1.1\Test.ABCD.Web.Core.dll' could not be found Test.ABCD.Web.Public C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Web.Public\CSC 1 Active Error NU1201 Project Test.ABCD.Application.Shared is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project Test.ABCD.Application.Shared supports: netstandard2.0 (.NETStandard,Version=v2.0) Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Test.ABCD.Application.csproj 1 Error NU1201 Project Test.ABCD.Application.Shared is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project Test.ABCD.Application.Shared supports: netstandard2.0 (.NETStandard,Version=v2.0) Test.ABCD.ConsoleApiClient C:\Users\myname\source\repos\ABCD\aspnet-core\test\Test.ABCD.ConsoleApiClient\Test.ABCD.ConsoleApiClient.csproj 1 Error NU1201 Project Test.ABCD.Application.Shared is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project Test.ABCD.Application.Shared supports: netstandard2.0 (.NETStandard,Version=v2.0) Test.ABCD.Business.Dto C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Business.Dto\Test.ABCD.Business.Dto.csproj 1 Error NU1201 Project Test.ABCD.Application.Shared is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project Test.ABCD.Application.Shared supports: netstandard2.0 (.NETStandard,Version=v2.0) Test.ABCD.Business.Repositories C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Business.Data\Test.ABCD.Business.Repositories.csproj 1 Error NU1201 Project Test.ABCD.Application.Shared is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project Test.ABCD.Application.Shared supports: netstandard2.0 (.NETStandard,Version=v2.0) Test.ABCD.Business.Services C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Business.Services\Test.ABCD.Business.Services.csproj 1 Error NU1201 Project Test.ABCD.Application.Shared is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project Test.ABCD.Application.Shared supports: netstandard2.0 (.NETStandard,Version=v2.0) Test.ABCD.Web.Core C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Web.Core\Test.ABCD.Web.Core.csproj 1 Error NU1201 Project Test.ABCD.Application.Shared is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project Test.ABCD.Application.Shared supports: netstandard2.0 (.NETStandard,Version=v2.0) Test.ABCD.Tests C:\Users\myname\source\repos\ABCD\aspnet-core\test\Test.ABCD.Tests\Test.ABCD.Tests.csproj 1 Error NU1201 Project Test.ABCD.Application.Shared is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project Test.ABCD.Application.Shared supports: netstandard2.0 (.NETStandard,Version=v2.0) Test.ABCD.Web.Host C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Web.Host\Test.ABCD.Web.Host.csproj 1 Error CS0103 The name 'DatabaseCheckHelper' does not exist in the current context Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 112 Active Error CS0103 The name 'DefaultLanguagesCreator' does not exist in the current context Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 86 Active Error CS0103 The name 'SeedHelper' does not exist in the current context Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 56 Active Error CS0234 The type or namespace name 'AspNetZeroCore' does not exist in the namespace 'Abp' (are you missing an assembly reference?) Test.ABCD.Web.Public C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Web.Public\Startup\ABCDWebFrontEndModule.cs 1 Active Error CS0234 The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Test.ABCD' (are you missing an assembly reference?) Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 20 Active Error CS0234 The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Test.ABCD' (are you missing an assembly reference?) Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 20 Active Error CS0246 The type or namespace name 'HostBillingSettingsEditDto' could not be found (are you missing a using directive or an assembly reference?) Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 167 Active Error CS0234 The type or namespace name 'Migrations' does not exist in the namespace 'Test.ABCD' (are you missing an assembly reference?) Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 23 Active Error CS0234 The type or namespace name 'Migrations' does not exist in the namespace 'Test.ABCD' (are you missing an assembly reference?) Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 23 Active Error CS0234 The type or namespace name 'Migrations' does not exist in the namespace 'Test.ABCD' (are you missing an assembly reference?) Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 24 Active Error CS0234 The type or namespace name 'Migrations' does not exist in the namespace 'Test.ABCD' (are you missing an assembly reference?) Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 24 Active Error CS0246 The type or namespace name 'ABCDDbContext' could not be found (are you missing a using directive or an assembly reference?) Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 34 Active Error CS0305 Using the generic type 'AbpZeroDbMigrator<TDbContext>' requires 1 type arguments Test.ABCD.Application C:\Users\myname\source\repos\ABCD\aspnet-core\src\Test.ABCD.Application\Install\InstallAppService.cs 38 Active
71 Answer(s)
-
0
@aaron
Please help buddy
-
0
For ABP version, right-click on solution and select "Manage NuGet Packages".
For ASP.NET Zero version, check for these changes made in specific versions:
- v5.0.4: https://github.com/aspnetzero/aspnet-zero-core/commit/6e3dff9d50a309597cf995eb4ba798888881f3f4
- v5.0.3: https://github.com/aspnetzero/aspnet-zero-core/commit/5db120af73d7b10ca7a007b417118ccbf60df062
- v5.0.2: https://github.com/aspnetzero/aspnet-zero-core/commit/ea52779210507b4265bbfe70e923740a0cc5e5cd
- v5.0.1: https://github.com/aspnetzero/aspnet-zero-core/commit/53dc2025498d3e859ea828f24b61eb7af6937719
- v5.0.0: https://github.com/aspnetzero/aspnet-zero-core/commit/404ad231c7783b0f7fabc4395b921f85ad2ed384
-
0
@aaron
ABP version : 3.2.5
I have checked, I have v5.0.4 version.
Thanks
-
0
@aaron any updates?
-
0
Solved issue buddy.
Thanks
-
0
But APIs are getting random required fields which I have not even mentioned in DTO. due to this most of the APIs call are getting failed.
Thanks
-
0
DTO:
using Abp.Runtime.Validation; using MyCompany.MyProject.Dto; namespace MyCompany.MyProject.Business.Dto.Tests { public class FetchTestInput: PagedAndSortedInputDto, IShouldNormalize { public int TestLevel { get; set; } public int CodeType { get; set; } public string TestCode { get; set; } public string DescLong { get; set; } public string LanguageCode { get; set; } public string TestParent { get; set; } public int? TestCondID { get; set; } public int? TestResultId { get; set; } public void Normalize() { if (string.IsNullOrEmpty(Sorting)) { Sorting = "TestCode"; } } } }
API method:
public PagedResultDto<FetchTest> GetSearchTest(FetchTestInput searchInput) { return _TestRepository.GetSearchTest(searchInput); }
Entity:
using Abp.Domain.Entities.Auditing; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace MyCompany.MyProject.Business.Model.Tests { [Table("Test")] public class Test : FullAuditedEntity { public const int NVarcharLength3 = 3; public const int NVarcharLength40 = 40; public const int NVarcharLength250 = 250; [Required] [MaxLength(NVarcharLength250)] public string TestCode { get; set; } [Required] public int TestLevel { get; set; } = 0; [MaxLength(NVarcharLength250)] public string TestParent { get; set; } [Required] public int CodeType { get; set; } = 0; [MaxLength(NVarcharLength3)] public string CurrencyCode { get; set; } [Required] [MaxLength(NVarcharLength40)] public string DescLong { get; set; } [Required] [MaxLength(NVarcharLength40)] public string DescShort { get; set; } [Required] public bool FlgAllow1 { get; set; } = true; [Required] public bool FlgAllow2 { get; set; } = false; [Required] public bool FlgAllow3 { get; set; } = false; [Required] public bool FlgAllow4 { get; set; } = true; [Required] public bool FlgAllow5 { get; set; } = true; [Required] public bool FlgFood6 { get; set; } = true; [Required] public bool Flg7 { get; set; } = true; [Required] public bool Flg8 { get; set; } = false; [Required] public decimal MaxPrice { get; set; } = 0; [Required] public int TestMemberId { get; set; } = 0; [Required] public decimal MinPrice { get; set; } = 0; public int? TestDiscountId { get; set; } public int? TestDataCode { get; set; } } }
Please find the attached screenshot for your reference.
-
0
Can you find where ClassificationLevel and CodeType appears in your project?
-
0
ClassificationLevel and CodeType are TestLevel ans TestCode. I just replaced Classification by Test to show you code.
-
0
Try setting a default value explicitly:
public class FetchTestInput: PagedAndSortedInputDto, IShouldNormalize { public int TestLevel { get; set; } = 0; public int CodeType { get; set; } = 0; // ... }
-
0
I have to explicitly pass the value for TestLevel and CodeType as 0 from UI now. But this functionality was working fine before the upgrade to core 2.0 (I was not passing default value for any parameter). So I have to make this change in all UI pages according to APIs. But I think this is not the way. Can I do something without making so many changes in throughout my application?
Why have these fields become Required now? Even in Swagger UI, it was not required before for fields.
Can I disable this feature?
-
0
Did you try what I suggested?
-
0
Yes, I tried but it’s not working. I have to explicitly set TestLevel and CodeType to 0 also from UI.
-
0
UI has also become distorted for my existing components which I had developed on previous framework.
-
0
Hi @ManojReddy,
This change might be done by ASP.NET. When you upgrade ABP, you also upgrade ASP.NET versions.
Also, your UI changes might be related to client side libraries.
By the way, which template you are using ? (ASP.NET Core & jQuery or ASP.NET Core & Angular).
-
0
Thanks for your reply.
I'm using ASP.NET Core & Angular.
-
0
So, were you using AngularJs and trytign to move to Angular ? If so, your previous components will not work, you need to align them with angular 5.
For your other problem, can you show us a use case ? You can share your app service input class and content of your ajax request will be great.
-
0
<cite>ManojReddy: </cite> I have to explicitly pass the value for TestLevel and CodeType as 0 from UI now. But this functionality was working fine before the upgrade to core 2.0 (I was not passing default value for any parameter). So I have to make this change in all UI pages according to APIs. But I think this is not the way. Can I do something without making so many changes in throughout my application?
Why have these fields become Required now? Even in Swagger UI, it was not required before for fields.
Can I disable this feature?
Could you please reply on this.
-
0
Hi @ManojReddy,
If I understand correctly, you are upgrading from ASP.NET MVC 5.x to ASP.NET Core, so this is the expected behaviour.
-
0
Thanks a lot dear :)