Skip to content
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

The C# extension does not start unless *.cs file is opened or the workspace contains a project.json #1150

Closed
DustinCampbell opened this issue Jan 25, 2017 · 8 comments
Assignees

Comments

@DustinCampbell
Copy link
Member

It should also launch if the workspace contains an .sln or .csproj file.

@DustinCampbell DustinCampbell added this to the 1.7 milestone Jan 25, 2017
@DustinCampbell DustinCampbell self-assigned this Jan 25, 2017
@DustinCampbell
Copy link
Member Author

The simplest fix is blocked by microsoft/vscode#944.

@JerryNixon
Copy link

JerryNixon commented Jan 25, 2017

Here's a repro to creating the error message in Visual Studio Code. Please notice that the entire scenario takes place in the Visual Studio Code terminal. There is no cmd shell. This means opening a .cs file is not a certainty in the developer's workflow. Also, notice a .cs file is NEVER opened before a debug is attempted.

launch: launch.json must be configured. Change 'program' to the path to the executable file that you would like to debug

netcore

If the user manually edits the value of program in launch.json then this error can be resolved. The error message clearly states that. However, this manual extra step is certainly a confusing one in light of how automated the rest of the workflow is. I would also argue that such a path is prone to error.

workaround

Just switching into the project and also opening a .cs file will cause the tooling to handle this properly. This needs to be done prior to the first debugging session. Without question, the most subtle part in this workaround is that the developer needs to know not only to open a .cs file, but also wait for Visual Studio Code to offer to add the required files. This is a repro of that workaround, notice the pause.

netcore3

@DustinCampbell DustinCampbell modified the milestones: 1.8, 1.7 Feb 4, 2017
@DustinCampbell
Copy link
Member Author

Unfortunately, this won't make it for our 1.7 release as we're blocked waiting for changes to VS Code in support of this scenario.

@DustinCampbell
Copy link
Member Author

OK. Thanks to @eamodio's PR for VS Code, we're able to improve the experience here a bit. However, this particular repro is still problematic. Essentially, we can now update the extension to activate when the workspace contains a *.csproj or *.sln (using wildcards). However, that only activates an extension when a folder is opened. In this particular scenario, the folder is already open, so the extension still won't activate until you open a .cs file.

@eamodio
Copy link
Contributor

eamodio commented Jun 26, 2017

@DustinCampbell That is only because there was no other projects or anything opened beforehand to have the extension activate correct? FYI, microsoft/vscode#28122 is a feature request to have it detect when new files are added.

@DustinCampbell
Copy link
Member Author

Thanks for the pointer @eamodio! I think that would address this.

@akshita31
Copy link
Contributor

@DustinCampbell This is fixed now right ?

@JoeRobich
Copy link
Member

Closing as this is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants