Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Plugin not working in .NET Core Libs #6

Open
koehler0179 opened this issue May 26, 2021 · 5 comments
Open

VS Plugin not working in .NET Core Libs #6

koehler0179 opened this issue May 26, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@koehler0179
Copy link

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.

@yagasoft yagasoft self-assigned this May 28, 2021
@yagasoft
Copy link
Owner

@koehler0179
Would you please elaborate on the issue with reproduction steps? I need to check it on my system.

@yagasoft yagasoft removed their assignment May 28, 2021
@yagasoft
Copy link
Owner

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.

@yagasoft yagasoft self-assigned this May 28, 2021
@yagasoft yagasoft added the enhancement New feature or request label May 28, 2021
@koehler0179
Copy link
Author

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.

@yagasoft
Copy link
Owner

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.

@yagasoft
Copy link
Owner

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.

@yagasoft yagasoft removed their assignment Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants