-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Describe the bug
The output directory added to the csproj file after generating a new project does not follow the pattern used by official Nx plugins. The generator @nrwl/angular:application (for example) will specify an output path that is identical to the project root, other than a dist/ prefix.
To Reproduce
Steps to reproduce the behavior:
- Create a new Nx workspace
- Generate a new .NET application with
npx nx generate @nx-dotnet/core:app my-app --template console --language C# --test-template none - Open the generated file
apps/my-app/MyApp.csproj - The
OutputPathelement specifies a path of../../dist/my-app, which is missing theappspart of the original file path.
Expected behavior
The OutputPath element should have been ../../dist/apps/my-app to match the pattern of other Nx generators.
Environment:
- OS: Windows
- Browser: N/A
- Version: 0.2.0
- Affected Packages:
@nx-dotnet/core
Additional context
When the project directory contains additional folder nesting (such as when the --directory flag is specified), the OutputPath element contains the extra directories, but it still does not contain the apps portion of the file path. The output path given in workspace.json never includes extra directories and, as a result, is sometimes inconsistent with the csproj file.
If the output path follows the standard Nx pattern, then the outputs property of the workspace.json file becomes unnecessary, as the explicit and default values are the same. It is worth nothing though that @nrwl/angular will explicitly specify the output path, even when it matches the inferred default.