dotnetprojects/WpfExtendedToolkit

IntegerUpDown controls throw error XDG0062: Could not load type 'System.Int32?' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e09'

sonicbhoc opened this issue · 10 comments

Each IntegerUpDown control I use has this error for the FormatString, Value, Increment, and Maximum elements.

The errors started with I transitioned a project from the old csproj format to the SDK-style format. The project is only targeting .NET Framework 4.7.2 (net472). It compiles fine, but the designer keeps throwing up exceptions.

Note that the issue only seems to happen with the XAML Designer in VS2019; VS Blend 2019 does not display the same issue. I'm starting to think the issue is with the VS2019 XAML Designer, not the package.

@sonicbhoc, I am having the same problem. It has been suggested that I delete the obj folder, clean the project/solution and rebuild, but that did not solve the issue. Did you find a fix for this?

switching to Visual Studio Blend instead of just VS fixed it for me. I haven't tried it again in VS2019 but it seemed to work alright in VS2022.

Thanks, @sonicbhoc. Tried that but still getting the error. No problem building or running the application, so I might just have to live with it.

@sonicbhoc , thanks but no good. The .vs folder is recreated when VS project is loaded and before I start VS Blend (which can only be activated once the VS designer is open in basic VS it seems). I then get the following error when starting the Project:
image
So I have had to revert to the original .vs folder. This seems to be an error without issue that @microsoft would need to resolve.
By way of post-script, this exception is not thrown by the VS2019 Designer, so it appears to be a bug in VS2022.

Has this issue had eyeballs put on it, yet? I am seeing this error in a .NET Framework 4.6.2 project using VS 2022.

I'm currently not looking after this, cause I don't use WPF any more. But if you'd create a pull request to fix it, I'll create a new release

If most .NET DEV's have moved away from WPF, I don't see much utility into digging into root cause at this time.

This issue is not crashing my app in runtime, but it is crashing the .xaml Designer which is annoying.

Thanks for getting back to me.

Jeffrey McNeal