C
C#3y 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
pox3y 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
RDasherOP3y 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
sibber3y ago
you dont add classes csproj
RDasher
RDasherOP3y ago
I could've sworn you had to add .cs classes to .csproj, was this always the case?
sibber
sibber3y ago
afaik
RDasher
RDasherOP3y 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
sibber3y ago
oh lol np $close
MODiX
MODiX3y ago
Use the /close command to mark a forum thread as answered

Did you find this page helpful?