Meziantou.Polyfill icon indicating copy to clipboard operation
Meziantou.Polyfill copied to clipboard

Setting a type as design-time data context of a XAML control will cause issues in the code generator

Open rezanid opened this issue 6 months ago • 6 comments

Version of the Meziantou.Polyfill NuGet package

1.0.39

Description

Earlier today I faced a compilation issue, which I thought was related to upgrading .Net Framework to 4.8, but it turned out that it is related to this issue. In summary setting a type as design-time data context of a XAML control will cause issues in the code generator.

Reproduction Steps

  1. Take the following repo: https://github.com/rezanid/xrmtools
  2. Set the design-time data context of the AssemblySelectionDialog.xaml by adding the following line to the root element.
xmlns:ui="clr-namespace:XrmGen.UI" d:DataContext="{d:DesignInstance Type=ui:AssemblySelectionViewModel}"
  1. Build.

Other information

You might need the Extensibility workload of VS to be able to build.

rezanid avatar Aug 21 '24 11:08 rezanid