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

Can't format C# code #1918

Closed
gongxic opened this issue Jan 11, 2016 · 10 comments
Closed

Can't format C# code #1918

gongxic opened this issue Jan 11, 2016 · 10 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@gongxic
Copy link

gongxic commented Jan 11, 2016

version 0.10.6
image 032

@isidorn
Copy link
Contributor

isidorn commented Jan 11, 2016

Not sure if we support C# formating, joh?

@jrieken jrieken added the info-needed Issue requires more information from poster label Jan 12, 2016
@jrieken
Copy link
Member

jrieken commented Jan 12, 2016

@Darktutu What does the OmniSharp log read (press Cmd+L, L)?

@gongxic
Copy link
Author

gongxic commented Jan 13, 2016

@jrieken nothing in omnisharp log

@jrieken
Copy link
Member

jrieken commented Jan 13, 2016

do you have a project.json file or a set of csproj/sln files? otherwise it won't work

@FaicSilier
Copy link

Hello, I have kind of the same problem with formatting javascript: Nothing happens if I format it.

How can I add a project.json file or set a csproj/sln file so that formatting works. (as a suggestion: would be great if you wouldn't need to create files to format code)

@jrieken
Copy link
Member

jrieken commented Jan 19, 2016

@FaicSilier JavaScript is independent of that. If you see issue with formatting JS please file a separate bug

@gongxic
Copy link
Author

gongxic commented Jan 20, 2016

@jrieken I open a solution. but it didn't work。is vscode support c# format ?

@jrieken
Copy link
Member

jrieken commented Jan 20, 2016

@Darktutu What does the OmniSharp log read (press Cmd+L, L)? It should not be empty

@jrieken
Copy link
Member

jrieken commented Jan 20, 2016

This issue was moved to dotnet/vscode-csharp#5

@jrieken jrieken closed this as completed Jan 20, 2016
@deadlyfingers
Copy link

For others encountering the same issue in VSCode on a Mac with the "Format Document" command missing when editing C# script try adding a "project.json" file in the root project folder with a version tag worked as suggested by @jrieken

{
  "version": "1.0.0"
}

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants