neurospeech / asp-net-core-extensions

ASP.NET Core Extensions and Helpers
23 stars 5 forks source link

ArgumentNullException on migration #3

Closed BlackFenix2 closed 4 years ago

BlackFenix2 commented 5 years ago

When i try to initiate a migration i keep getting a ArgumentNullException for the element parameter. I have tried with both a new and existing database but i get the same error below.

I am using ASP.NET Core 2.2

logs

Table Computer sync complete
Table Farm sync complete
Application startup exception: System.ArgumentNullException: Value cannot be null.
Parameter name: element
   at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
   at System.Reflection.CustomAttributeExtensions.GetCustomAttributes[T](MemberInfo element)
   at NeuroSpeech.EFCoreLiveMigration.StringExtensions.GetOldNames(IProperty property) in C:\projects\asp-net-core-extensions\EFCoreLiveMigration\NeuroSpeech.EFCoreLiveMigration\StringExtensions.cs:line 38
   at NeuroSpeech.EFCoreLiveMigration.MigrationHelper.CreateColumn(IProperty x) in C:\projects\asp-net-core-extensions\EFCoreLiveMigration\NeuroSpeech.EFCoreLiveMigration\MigrationHelper.cs:line 103
   at NeuroSpeech.EFCoreLiveMigration.MigrationHelper.<>c.<Migrate>b__7_0(IProperty x) in C:\projects\asp-net-core-extensions\EFCoreLiveMigration\NeuroSpeech.EFCoreLiveMigration\MigrationHelper.cs:line 40
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at NeuroSpeech.EFCoreLiveMigration.MigrationHelper.Migrate() in C:\projects\asp-net-core-extensions\EFCoreLiveMigration\NeuroSpeech.EFCoreLiveMigration\MigrationHelper.cs:line 40
   at ItOps.Data.Common.DataSeeder.InitializeData(IApplicationBuilder app) in C:\Users\efrancis\Source\Repos\ItOps\ItOps.Data\Common\DataSeeder.cs:line 24
   at ItOps.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in C:\Users\efrancis\Source\Repos\ItOps\ItOps\Startup.cs:line 139
ackava commented 4 years ago

Fixed in 1.2.85

BlackFenix2 commented 4 years ago

ok, the library works now. thanks for your help