Meziantou.Polyfill
Meziantou.Polyfill copied to clipboard
Setting a type as design-time data context of a XAML control will cause issues in the code generator
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
- Take the following repo: https://github.com/rezanid/xrmtools
- 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}"
- Build.
Other information
You might need the Extensibility workload of VS to be able to build.