How to create migrations in rider, when you have multiple projects in one Solution?
When I use the GUI I get this and I don't know what it means No Target Framework when the Target Framework in my CS Proj is net8.0
28 Replies
it's asking about your startup project, which you didn't select yet
Oh thats because it doesnt list anything there
Rider doesnt seem to have an option like Visual Studio where u can right click and do set as start up project.
looks like it has a link below the box for help if the project isn't listed
you could also just use the CLI tools, that's usually what i do
I couldnt figure out how to get the command to work when u have multiple projects, in a solution lol, thats how iw as doing everything prior to trying to have a 2nd project tho
the CLI tool has the same options the UI does (actually more, the UI is just a simplified way to use the same tool)
hmm maybe im confused, is the CLI tool not typing dotnet <insert_command>
dotnet ef migrations add
is the specific tool being used hereBut dont you also have to add more flags? since you would need to also say which dbcontext and which start up project you want to use?
since i have these 2 projects in the solution
it depends
check the options with
--help
i see, so if im in the root solution folder in my case bulky. Can I just cd into the actual project folder and then just run these commands with out the extra flags ?
correct, if you don't actually need to involve the other project then the defaults will work
those options are more for when you start putting your dbcontext in a separate project or need to do other customization
Ok, yeah im super new to .NET lol, comign for Js/Ts and Php and this is solution stuff is wild to me lol
But i assume having projects referencing other projects is a little more advanced then where i am at now.
a solution is really just a way for the IDE to load more than 1 project at once, it doesn't do much
i was just trying to build simple MVC project then see what razor pages were all about lol.