Deploying ASP.NET Core with EF migrations to Azure

asp.net-core entity-framework-core

Question

When trying to publish a asp.net core 1.0.1 project using EF to Azure, I get an error:

System.InvalidOperationException: The migration 'Björk\AppData\Local\Temp\PublishTemp\obj\....ApplicationDbContext.sql' was not found.

It works fine if I uncheck the "Apply this migration on publish", but of course the database will not be updated accordingly if I don't check that box.

This should probably be a bug report and not a stackoverflow question... :)

1
1
11/3/2016 3:02:42 PM

Accepted Answer

The issue is probably in the path, the swedish letter "ö" caused an issue.

Workaround:

Uncheck the "Apply this migration on publish" so that you are able to publish everything except migrations from your normal account. Make a new account/profile on your PC without any non-english letters. Login to that account and publish your project every time you have a pending migration.

0
11/3/2016 3:02:42 PM

Popular Answer

I reached out to someone on the team, and it looks like this is a known issue that will be fixed in VS "15". Until then, you can download the latest version of publish-module.psm1 which includes the fix.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow