You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered a problem while trying to execute dotnet ef migrations add [migration_name] command.
While creating new project in Visual Studio 2019, I've marked an option "Place solution and project in the same directory". Here is how my project structure looks like:
When I try to execute above mentioned command, I receive this message:
λ dotnet ef migrations add migrationname
Specify which project file to use because this 'C:\Users\piotr\Desktop\webserver\blazor_app' contains more than one project file.
It makes sense, since I've got BlazorApp1.csproj and docker-compose.dcproj which are project files in the same folder. But at the same time there is no way to specify which project I want to use. People on the internet recommend to use -p and -s arguments, but documentation says that those arguments can specify path to the project folder not project file.
Nonetheless I tried to use them in such way, but with no luck.
C:\Users\piotr\Desktop\webserver\blazor -> origin_app (blazor -> origin)
λ dotnet ef -p BlazorApp1.csproj
Specify which project file to use because this 'C:\Users\piotr\Desktop\webserver\blazor_app' contains more than one project file.
C:\Users\piotr\Desktop\webserver\blazor -> origin_app (blazor -> origin)
λ dotnet ef -p BlazorApp1.csproj -s BlazorApp1.csproj
Specify which project file to use because this 'C:\Users\piotr\Desktop\webserver\blazor_app' contains more than one project file.
It's also worth noting I couldn't even view help to see possible parameters I could use because of this error:
λ dotnet ef --help
Specify which project file to use because this 'C:\Users\piotr\Desktop\webserver\blazor_app' contains more than one project file.
Summing up, a few things, in my opinion, should be fixed:
add parameter to specify which project I want to use for migration
OR remove "Place solution and project in the same directory" option from Visual Studio if it creates illegal project structure
allow to view CLI help regardless of error
The text was updated successfully, but these errors were encountered:
I've encountered a problem while trying to execute
dotnet ef migrations add [migration_name]
command.While creating new project in Visual Studio 2019, I've marked an option "Place solution and project in the same directory". Here is how my project structure looks like:
When I try to execute above mentioned command, I receive this message:
It makes sense, since I've got
BlazorApp1.csproj
anddocker-compose.dcproj
which are project files in the same folder. But at the same time there is no way to specify which project I want to use.People on the internet recommend to use
-p
and-s
arguments, but documentation says that those arguments can specify path to the project folder not project file.Nonetheless I tried to use them in such way, but with no luck.
It's also worth noting I couldn't even view help to see possible parameters I could use because of this error:
Summing up, a few things, in my opinion, should be fixed:
The text was updated successfully, but these errors were encountered: