C
C#5mo ago
DaMango

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
DaMango
DaMangoOP5mo ago
I have absolutely 0 background in dotnet/c#, only really ever used javascript and c/c++ so I am in very unfamiliar territory
reflectronic
reflectronic5mo ago
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
DaMango
DaMangoOP5mo ago
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?
Angius
Angius5mo ago
In general, the "main" project will usually eb runnable, so will contain a Main() method in a Program.cs file
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
DaMango
DaMangoOP5mo ago
it looks like the actual error when building what i believe to be the correct project file is:
error EXTEXP0001: 'Microsoft.Extensions.Http.Resilience.ResilienceHandler' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
error EXTEXP0001: 'Microsoft.Extensions.Http.Resilience.ResilienceHandler' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
do i need to pull down the packages/libraries first and then run dotnet build? any ideas regarding suppressing the build error?
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
reflectronic
reflectronic5mo ago
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
Want results from more Discord servers?
Add your server