Base solution for your next web application

Activities of "mikemey01"

Makes sense - I'll start again with v4.0 of the .net core/jquery solution and hopefully standardize on that going forward. It seems like v3.2 was caught in a weird in-between area as EFCore wasn't being used and it was relying on project.json project format. It seems like aspnet zero is standardizing on EFCore's ability to use the PM migrations as opposed to CLI migrations seeing that the step-by-step guide was updated to remove the CLI instructions. Hopefully that remains the route for some time to come.

Is there anyway to version control the guides with the specific releases so they remain available? They're very handy references but difficult to follow as they change with the new version releases.

What version did you start with? I'm having similar issues converting version 3.2 to work with VS2017 (project.json - .csproj files) and getting EF to work. the CLI tool commands seem to no longer work with VS2017 projects and the package manager "Update-Database" don't work either.

Did you update all 20 or so ABP packages? Or selectively update only a few?

Hi - I'm using .NET Core/jQuery version 3.2 with .NET 4.6.1 framework.

Originally the project was using the project.json method in visual studio 2015. Migrations were handled with CLI tool using dotnet ef..

When I upgraded to visual studio 2017 it convert the project to .csproj files which broke the CLI tooling. However the package manager console does not work either. Note that this version does not use entityframeworkCore, instead it uses EF6 still.

I'm wondering if it would be best to cut my losses and download version 4.0 of .net zero and copy my code into that project. If that's the best route - is v4.0 a stable version? If I build a lot of code into this version I don't want to have to do this exercise every few months.

Thanks.

Hi -

I updated version 3.2 to visual studio 2017 since publishing didn't work in vs 2015. With the upgrade, the dotnet ef migrations are broken of course since it no longer has a project.json file.

However EF migrations in the package manager console also are not working, I get the following error: "No DbContext was found in assembly 'ChariotInstruments.PropertyMents.EntityFramework'"

How do I make migrations work again in VS2017? I tried both EntityFramework and EntityFrameworkCore.Tools with no luck.

Thanks.

I think the issue I was running into is that it was inserting the tenantId of 1 into the PbPersons table from the seed class before the Default tenant was inserted into the AbpTenants table giving a FK reference error. I'm looking at the process order I setup now, either way seems to be fixed.

Thanks,

Mike

I updated to VS 2017, converting from project.json to .csproj methodology - seems to have fixed the issue. Not sure what the root cause was for publishing in VS 2015 still but I'm happy with the outcome.

Thanks,

Mike

Hi -

I have the .NET Core/jQuery (VS 2015 version) that I'm trying to publish. When I right click on the .MVC project and hit Publish, it immediately says "Build has been cancled" and nothing else happens. No Errors, no other progress. Please see attached screen shot.

Thanks,

Mike

Quick update - it looks like it had something to do with the seed data instead of the migration it self. I removed the seed data (the data that was provided in the development step-by-step guide) and it ran the migration flawlessly. I'm not sure why the seed data would be trying to insert 0 into the PbPersons.TenantId column but it was. I'll investigate further.

Hi -

When adding IMustHaveTenant and TenantId field to an entity, then creating the migration, then running "dotnet ef database update" against a new database returns the error: "Can not set TenantId to 0 for IMustHaveTenant entities!"

If I run the database migrations without any entities utilizing IMustHaveTenant it works fine. If I then add the IMustHaveTenant to an entity and run the migrations it works fine. It's only when IMustHaveTenant is present when migrating for the first time to a new database instance. I have set the default in the migration for the TenantId column as below:

AddColumn("dbo.PhoneBookPersons", "TenantId", c => c.Int(nullable: false, defaultValue: 1));

Thanks,

Mike

Question

Hi there -

While working through the .NET Core step-by-step guide I added the class permission decoration and ran the project. It seems like it throws the correct error, but not as a pop-up dialog, more as an application error. Please see attached. This isn't normal, correct?

I've added AppPermissions.cs: public const string Pages_Tenant_Phonebook = "Pages.Tenant.Phonebook"; AppAuthorizationProvider.cs: pages.CreateChildPermission(AppPermissions.Pages_Tenant_Phonebook, L("Phonebook"), multiTenancySides: MultiTenancySides.Tenant);

And decorated the PersonAppService class with: [AbpAuthorize(AppPermissions.Pages_Tenant_Phonebook)]

Thanks.

Showing 11 to 20 of 25 entries