Repository navigation
Add special handling for CPS project properties - #1338
Conversation
| <DataSource Persistence="ProjectFile" HasConfigurationCondition="True" /> | ||
| </Rule.DataSource> | ||
|
|
||
| <StringProperty Name="ApplicationIcon" DisplayName="Application Icon" Visible="True" /> |
There was a problem hiding this comment.
Can we make this rule only have properties that are actually configuration-specific and remove those from GeneralBrowseObject?
There was a problem hiding this comment.
We'll also need to run @nguerrera's loc tool to generate the localized XAML rules as well. The tool is in https://github.com/nguerrera/xliff-converter with instruction to run in the readme. To make sure we are not doubling the number of strings, please run after you refactor the properties from the generalbrowseobject to this new rule.
| </Rule.Categories> | ||
|
|
||
| <Rule.DataSource> | ||
| <DataSource Persistence="ProjectFile" HasConfigurationCondition="True" /> |
There was a problem hiding this comment.
All the DataSources need a SourceOfDefaultValue="AfterContext" attribute. See this PR for details- https://github.com/dotnet/roslyn-project-system/pull/1267/files #Resolved
|
Tagging @dotnet/project-system as well. |
|
Now we just need code reviews and @MattGertz approval. Code reviews... anyone? |
|
Per yesterday's new sky-high bar, hand-editing the project file is now an acceptable workaround. Let's insert this into 15.1 instead. |
|
@MattGertz The other half of this fix was already accepted yesterday into CPS. |
There was a problem hiding this comment.
This is resetting already translated strings. If we were doing this post RTW, a hand-off/handback cycle would recycle them. If we do it now, then we need to find a workaround, which I think would be: copy GeneralBrowseObject.*.xlf to GeneralConfiguredBrowseObject.*.xlf and rerun tool.
|
Ah, I didn't realize that those two linked up. Thanks for the clarification. Approved to bring. |
|
@nguerrera I've done as you've suggested, but the files still include new strings. A couple still seem to be in error, as they already have a translation but the xlf generator didn't think so. That I can probably fix by hand. However, the biggest problem is I've added a missing property to the file, and that doesn't have an existing translation. |
|
@nguerrera Okay, I've removed the new property for RTM. It is not necessary for dotnet core. That means there are no new translated strings now. |
|
You need the --two-way on the converter to regenerate the localized xaml files from xlf. |
|
Hurray! |
nguerrera
left a comment
There was a problem hiding this comment.
Sorry, the new file has to be added to setup authoring too.
| <DependentUpon>GeneralBrowseObject.xaml</DependentUpon> | ||
| </Compile> | ||
| <Compile Include="ProjectSystem\Rules\ConfiguredBrowseObject.cs"> | ||
| <DependentUpon>GeneralConfiguredBrowseObject.xaml</DependentUpon> |
There was a problem hiding this comment.
How come these file names don`t line up like the others?
There was a problem hiding this comment.
Not sure they have to. Look inside the .cs files and notice even more horror.
There was a problem hiding this comment.
Afaict the class inside the .cs file is named after the Rule name inside the xaml file. I chose to have the file name match the class name inside instead of matching the xaml file name. If you know otherwise, please enlighten me.
There was a problem hiding this comment.
I'm not the expert here. It just seemed all the others were 1:1:1 for class name/file name/xaml name at quick and naive glance. Is that not in fact the case already elsewhere?
|
Approved to merge via 375362 |
Customer scenario
The dotnet core project property pages that should operate as configuration/platform dependent are operating as configuation/platform independent and so it is not possible to correctly edit project settings.
This change enables the associated C# and VB property pages to operate as configuration specific pages. There is an additional CPS rule added that is just a duplicate of the non-configuration specific version (CPS needs them to be separate). There is also a temporary fix to bridge the differences between how CPS defines/uses property descriptors and how the property page code expects them to work, that is only enabled for projects handled by CPS (dotnet core).
Bugs this fixes:
#413
This fix is dependent on https://mseng.visualstudio.com/VSIDEProj/_git/VSIDEProj.CPS/pullrequest/178637?_a=overview being accepted.
Workarounds, if any
No work arounds, other than having customers edit project files manually.
Risk
There is risk that the fix does not thoroughly fix the problem, but even a mostly correct solution is better that the current state.
Performance impact
Low/None
Is this a regression from a previous update?
No, this is a new feature area.
Root cause analysis:
Missing legacy feature capability in CPS.
How was the bug found?
Ad hoc usage/testing.