HandyControls icon indicating copy to clipboard operation
HandyControls copied to clipboard

Unable to run LangProvider.tt in .Net 6.0

Open Jie2GG opened this issue 3 years ago • 3 comments

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):

  • .net: 6.0-windows
  • IDE: visual studio 2022
  • Version none

Additional context None

Jie2GG avatar Mar 04 '22 14:03 Jie2GG

@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 avatar Mar 04 '22 14:03 Jie2GG

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

Jie2GG avatar Mar 04 '22 14:03 Jie2GG

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?

ghost1372 avatar Mar 04 '22 17:03 ghost1372