Skip to content

Commit 433346e

Browse files
authored
Build should not show the "Does not support publish of C++/CLI project targeting dotnet core" error message when IsPublishable is false
When building & publishing a whole solution which contains a C++/CLI project, the publish shows the following error message: C:\Program Files\dotnet\sdk\3.1.301\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1048,5): error NETSDK1117: Does not support publish of C++/CLI project targeting dotnet core. [C:\XXX\YYY.vcxproj] If you set the IsPublishable property to false, the error is still shown. In my opinion this should be checked only when the project will be published here: https://github.com/dotnet/sdk/blob/d9186282b30574e1de24939aa32b615e19c084a7/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets#L63-L65
1 parent d918628 commit 433346e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,7 @@ Copyright (c) .NET Foundation. All rights reserved.
11671167
============================================================
11681168
-->
11691169
<Target Name="_CheckForLanguageAndPublishFeatureCombinationSupport"
1170+
Condition="$(IsPublishable) == 'true'"
11701171
BeforeTargets="Publish;PrepareForPublish">
11711172

11721173
<NETSdkError Condition="'$(Language)' == 'C++' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'"

0 commit comments

Comments
 (0)