ghost1372 / HandyControls

Contains some simple and commonly used WPF controls based on HandyControl
https://ghost1372.github.io/
MIT License
1.1k stars 104 forks source link

Unable to run LangProvider.tt in .Net 6.0 #129

Closed Jie2GG closed 1 year ago

Jie2GG commented 2 years ago

Describe the bug I tried running "LangProvider.tt" in .Net6 to generate LangProvider.cs, but I found that the template doesn't work in .Net6. This seems to be because .Net6 core library has not been added to the GAC list.

To Reproduce

  1. Create wpf project of .net6.0-windows
  2. Import LangProvider.tt and craete Lang.resx
  3. remove LangProvider.cs
  4. build project
  5. run LangProvider.tt

Expected behavior Compiling conversion: Type 'ResourceManager' is defined in an unreferenced assembly. A reference to assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' must be added.

Screenshots image

Environment (please complete the following information):

Additional context None

Jie2GG commented 2 years ago

@ghost1372 I try to solve this problem, when i import .NET4.8 dynamic library, the problem is solved. But it's not perfect solution

Jie2GG commented 2 years ago

I'm pretty sure the issue is due to .NET 6.0 dynamic libraries not being included in the GAC list.

ghost1372 commented 2 years ago

Yes, I also have a problem with .NET 6, I wonder how HandyControl can be compiled without any problems @NaBian do you have any idea?