KY-Programming / generator

Type Generator: No framework. No magic. Just code. 100% debuggable.
https://generator.ky-programming.de
MIT License
18 stars 4 forks source link

No matching constructor found. Provide default constructor or bind all required parameter types AngularModelWriter #15

Closed joachim-heck closed 4 years ago

joachim-heck commented 4 years ago

Hey Kai, again thanks for the effort you put on this project - I've just upgraded some projects to the new 4.3 release in order to test your enhancements. Unfortunately for me it seems like there is something broken in the ´´´AngularModelWriter´´´. When changing from 4.2 to 4.3 our builds fail with the following exception:

Error: System.InvalidOperationException occurred. No matching constructor found. Provide default constructor or bind all required parameter types AngularModelWriter

I extracted the logs

 System.InvalidOperationException occured
No matching constructor found. Provide default constructor or bind all required parameter types AngularModelWriter
   at KY.Core.Dependency.DependencyResolver.Create(Type type, Object[] arguments)
   at KY.Core.Dependency.DependencyResolver.Create[T](Object[] arguments)
   at KY.Generator.Angular.Commands.AngularModelCommand.Generate(CommandConfiguration configuration, IOutput& output)
   at KY.Generator.Command.CommandRunner.Run(IEnumerable`1 configurations, IOutput output)
   at KY.Generator.Reflection.Commands.RunByAttributeCommand.Generate(CommandConfiguration configuration, IOutput& output)
   at KY.Generator.Command.CommandRunner.<>c__DisplayClass2_0.<Run>b__1(IGeneratorCommand x)
   at System.Linq.Enumerable.SelectListIterator`2.ToList()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at KY.Generator.Command.CommandRunner.Run(CommandConfiguration configuration, IOutput output)
   at KY.Generator.Generator.Run() 

Does this probably relate to the a missing non parameterized constructor in https://github.com/KY-Programming/generator/blob/5053e3cd5ec70fd23d52613c103258772ccd18a3/Angular/Writers/AngularModelWriter.cs?

ky-one commented 4 years ago

Hi Joachim, this problem is already fixed with commit 5053e3c and will be part of the next release