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

.NET 5: Model not generated if library is a dependency #340

Open
ZellC opened this issue Mar 29, 2021 · 4 comments
Open

.NET 5: Model not generated if library is a dependency #340

ZellC opened this issue Mar 29, 2021 · 4 comments

Comments

@ZellC
Copy link

ZellC commented Mar 29, 2021

My project structure is as following:

-- WebApplication
-- WebInterface
-- Model

In my WebApplication I have a reference to WebInterface and a dependent reference to model.
Under WebApplication the dependencies looks like this:
Dependencies
-- Projects
---- WebInterface
------ Model

My Model.tst in WebApplication doesn't generate any file located in Model library.
If I add Model manually the .ts files are generated but the dependencies show me a warning because the model is used twice.

Does anyone have a solution for this issue?
Thank you

@rhoadsce
Copy link

Did you ever find a solution to this? I'm having a similar issue.

Thanks!

@AdaskoTheBeAsT
Copy link

did you tried attaching tst file in model library?

@rhoadsce
Copy link

rhoadsce commented Feb 1, 2022

I'm not sure I understand what you mean by "attaching".

I want to keep my tst file in my web project. The hierarchy looks like this:

Web Project -> Library1 -> Library2 -> Domain Library (contains my model)

Models that are in the web project or Library1 are getting picked up by the tst file in the web project. Models in Library2 and the Domain Library are not.

Thanks!

@ZellC
Copy link
Author

ZellC commented Feb 1, 2022

I got found a solution for this issue.

In your .tst File you can define a Template Constructor with a Settings-Paramater.
With this settings you can include your Model-Library to the .tst File.

Template(Settings argSettings) {
    argSettings.IncludeProject("Model");
}

This solution worked for me.
I hope I could help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants