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

Support for custom file extensions #11

Closed
apobekiaris opened this issue Sep 7, 2017 · 7 comments
Closed

Support for custom file extensions #11

apobekiaris opened this issue Sep 7, 2017 · 7 comments

Comments

@apobekiaris
Copy link

Hi

My msbuild files have a .build extension and I would like to use this tool, is it possible to configure somehow ?

@tintoy
Copy link
Owner

tintoy commented Sep 7, 2017

Yes! There is a command called "change language for file extension" - just change the language to "MSBuild". It's Ctrl-K M from memory.

@tintoy
Copy link
Owner

tintoy commented Sep 7, 2017

Thanks, I'll add that to the README, it's not obvious.

@apobekiaris
Copy link
Author

can you be a bit more specific I cannot locate this "change language for file extension" command. I tried to associate the .build with the msbuild language but I get

[Error - 11:15:18 PM] Unhandled exception in OnDidOpenTextDocument.
System.ArgumentException: Unexpected project file extension '.build'.
Parameter name: documentUri
at MSBuildProjectTools.LanguageServer.Documents.ProjectDocument..ctor(Workspace workspace, Uri documentUri, ILogger logger) in D:\Development\github\tintoy\msbuild-project-tools\src\LanguageServer.Engine\Documents\ProjectDocument.cs:line 97
at MSBuildProjectTools.LanguageServer.Documents.MasterProjectDocument..ctor(Workspace workspace, Uri documentUri, ILogger logger) in D:\Development\github\tintoy\msbuild-project-tools\src\LanguageServer.Engine\Documents\MasterProjectDocument.cs:line 46
at MSBuildProjectTools.LanguageServer.Documents.Workspace.<>c__DisplayClass20_0.b__0(Uri _) in D:\Development\github\tintoy\msbuild-project-tools\src\LanguageServer.Engine\Documents\Workspace.cs:line 135
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at MSBuildProjectTools.LanguageServer.Documents.Workspace.d__20.MoveNext() in D:\Development\github\tintoy\msbuild-project-tools\src\LanguageServer.Engine\Documents\Workspace.cs:line 130
--- End of stack trace from previous location where exception was thrown ---

@apobekiaris
Copy link
Author

found the command also but when i click on the MSBuild language i get the same exception i posted before. VsCode 1.16 x64

@tintoy
Copy link
Owner

tintoy commented Sep 7, 2017

Ouch! Sorry, that's a bug. I'll fix that right away - give me 10 mins or so.

@tintoy
Copy link
Owner

tintoy commented Sep 7, 2017

Ok - I've tested the fix and it looks like it works correctly now; would you mind updating the extension to v0.2.4 and letting me know if this fixes your problem?

BTW, the docs now show how to change file associations.

@apobekiaris
Copy link
Author

much better now many thnks!

wow first time in years I will actually be able to write msbuild scripts so productive. I wish this tool were available 10 years ago :). Great work!

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

No branches or pull requests

2 participants