-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Build should not show the "Does not support publish of C++/CLI projec… #12333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…t 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
@zgabi could you add tests? |
Sorry, I don't know how to do that. |
We're heads down at the moment on the .NET 5 release. @wli3 will get back to you later with details on writing a test. |
@wli3 reminder to take a look as we're close to finishing up 5.0 |
I realize this PR is blocked by #11008 currently we disabled C++/CLI tests. But before we adding new features, we should re-enable them |
Ok, but as you can see this is a quite trivial, very simple change. And very logical... do not show an error message about a not supported publishing when the project won't be published anyway. (The same IsPublishable variable is checked in the Publish target) I already found a workaround for this bug, so for me it is not so important to fix it, howerver I'd be happy if you could include this fix in one of the next releases, so I could remove my workaround from our project. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
We're starting to do a pass over old PRs (time permitting). For this change, it is not possible to have a test for it as any cppcli project that enables PackageReference support would not show the original error and we can't test non-PackageReference cppcli projects as they would fail once the installed runtime and implicit runtime don't match (because the targeting pack automatic download is enabled through that mechanism). Sorry for the long delay and thanks for the contribution. I tested the change locally and it works as expected. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…t 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:
sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets
Lines 63 to 65 in d918628