C
C#2y ago
RDasher

✅ Adding class to .csproj file

Linux and command line user here. Is there an easier way to add a class to a .csproj file other than manually opening it in an editor and typing it out? are there some CLI tools to make this easier? or am I just gonna have to make my own? OS: Linux Editor: Visual Studio Code .NET Version: 7.0.1
8 Replies
pox
pox2y ago
What do you mean? What do want to add to the csproj file? You can create some dotnet specific things using dotnet new
RDasher
RDasherOP2y ago
Oh my god No pox, you're giving me too much credit, I actually thought that .cs files needed to be added to .csproj separately. But apparently the reason why there is nothing about this online is because just create a .cs file makes it automatically work catfacepalm
sibber
sibber2y ago
you dont add classes csproj
RDasher
RDasherOP2y ago
I could've sworn you had to add .cs classes to .csproj, was this always the case?
sibber
sibber2y ago
afaik
RDasher
RDasherOP2y ago
Ohhh, I figured out the cause of my confusion, at work, we work in a multi project solution, which is why we need to add the project references, I genuinely don't know how I've managed to make the connection of adding .csproj equals adding .cs Thanks peeps
sibber
sibber2y ago
oh lol np $close
MODiX
MODiX2y ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server