You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
msbuild /t:pack does not include conditionally included pack content #6792
Packing a multi-targeted library with the conditionally included ItemGroup does not include the specified content files. If the condition is removed it includes the content but for all TFMs.
font.ttf is included in the content and contentFiles portion of the nuspec/nupkg but only for the conditional target framework (in this case Xamarin.iOS10).
Actual behavior
font.ttf is not included as content at all.
Environment data
msbuild /version output:
Microsoft (R) Build Engine version 15.6.85.37198 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
15.6.85.37198
OS info:
Edition: Windows 10 Pro
Version: 1803
Build: 17133.1
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):
Visual Studio Professional 2017
Version 15.6.5
Activity
rainersigwald commentedon Apr 9, 2018
Thanks for the report. I'm going to move this to the NuGet repo since that's where these targets come from.
rohit21agrawal commentedon Apr 9, 2018
documentation to include conditionally referenced content is available here: https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#advanced-extension-points-to-create-customized-package
mishra14 commentedon Apr 9, 2018
@jsmarcus please let us know if you are still blocked on this.
rohit21agrawal commentedon Apr 9, 2018
@mishra14 keep the issue open as we should still fix the case that was reported in the OP. my comment is a workaround so @jsmarcus can get unblocked
mishra14 commentedon Apr 9, 2018
@rohit21agrawal Thanks for pointing that out.
jsmarcus commentedon Apr 9, 2018
Thank you @rohit21agrawal that has allowed me to create the package. I agree that the issue reported should be fixed as well.
nkolev92 commentedon Jan 27, 2022
Related to dotnet/sdk/issues/1479 as well.
There some stuff about the defaults that makes things challenging.
mhmd-azeez commentedon Apr 21, 2022
I have also run into this issue and would love to see it fixed