-
Notifications
You must be signed in to change notification settings - Fork 64
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
[BUG] Dotnet new extra arguments do not work with custom dotnet library template #783
Labels
Comments
md-owes
added
bug
Something isn't working
needs-triage
This issue has yet to be looked over by a core team member
labels
Oct 21, 2023
AgentEnder
added
scope: core
and removed
needs-triage
This issue has yet to be looked over by a core team member
labels
Oct 25, 2023
AgentEnder
added a commit
that referenced
this issue
Oct 25, 2023
AgentEnder
added a commit
that referenced
this issue
Oct 25, 2023
AgentEnder
added a commit
that referenced
this issue
Oct 25, 2023
github-actions bot
pushed a commit
that referenced
this issue
Oct 25, 2023
# [2.1.0](v2.0.2...v2.1.0) (2023-10-25) ### Bug Fixes * **core:** should be able to pass extra args to generated libraries ([#788](#788)) ([2d2cb5b](2d2cb5b)), closes [#783](#783) ### Features * **core:** better configuration options for target inference ([#787](#787)) ([8a7b9a1](8a7b9a1)) Oct 25, 2023, 5:38 PM
🎉 This issue has been resolved in version 2.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current Behavior
I have created two custom dotnet templates. one named "jaamapi" which is a template to create custom dotnet webapi project and another named "jaamdom" to create custom dotnet library project. Both templates require additional arguments to be passed. When i execute these commands directly as dotnet commands, they work as shown below
But when executing these commands via nx-dotnet, the first command executes successfully and provides the expected output whereas the second fails to execute with an error as shown in Failure Logs section.
Nx Dotnet command that
nx g @nx-dotnet/core:app --name ProgramService --tags ps --directory ProgramService --template jaamapi --language C# --skipSwaggerLib true --pathScheme dotnet --testTemplate none --verbose --args='-N=ProgramService,-E=Program,-L=program'
nx g @nx-dotnet/core:lib --name Domain --tags ps --directory ProgramService --template jaamdom --language C# --skipSwaggerLib true --pathScheme dotnet --testTemplate none --verbose --args='-N=ProgramService,-E=Program,-L=program'
From error it is evident that the nx-dotnet library does not parse the additional arguments the same way as the nx-dotnet application works.
Expected Behavior
The library creation command using nx, i.e. @nx-dotnet/core:lib, should work with additional arguments just the way @nx-dotnet/core:app works.
Github Repo
No response
Steps to Reproduce
Nx Report
nx.json
Failure Logs
Additional Information
I have tried to play around with additional argument syntax as shown
nx g @nx-dotnet/core:lib --name Domain --tags ps --directory ProgramService --template jaamdom --language C# --skipSwaggerLib true --pathScheme dotnet --testTemplate none --verbose --args='-N ProgramService,-E Program,-L program'
nx g @nx-dotnet/core:lib --name Domain --tags ps --directory ProgramService --template jaamdom --language C# --skipSwaggerLib true --pathScheme dotnet --testTemplate none --verbose --args='-N ProgramService -E Program -L program'
nx g @nx-dotnet/core:lib --name Domain --tags ps --directory ProgramService --template jaamdom --language C# --skipSwaggerLib true --pathScheme dotnet --testTemplate none --verbose --args '-N ProgramService -E Program -L program'
nx g @nx-dotnet/core:lib --name Domain --tags ps --directory ProgramService --template jaamdom --language C# --skipSwaggerLib true --pathScheme dotnet --testTemplate none --verbose -- '-N ProgramService -E Program -L program'
nothing worked so far.
The text was updated successfully, but these errors were encountered: