bazel-contrib / bazel-contrib/rules_dotnet
Preserve directories when using appsetting_files
- Dominant language
- Starlark
- Stars
- 209
- Forks
- 98
- Avg merge
- 3h 59m
- Merged PRs (30d)
- 14
Description
We're migrating some apps from MS Build to our Bazel monorepo, so I have a question regarding how `appsetting_files` behaves.
When I define a glob like this:
```
csharp_binary(
name = "server",
appsetting_files = glob([
"Files/*.*",
])
```
The output seems to flatten the directory structure — all files under `Files/` are copied directly into the root of the output directory. As a result, we need to implement custom logic in the code to reconstruct or handle the expected paths.
Is this the expected behavior? Is there a recommended way to preserve the directory structure in the output, ideally without requiring too much custom implementation?
Thanks in advance!
Contributor guide
Research direction
Start by tracing how appsetting_files is handled by csharp_binary and how the glob paths are mapped into the output directory. Run the relevant Bazel target or existing tests, then verify that nested input paths are preserved without requiring application-side path reconstruction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100