Open pepone opened 2 years ago
Hi @pepone, apologies for the delay in responding here. We generally track issues related to this UI in the dotnet/project-system repo.
@tmeschter, do you have a sense of what's going on here? Would you expect values in ItemDefinitionGroup
s to be picked up? I don't think I've seen an example of a XAML DataSource
having an ItemType
before.
The short answer is that we're in unexplored territory here. We didn't design the system with ItemDefinitionGroups
in mind and we haven't tested this scenario.
The longer answer is that reading or writing property values in CPS is always done in some context (defined by the IProjectPropertiesContext
type) that tells us where to look for those properties. The context can represent things like:
The Rule
file makes it clear that you want to read and write properties to the "SliceCompile" ItemDefinitionGroup
in the main project file. The problem is that the project properties UI always works in a context representing project-level properties in the main project file. So there's a mismatch here, and I'm not sure what the correct behavior should be.
Hi,
I have created a custom property page as documented in https://github.com/dotnet/project-system/blob/main/docs/repo/property-pages/how-to-add-a-new-project-property-page.md#option-1-xaml-file-on-diskg
See: https://github.com/zeroc-ice/ice-builder-msbuild/blob/fcaa91b6c2a0ddff40b1d7931baddd914568728b/msbuild/SliceCompile.CSharp.xaml
The default value for
OutputDir
is defined in https://github.com/zeroc-ice/ice-builder-msbuild/blob/fcaa91b6c2a0ddff40b1d7931baddd914568728b/msbuild/zeroc.icebuilder.msbuild.csharp.props#L4-L9When the property page is render the Output Directory field is empty and is expanded value is rendered below
I would expect that the default value
$(MSBuildProjectDirectory)\generated
would be rendered in the field.Then if I add a value to any of the other properties, and reload the property page, the default value is now rendered in the field
The only modification I see on the project file when editing the
IncludeDirectories
isAny ideas why the rendering of the default values is behaving differently here?