C
C#•2mo ago
Cydo

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
No description
28 Replies
Jimmacle
Jimmacle•2mo ago
it's asking about your startup project, which you didn't select yet
Cydo
Cydo•2mo ago
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.
Jimmacle
Jimmacle•2mo ago
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
Cydo
Cydo•2mo ago
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
Jimmacle
Jimmacle•2mo ago
the CLI tool has the same options the UI does (actually more, the UI is just a simplified way to use the same tool)
Cydo
Cydo•2mo ago
hmm maybe im confused, is the CLI tool not typing dotnet <insert_command>
Jimmacle
Jimmacle•2mo ago
dotnet ef migrations add is the specific tool being used here
Cydo
Cydo•2mo ago
But 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?
Cydo
Cydo•2mo ago
since i have these 2 projects in the solution
No description
Jimmacle
Jimmacle•2mo ago
it depends check the options with --help
Cydo
Cydo•2mo ago
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 ?
Jimmacle
Jimmacle•2mo ago
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
Cydo
Cydo•2mo ago
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.
Jimmacle
Jimmacle•2mo ago
a solution is really just a way for the IDE to load more than 1 project at once, it doesn't do much
Cydo
Cydo•2mo ago
i was just trying to build simple MVC project then see what razor pages were all about lol.
Want results from more Discord servers?
Add your server