Program runs fine on .Net Framework4.7.2 but not on .Net Framework4.8

Hey, Walter!
Hope everything goes well for you recently.

I am a beginner and when I try to create some simple GoWPF projects, VS2022 runs perfectly if I adopt .NET Framework 4.7, but when I change to .NET Framework 4.8, VS2022 starts to prompt various errors. Could you help me find out why and what’s the problem?

If I adopt .NET Framework 4.7, it looks like this:

If I adopt .NET Framework 4.8, it looks like this:

To note that my VS doesn’t report only one error. In fact, when I comment out the first line of code with the go tag, it will continue to report the next code with go tag.

Every time I change .Net Framework, I will reinstall the Nuget package of GoWPF, but this doesn’t work. Furthermore, I have tried several projects and all have the same problem.

I really don’t know where the problem is and I’m looking forward to your reply ~

I cannot tell what your dependencies are. Precisely which version of GoXam are you using?

Hi, Walter, thanks for being online! I didn’t expect your reply to be so timely.

In fact, the version of GoWPF that we use is 3.0.6:

After some attempts, we found that when VS only installed .Net Framework 4.8, it would report the error and there’s a warning there:

But when we installed .Net Framework 4.8.1, the program is fine:

Just a small problem haha. It’s a pity that I forgot to open the warning box. If we had seen the warning earlier, we wouldn’t have wasted so much time.

Best wishes.

I recommend always using the latest baselevel for any version – that applies to libraries too.