Open koehler0179 opened 3 years ago
@koehler0179 Would you please elaborate on the issue with reproduction steps? I need to check it on my system.
I created a Core project, and it seems that when generating, the VS T4 engine just hangs for some reason. I will try to investigate further.
If you find any error messages, or anything that could help, please share.
Are you using the Xrm.Tooling lib to connect to crm and the old Xrm SDK Libs? If yes, that is maybe the reason why it is not working in .NET Core Libs. It is not possible to use old Xrm.Tooling and old Xrm SDK Libs in Core projects. Therefore you should use the new Dataverse Client Lib which is build for .NET Core. Change should not be very hard because Microsoft didn´t change the namespaces. But that is just a guess from my side. Maybe it is also something different. If I have time I will try to investigate to figure out why it is not starting.
I don't believe that 'connecting' is the issue. It connects fine to CRM but crashes at this line:
var content = t4.ProcessTemplate(wszInputFilePath, bstrInputFileContents, cb);
It seems that the Visual Studio T4 engine has an issue with this type of projects. I will investigate further and share any findings.
A quick look and it seems that I might need to migrate to a newer template of Visual Studio Extensions. I also have to check for VS 2017 compatibility, because from what I found, .NET Core support for T4 was added to VS in v16.6 only.
I believe this will take some time, to even go more in-depth and find an alternative if an issue pops up in VS 2017.
VS Plugin works really great but currently it is not possible to run the Codegenerator in .NET Core Libs. Current workaround: Create a .NET Lib and copy over the generated classes over a post-build action.