Base solution for your next web application
Open Closed

Migrator project does not produce console app #3253


User avatar
0
antonis created

Hi,

Trying to deploy on production and Migrator tool does not produce a console exe files but rather only dlls


11 Answer(s)
  • User Avatar
    0
    antonis created

    I set my startup project to .Migrator build then I got to the Release folder of the Migrator project and I only see dlls. no Exe files

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @antonis,

    It is because Migrator project has

    <TargetFramework>netcoreapp1.1</TargetFramework>
    

    by default. If you want to use *.exe, you can change it to

    <TargetFramework>net461</TargetFramework>
    

    or you can run current output as explained here <a class="postlink" href="https://github.com/dotnet/core/issues/77">https://github.com/dotnet/core/issues/77</a>

    Thanks.

  • User Avatar
    0
    antonis created

    Thank you for the reply.

  • User Avatar
    0
    antonis created

    I run

    C:\Temp\netcoreapp1.1>dotnet MyApp.Migrator.dll

    and I get following error

    Error: assembly specified in the dependencies manifest was not found -- package: 'abp.automapper', version: '2.0.1', path: 'lib/netstandard1.6/Abp.AutoMapper.dll'

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I have tried and it is working for me in that way. Can you check dotnet version by command "dotnet --version" ? My version is 1.0.3.

    Thanks.

  • User Avatar
    0
    antonis created

    My version is 1.0.4 but I dont think that this is causing the problem. Here is what I did. I set the Migrator project as startup project build and then in the folder Release folder of the Migrator project I only see the files in the attachment.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You are right, it is not related. You need to publish Migrator project just like a web project.

    Right click Migrator project on VS and select publish. Then "dotnet MyProjectName.**.dll" should work.

    Thanks.

  • User Avatar
    0
    antonis created

    Thanks a lot. That did the trick.

    Please consider writing a guide on how to publish to production. It will be very useful. Not just for database migration but for the entire process. client, server database etc..

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @antonis,

    Thanks for your feedback. We are thinking to create such a document because there was many requests on this.

    Thanks.

  • User Avatar
    0
    geek1913 created

    hey @antonis,

    did you figure out how to work the migrator command into your VSTS CI\CD? I found this thread by running down the same issue as you (no exe produced), and saw you had the same goal. Just curious what you did in the build\release config to handle the database updates.

    thx.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @geek1913,

    If you are usig .Net Core, have you tried to publishing your migrator app ?