✅ what is the .csproj file and why is it important
Hello, can someone confirm the following pls:
From what I've read, a .csproj is a file which shows us how our project is organized, like which libraries we have.
I was wondering what else does it do? Why is it important pls. Is it the same thing that we have in java? Like the maven thing?
8 Replies
think of the csproj as a configurationfile for the compiler.
it defines which sourcefiles need to be compiled, how they need compiled, which dependencies they have and provides flags to adjust the behaviour of the compiler.
there are different "templates" of the csproj. selected by the sdk property in the project tag
eg.
Microsoft.NET.Sdk
or
Microsoft.NET.Sdk.WindowsDesktop
that either compiles are relativ basic bin or includes windows binaries to be able to create wpf/winforms apps
there are many other things you can adjust
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
The MSBuild thing is the engine that parses our .csjproj file ?
Like it resolves which packages do we have, etc?
MSBuild is the program that is invoked to build (compile) your project.
yeah, I think build and compile are 2 different things
but yeah MSBuild does intruct how the compiler should work I think
Fair enough. "Compile" is a specific step in the overall "build" process, which includes other things such as the preprocessor, dependency resolution, etc
yep I see, ty
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View