question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running fluentmigrator from linux, is mono still required? .net core?

See original GitHub issue

Describe the question Is using ‘mono’ still the only way to get fluentmigrator running in Linux? I have a use case where I need to run it in a linux container from a ci/cd pipeline. I see mention of supporting .net core in past github issues, can the project be built and run using .net core without mono now?

These steps in a Dockerfile seem to work to get the Migrate.exe to run, I’m just wondering if there is a better way to do this.

RUN echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial main" > /etc/apt/sources.list.d/mono-official.list \
  && apt-get update \
  && apt-get install -y mono-runtime binutils curl mono-devel nuget unzip \
  && rm -rf /var/lib/apt/lists/* /tmp/*

RUN mkdir /tmp/FluentMigrator.Tools \
 && nuget install FluentMigrator.Tools -Version 3.2.9 -OutputDirectory /tmp/FluentMigrator.Tools/ \
 && mv /tmp/FluentMigrator.Tools/FluentMigrator.Tools.3.2.9/tools /usr/local/bin/FluentMigrator.Tools \
 && rm -rf /tmp/FluentMigrator.Tools`

Documentation Pages You’ve Read So Far https://fluentmigrator.github.io/articles/guides/contribution.html#linux-macos https://github.com/fluentmigrator/fluentmigrator/issues/712 https://github.com/fluentmigrator/fluentmigrator/issues/1039

Expected benefit The ci/cd system I must use supports only linux containers for build/deploy operations, I am looking for the most optimal way to build and run fluentmigrator in this context.

Information (please complete the following information):

  • Database target is Azure SQL
  • Linux containers to be based on ubuntu

Additional context n/a

Thanks!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jzabroskicommented, Feb 19, 2021

Fun fact, I’ve tried to use in .NET 5 project with FM tools and I got some problem relate with System.Runtime, so for migrations is recommend use .NET Standard 2.0.

@lillo42 The fix for this issue will go out today in v3.2.15

1reaction
lillo42commented, Jan 14, 2021

At home I used Linux Ubuntu 20.04 and I don’t have a problem to run FluentMigrator in linux, but to run FluentMigrator I had develop my own tool(where a can just run without any parameters and this tool have a reference to my projects who have my migrations) and it`s run wells.

I will take a look if dotnet tools work fine in linux

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does Fluent Migrator work with .net core app?
This post would suggest that yes it does work, I don't have a huge amount of experience with fluent migrator but if i...
Read more >
Future of Mono after .NET Core/.NET 5 : r/dotnet
I expect Mono's still gonna exist but only on parts where CoreCLR doesn't support outright (e.g. iOS, Tizen, Unity etc...). Other than that...
Read more >
FAQ | FluentMigrator documentation
NET Core / .NET 5 database driver. How can I run migrations safely from multiple application servers? Many server-side applications are load balanced...
Read more >
Build Your Open Source .NET Project On Travis CI - danlimerick
Being a core committer for FluentMigrator, an OSS .NET project ... Travis CI runs on Ubuntu Linux so before running this script .NET/Mono...
Read more >
Serene Running on a Mac
FluentMigrator is one of those which is not ported to .NET Core yet, so no migrations. You'll need to use an existing database...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found