project-system icon indicating copy to clipboard operation
project-system copied to clipboard

Provide custom value for VSHPROPID_PreferredLanguageSID with CPS

Open viktoriad opened this issue 9 years ago • 7 comments

Now there is no ability to provide VSHPROPID_PreferredLanguageSID guid with new CPS. When opening WPF xaml file, VS asks several time for this.hierarchy.GetGuidProperty(4294967294U, -2054, out pguid) where -2054 is VSHPROPID_PreferredLanguageSID property. Right now my project system always returns empty guid for it.

viktoriad avatar Oct 09 '17 12:10 viktoriad

Can you explain why this is needed?

Pilchie avatar Oct 11 '17 00:10 Pilchie

WPF designer searches for preffered extensions and code-behind file, and while searching for it, it asks for that property several time. Since it returns empty guid, it doesn't select any preffered extensions, and fails to find the code-behind file for my WPF designer. If you need more details, I can open the decompiled dlls and give you the exact place and code where it asks.

viktoriad avatar Oct 12 '17 13:10 viktoriad

@davkean @natidea do you know if this is in Core CPS or here?

Pilchie avatar Oct 12 '17 14:10 Pilchie

It is in CPS core, they don't provide a value for it or let us override it.

davkean avatar Oct 13 '17 01:10 davkean

@lifengl - can you track for CPS?

Pilchie avatar Dec 22 '17 20:12 Pilchie

Microsofties, implemented here: https://devdiv.visualstudio.com/DevDiv/Default/_git/CPS/pullrequest/123389?_a=overview.

@viktoriad To implement, set LanguageServiceId to your language service similar to: https://github.com/dotnet/project-system/blob/master/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DesignTimeTargets/Microsoft.CSharp.DesignTime.targets#L17.

davkean avatar May 18 '18 03:05 davkean

This has been fixed and will be present in 15.8 Preview 3.

davkean avatar May 21 '18 00:05 davkean