Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

4.1.3 Template for .Net Core / Angular won't create database #3478


User avatar
0
brallierc created

I just downloaded a fresh 4.1.3 template for ASP.NET Core and Angular using the .NET Core 1.1 framework.

With no modifications other than the config settings for the database connection string the database is not getting created using the Migrator or using Package Manager Console "Update-Database" command.

The solution builds, though oddly the migrator executable file is not created.

I followed the instructions from the Getting Started guide, is there something missing?


9 Answer(s)
  • User Avatar
    0
    brallierc created

    If I download and use the .Net framework 4.6.1 version of the template I do not have the same problem.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @brallierc,

    Did you run Migrator tool using Visual Studio ?

    Thanks.

  • User Avatar
    0
    brallierc created

    Yes I tried running it from inside visual studio, it builds with no errors, but the output directory doesn't have an executable like the one from the .Net 4.6.1 framework version

  • User Avatar
    0
    alper created
    Support Team

    Migrator has it's own db settings. Did you configure it in appsettings.json file?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @brallierc,

    Yes, it does not contain executables in bin directory. If you need executables, you need to publish Migrator project just like a ASP.NET Website using Visual studio.

    Thanks.

  • User Avatar
    0
    brallierc created

    Yes I did edit the appSettings to use the correct db connection string. Before anyone else asks me more questions, has anyone downloaded the latest template and made it work. I have tested it from 3 different computers, all have the same result, the migrator does not open the console window and update-database does not work.

    Whenever I have ran migrator in the past, when the migrator project compiles it creates a <projectname>.migrator.exe, this template is not creating that file.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @brallierc,

    Yes, we have tried it. Once again, .Net Core version does not create <projectname>.migrator.exe in debug mode, this is the expected behaviour. What happens when you right click Migrator project on Visual Studio and select "Debug > Start new instance" ? It should open a console application.

    From my previous post:

    If you need executables, you need to publish Migrator project just like a ASP.NET Website using Visual studio.

  • User Avatar
    0
    brallierc created

    Well it doesn't open a console application... also... UpdateDatabase from the package manager console doesn't work either.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @brallierc,

    Do you work on windows environment ? Do you use Visual Studio 2017 ?

    If both answers are yes, we can try to help you with a remote connection. Please contact to <a href="mailto:[email protected]">[email protected]</a> to set up meeting details.

    Thanks.