Azure / Azure/bicep

MSBuild - copy Bicep compilation results to referenced projects

Open
#5,048 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 2h
Merged PRs (30d)
79

Description

**Is your feature request related to a problem? Please describe.**
When we reference projects with MSBuild `` items, the resulting JSON files are not copied to the referenced project's output directory. This is essential to run tests and to properly componentize libraries containing Bicep files.

**Describe the solution you'd like**
I suggest that instead of writing the compilation result directly to the output directory, the Bicep targets will compile to the intermediate directory (e.g. `obj/bicep`), then add the resulting files as `` items, which would take care of copying them to all outputs, including references. Note you may need to change the order of the targets.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Bicep MSBuild targets that compile items and inspect their ordering relative to referenced-project builds. Verify the compilation results are produced under an intermediate directory and are copied with PreserveNewest to the output directories of both the current and referencing projects, including test outputs.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.