Provide custom value for VSHPROPID_PreferredLanguageSID with CPS
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.
Can you explain why this is needed?
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.
@davkean @natidea do you know if this is in Core CPS or here?
It is in CPS core, they don't provide a value for it or let us override it.
@lifengl - can you track for CPS?
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.
This has been fixed and will be present in 15.8 Preview 3.