For a project:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.1;net47</TargetFrameworks>
</PropertyGroup>
</Project>
I can do msbuild (or msbuild /t:Build), and the execution will consist of an outer build which simply does an inner build for each TFM (adding a specific TargetFramework=<tfm> global property for each).
I would expect msbuild /t:Publish to behave the same way, to simply have an outer build which did an inner build for each TFM. Instead, the following error is shown:
The 'Publish' target is not supported without specifying a target framework. The current project targets multiple frameworks, please specify the framework for the published application
Why can't Publish when there are multiple TFMs just Publish for each TFM?
For a project:
I can do
msbuild(ormsbuild /t:Build), and the execution will consist of an outer build which simply does an inner build for each TFM (adding a specificTargetFramework=<tfm>global property for each).I would expect
msbuild /t:Publishto behave the same way, to simply have an outer build which did an inner build for each TFM. Instead, the following error is shown:Why can't Publish when there are multiple TFMs just Publish for each TFM?