C
C#•4mo 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•4mo ago
it's asking about your startup project, which you didn't select yet
Cydo
CydoOP•4mo 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•4mo 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
CydoOP•4mo 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•4mo 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
CydoOP•4mo ago
hmm maybe im confused, is the CLI tool not typing dotnet <insert_command>
Jimmacle
Jimmacle•4mo ago
dotnet ef migrations add is the specific tool being used here
Cydo
CydoOP•4mo 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
CydoOP•4mo ago
since i have these 2 projects in the solution
No description
Jimmacle
Jimmacle•4mo ago
it depends check the options with --help
Cydo
CydoOP•4mo 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•4mo 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
CydoOP•4mo 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•4mo 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
CydoOP•4mo ago
i was just trying to build simple MVC project then see what razor pages were all about lol.
Jimmacle
Jimmacle•4mo ago
referencing other projects isn't that complicated but you also shouldn't split your code into multiple projects without good reason
Cydo
CydoOP•4mo ago
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
Jimmacle
Jimmacle•4mo ago
technically you can do MVC and razor in the same project too
Cydo
CydoOP•4mo ago
🤯
Jimmacle
Jimmacle•4mo ago
they're just different systems on top of ASP.NET Core
Cydo
CydoOP•4mo ago
Gotcha, i got a long way to go before Im ready to leave my wordpress job for a .net job it seems xD
Jimmacle
Jimmacle•4mo ago
you can mix and match a lot of things just by wiring them up properly in the startup code
Cydo
CydoOP•4mo ago
Gotcha, is there a way to create a project from start up that isnt using jquery and bootstrap? but instead something like tailwindcss?
Jimmacle
Jimmacle•4mo ago
i don't think there are any templates that use tailwind
Cydo
CydoOP•4mo ago
😭
Jimmacle
Jimmacle•4mo ago
doesn't stop you from replacing it yourself though
Cydo
CydoOP•4mo ago
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
Jimmacle
Jimmacle•4mo ago
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
Want results from more Discord servers?
Add your server