Azure / Azure/bicep

Bicep msbuild compiler does not publish correctly with --no-build

Open
#14,371 0 comments 0 reactions 1 assignee Claimed by @majastrz View on GitHub
bug
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
0.23.1

**Describe the bug**
We have a build pipeline that does the following-

dotnet build someproject.sln

dotnet publish \ --no-build --no-restore -out ./somedir

We use the Azure.Bicep.MSBuild package and its associated command line package to compile one of our projects which has bicep files into its associated ARM templates. We are noting during dotnet publish that the compiled json files are not being copied to the publication directory. I've found a couple of issues on here regarding publishing with bicep being wonky and I think I have found another case where this does not work if you are attempting to save time by specifying --no-build.

**To Reproduce**
Steps to reproduce the behavior:

Compile solution with a csproj that references bicep msbuild package and compiles a json file.

Try to dotnet publish (with --no-build) the individual project after sln build, observe that the json files are not present in the output directory.

**Additional context**
We've worked around the problem in the meantime by removing --no-build but I want to ensure we avoid any redundant build steps during publication given the solution has already been pre-built.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.