-
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] Different output directories on default/production and publish/build #100
Comments
Hey @cgnuechte. Good catch! This is because we recently moved to executing the |
If youre interested, this could be an easy PR, just in the publish / build executors you can use nodes path.relative method to calculate the path relative to the project source before passing it to the dotnet client. |
Let me know if you are interested and I'll assign it to you, it will be about a week or so. |
Hi @AgentEnder Yes, that sounds great :-) I was always interested how to write a Nx plugin. |
@cgnuechtel Actually, now that I'm looking at this I cannot reproduce it... Do you have a repro I can look at? Are you on mac / linux or windows? |
Never mind, I ended up figuring out what was going on. I had already updated this to use path.resolve beforehand, but did then was updating the wrong object so it was not getting passed correctly. This will be fixed in the next patch version, didn't mean to take control but it was just relocating a line 😄. |
🎉 This issue has been resolved in version 1.4.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@AgentEnder Fine! Even better :-) Thanks for solving this! |
This was the relevant commit, if you wanted to see what change was needed: 30a7a26 |
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. |
The output directories are different on default configuration (debug)/production configuration (release) and
@nx-dotnet/core:publish
/@nx-dotnet/core:build
inworkspace.json
.Steps to reproduce the behavior 1:
npx nx generate @nx-dotnet/core:app my-app --template console --language C# --test-template none
npx nx build my-app
-> Build is stored in<project-root>\dist\apps\my-app
workspace.json
If that configuration is used, the output is (incorrectly) stored under:
<project-root>/apps/my-app/dist/apps/anything-else
6. Change the
output
value under production to../../dist/apps/anything-else
7. Run
npx nx build my-app --prod --skip-nx-cache
-> the output is stored under<project-root>/dist/apps/anything-else
. In my opinion the change of step 6 is just a work-around and should not be necessary. Instead the behavior should be consistent to the default (debug) configuration.Steps to reproduce the behavior 2:
builder
undermyapp
->architect
->build
from@nx-dotnet/core:publish
to@nx-dotnet/core:build
,npx nx build my-app --prod --skip-nx-cache
-> the output is (correctly) stored under<project-root>/dist/apps/anything-else
Expected behavior
The output path should be configured the same way on build/publish and debug/release
The text was updated successfully, but these errors were encountered: