I was adding a migration in my ASP.NET Core project using EF Core 2.0. I ran the 'Add-Migration 'migrationName` command in my package manager console. The migration was successfully added to my migrations folder, however, while trying to update the snapshot I got this error:
Access to the path 'C:\path\to\snapshot\DbContextModelSnapshot.cs' is denied.
Right now I have a new migration in my migration folder but an old snapshot because it can't be updated at the moment. The migrations are saved in the same folder as the snapshot and all users have read/write access to the folder.
How do I fix this?