opened
cgibbons
username_0
My migration project is a netcoreapp2.1 application, using oracle.  The dotnet cli tool works fine, but when trying to execute the dll with Migrate.dll I get the following error.  This error is happening on a windows machine.  

!!! Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Some of the migrations are successful, but it's a particular one that fails.

It seems only migrations that do "Insert.IntoTable" are failing.
Exception when executing netcoreapp2.1 build migration project with Migrate.exe
issue
created
fubar-coder
username_1
The migrate tool is targeting .NET Core 2.0. I hope that a simple retargeting should fix this problem. The workaround is to put the migrations in a separate assembly that target .NET Standard 2.0.
comment
created
cgibbons
username_0
That fixed it changing it to a netstandard2.0 project.  So should migration projects be netstandard libraries and not netcoreapp projects?
comment
closed
fubar-coder
username_1
issue
created
fubar-coder
username_1
Yes, migration projects should be .NET Standard projects unless you're using in-process migrations (read: without using the external migration runners).
comment