dotnet / dotnet/msbuild

Publish projects during build

Open
#3,138 7 comments 11 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

The rosyln project has a solution with ~160 projects in it of which ~5 need to be published. Today our work flow is to do the following:

- Build Roslyn.sln
- For Each project that needs to be published run `msbuild /t:Publish /p:TargetFramework=netcoreapp2.0 TheProject.csproj`

Invoking MSBuild this many times is wasteful because every publish has to re-evaluate the state of our build before moving onto the publish step. It would be more efficient if during the build we could publish the set of projects that require publishing.

Chaining targets almost works by using this syntax:

``` cmd
>msbuild /t:Build /t:path\to\project1:Publish /t:path\to\project2:Publish
```

However Publish requires that a TargetFramework property also be set. How can that be combined with the target syntax above?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.