How to identify the correct .sln or .csproj file to build?
I was looking at building an existing project at work that has multiple
.sln
and .csproj
files. However, I don't know which one i should be using. There is no documentation and the person I would ask is out on vacation for a week. I also want to try building/developing the project in VS Code instead of visual studio. I know its dumb, but i feel more comfortable knowing what cli commands are running instead of letting an IDE manage it. Eventually when I get more comfortable with dotnet and c# I imagine it would be good to use Visual Studio.
How can I identify which file(s) to build and run? Is there likely an overarching one? I tried using dotnet build <insert_file>
and dotnet run
and it keeps saying theres too many .sln
and .csproj
files to choose from. When I select or build a couple individually then try to run, it still doesn't work...
Are those the correct commands I should be running for local development? Where should I be looking to see which project file to build?8 Replies
I have absolutely 0 background in dotnet/c#, only really ever used javascript and c/c++ so I am in very unfamiliar territory
it is hard to say without knowing anything about what they are
can you give more details about what doesn’t work exactly when you try building some solution
i can't post the code unfortunately, but i think the issue is i dont know what to target with dotnet build/dotnet run
the error i get is something related to msbuild and there being too many project files to run?
In general, the "main" project will usually eb runnable, so will contain a
Main()
method in a Program.cs
fileUnknown User•5mo ago
Message Not Public
Sign In & Join Server To View
it looks like the actual error when building what i believe to be the correct project file is:
do i need to pull down the packages/libraries first and then run
dotnet build
?
any ideas regarding suppressing the build error?Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
yeah, the diagnostic is supposed to be suppressed
the error is there so that someone has to explicitly acknowledge it and disable it
if someone did not do that then it is not supposed to work
if you search through the repo is there a mention of
EXTEXP0001
anywhere?
like, if you grep through it