-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kindly document in a prominent place that a sln-file is needed for much of the functionality to work #7683
Comments
@emmenlau Are you also using the C# DevKit? C# extension on its own shouldn't require a solution file as it will load all the .csproj files in the repo. When the DevKit is installed it takes over project loading responsibilities and its behavior differs from the C# extension. We are also trying to make it more apparent when you are working on files outside the open workspace (solution or project files). Would a notification such as the one added in this PR (#7652) have helped you? |
Yes, actually I'm also using the C# DevKit. Maybe that added to the confusion. With this insight, I think my feature request applies more to C# DevKit than to the C# extension.
This notification would have helped, yes. However, it would only have cut my debugging time from something like 5 hours to maybe 2 or 3 hours. My challenge was, that I would never have assumed for the extension to load a random sln file in a subdirectory. Even more so, because this sln-file is only used by the CI system, and does not even correctly load outside the CI. In my humble opinion, the auto-loading of sln-files should be a lot more transparent. Something like the following notification message would have greatly helped:
In the linked documentation, I guess multiple questions could/should be addressed:
|
cc @webreidi - do we have documentation on this for C# Dev Kit? |
Is your feature request related to a problem? Please describe.
For several hours, I could not get intellisense working in the C# extension, and there was no helpful setting or error message to the rescue. By pure chance, and after hours of googling, I found that a sln-file may help. After using
dotnet new sln
anddotnet sln add ...path/to/all/relevant/csproj
, intellisense started working!!!My setup is so that I have a project that uses mostly
csproj
files, but also two or three dedicatedsln
files buried in subdirectories. One of these sln-files is exclusively used in CI tests. It points to a sub-project, that is not meant to be built or used in VSCode. This sub-project only works correctly (i.e. can only do anutget restore
) when used inside of our CI system.I think this additional sln-file may be related to the problem I was having. This is because I'm under the impression that the C# extension tried to load one or more of the sln-files in subdirectories and then failed to correctly index my project(?)
Describe the solution you would like
It would be great if this could be better documented on the front page of the C# extension. Possibly, there could also be better error or logging messages?. I'm not sure which of the following two applies:
Applicable Scenarios
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: