in

The ORM Foundation

Get the facts!

Broken ORMGeneratorSettings in Visual Studio 2019

Last post Fri, Jun 3 2022 2:43 by jgfish. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • Thu, Jun 2 2022 22:09

    • jgfish
    • Top 500 Contributor
    • Joined on Tue, May 24 2022
    • Posts 2

    Broken ORMGeneratorSettings in Visual Studio 2019

     Hi,

    I'm following the NORMA Lab1 instructions on DDL generation, and encountered this problem. The instructions said that the ORMGeneratorSettings should appear at the bottom right of the properties for the added .orm file (which I was able to add successfully into the project via "Add Existing Item"), with the "..." button which upon clicking should load the ORM Generator Selection dialog. However, when I clicked it, all I got was this error dialog with the message "Object reference not set to the instance of an object". So basically I'm unable to generate DDL code, and I'm stuck at this point.

     I've followed all the previous installation instructions correctly, uninstalled and reinstalled the NORMA tools in Visual Studio 2019 with the files provided to me in the email, and running the setup.bat file as administrator. Everything else seems to work fine. It seems like the generator is giving problems. Attached are some screenshots detailing the issues I've discussed.

     Thanks,

    John G 


  • Thu, Jun 2 2022 22:57 In reply to

    Re: Broken ORMGeneratorSettings in Visual Studio 2019

    You need to make sure you're working in a .NET Framework project to run the custom tool, not .NET Standard or .NET Core. The generator isn't currently supported in the other project types. If you see 'Dependencies' in the solution explorer then you're not in the right project type.

    While I'd like to have this running there it relies heavily on the classic project system to magically turn the IVsSingleFileGenerator support into generation of an arbitrary number of files. As far as core VS is concerned only the _ORMCustomToolReport file is generated to the tool, the rest is done behind the scenes using extension points that are not available in the new project types--despite the projects and file nodes return exactly the same project type identifiers.

  • Fri, Jun 3 2022 2:43 In reply to

    • jgfish
    • Top 500 Contributor
    • Joined on Tue, May 24 2022
    • Posts 2

    Re: Broken ORMGeneratorSettings in Visual Studio 2019

     Ok I see, thanks for your advice Matthew! I tried creating a new project with .NET Framework 4.7, and the problem went away. I do hope that this code/DDL generation feature can work with .NET Core sometime in the future.

Page 1 of 1 (3 items)
© 2008-2024 ------- Terms of Service