Access denied to ContextModelSnapshot while migrating
I wild guess: You have your solution under TFS source control, with server workspace. After you initially checked in your code, the file became read-only. Seems like PM doesn't checkout the files (or add the migration files) to source control automatically. So in order to fix this: Before running the command, checkout the snapshot, and after running the migration add the newly generated files to source control.