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.
referencing other projects isn't that complicated but you also shouldn't split your code into multiple projects without good reason
Gotcha, i couldnt even think of a reason I would atm, other then an MVC project is different then a razor project, and im just making the same app i made in MVC in Razor pages atm
but that doesnt require referencing each other
technically you can do MVC and razor in the same project too
🤯
they're just different systems on top of ASP.NET Core
Gotcha, i got a long way to go before Im ready to leave my wordpress job for a .net job it seems xD
you can mix and match a lot of things just by wiring them up properly in the startup code
Gotcha, is there a way to create a project from start up that isnt using jquery and bootstrap? but instead something like tailwindcss?
i don't think there are any templates that use tailwind
ðŸ˜
doesn't stop you from replacing it yourself though
this is true, i was just hoping for a quick create project that scaffolds it since im lazy
i guess a lot of .net jobs require some bootstrap and jquery knowledge then? Since im sure not everyone out there is using react with .net api
you can use any frontend tech you want with ASP.NET Core
i don't use bootstrap or jquery at all, my web projects of late are blazor so i don't even need to directly touch JS most of the time