Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Commands: show better error when executing on a UWP class library #5878
One of my apps i was trying to upgrade from RC1 to RTM i hit a issue with a refence not set to an instance error when running "Add-Migration". I start to make a new project with the same structure to figure out what is going on, but before i was able to come to that state hitting another issue:
When doing "Add-Migration InitialDB" I get this exception:
I added a repro project. You need to set the EFTest.Model as startup project and default project
changed the title
Add-Migration results in Exception calling "CreateInstanceAndUnwrap" with "8" argument(s):
Jun 27, 2016
Confirmed this is an issue. It happens when a UWP class library project is marked as the "startup" project. MSBuild for UWP csproj does not copy dependencies into build target dir (bin/) so the powershell commands cannot execute.
Set the UWP app as the Startup project (right click on project > Set as StartUp project) or use the
@natemcmaster this workaround doesn't work for me. I think it is because my data part is in this library. So when I try to run the command line with the UWP app as startup project, I get this error:
EDIT: it works adding an app.config file as it is suggested here #5471
And this error is back on UWP with the latest tools (1.1.0-preview4-final). Our client's patient is getting really thin by the continued delays caused by EF Core. It's sad to see these tools are so fragile and lack a correct guide to follow.
Returned to our old configuration to re-enable migrations: