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

Shared Project #4

Open
VanHinthem opened this issue Nov 5, 2020 · 8 comments
Open

Shared Project #4

VanHinthem opened this issue Nov 5, 2020 · 8 comments
Labels
enhancement New feature or request

Comments

@VanHinthem
Copy link

Those this also work in a shared project type?

@yagasoft yagasoft added the question Further information is requested label Nov 8, 2020
@yagasoft
Copy link
Owner

yagasoft commented Nov 8, 2020

Yes, you can use source control to share the configuration used to generate the entities. It's stored as JSON, so it's easy to merge with other branches.

@yagasoft yagasoft closed this as completed Nov 8, 2020
@VanHinthem
Copy link
Author

That not what I meant, I meant a "shared project type" in visual studio.

@yagasoft
Copy link
Owner

yagasoft commented Nov 10, 2020

No, TT files are not supported in Shared Projects.

What you can do is add the TT file to another project as a container, add a symbolic link of the generated files in the 'shared project' folder in Windows pointing to the original files in the other project, and then add it to the 'shared project' in Visual Studio.

Windows Explorer:

  • ModelProject
    • CrmSchema.tt
    • CrmSchema.cs
    • CrmSchemaBase.cs
  • SharedProject
    • [Symbolic Link] CrmSchema.cs
    • [Symbolic Link] CrmSchemaBase.cs
  • PluginProject
    • [Reference] SharedProject

Add the linked files to the SharedProject.

You could add the generated files as a direct link in the plugin project, but then you have to add all the generated files manually to every project, which might not be the most convenient.

I highly recommend that you generate a schema file per plugin project; for web services, you can use a single schema file.

@AngelRodriguez8008
Copy link

Hi @yagasoft,
Hi @VanHinthem,

I implemented a solution for this Issue, i can upload it in my Fork.

image

br

@yagasoft
Copy link
Owner

Hello, @AngelRodriguez8008 ,

It would be great if you would create a pull request, please. This project structure is used frequently and would benefit many people indeed.

@yagasoft yagasoft reopened this Nov 15, 2020
@yagasoft yagasoft added the enhancement New feature or request label Nov 15, 2020
@AngelRodriguez8008
Copy link

Hi @yagasoft,

I did it one year ago or more, i remember your version was too complex to make the Changes that I needed & i decided to use original code from xairrick.

I have no time at the moment to make a Pull Request in your Fork, but I guest you can take a look what I did in the follow code and redo it.

CrmCodeGenerator.VSPackage/CrmCodeGenerator.VSPackage.vsct at Line 72

CrmCodeGenerator.VSPackage/Commands/ApplyCustomTool.cs

I can put it in my todo-list but it can take some time (months), until it get done.

br

@yagasoft
Copy link
Owner

Thank you, @AngelRodriguez8008 .

@AngelRodriguez8008
Copy link

Your welcome @yagasoft ! Feel free to contact me if you need some help.

@yagasoft yagasoft removed the question Further information is requested label Dec 5, 2020
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

3 participants