Skip to content

Cannot create NuGet package using dotnet pack #14708

Description

@SotoiGhost

Steps to Reproduce

  1. Unzip the testcase

  2. Run the following command:

    dotnet pack source/AudienceNetwork/AudienceNetwork.csproj -v:diagnostic -bl:dotnet.binlog > dotnet.log
  3. See the results

Expected Behavior

A generated NuGet package

Actual Behavior

The following error:

/usr/local/share/dotnet/sdk/6.0.201/Sdks/NuGet.Build.Tasks.Pack/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(221,5): error NU5026: The file '/Users/israelsoto/Downloads/testcase/source/AudienceNetwork/bin/Debug/net6.0-ios/Native.Facebook.AudienceNetwork.manifest' to be packed was not found on disk. [/Users/israelsoto/Downloads/testcase/source/AudienceNetwork/AudienceNetwork.csproj]

Environment

Visual Studio Enterprise 2022 for Mac Preview
Version 17.1 Preview (17.1 build 521)
Installation UUID: 51617c2b-29f2-4751-a5c6-a4509649da98

Runtime
.NET 6.0.3 (64-bit)
Architecture: X64

Roslyn (Language Service)
4.1.0-3.22075.3+592501cbb9c9394072a245c15b3458ff88155d85

NuGet
Version: 6.0.0.262

.NET SDK (x64)
SDK: /usr/local/share/dotnet/sdk/6.0.201/Sdks
SDK Versions:
	6.0.201
	6.0.200
	6.0.102
	6.0.101
	6.0.100
	5.0.406
	5.0.405
	5.0.200
	2.1.818
MSBuild SDKs: /usr/local/share/dotnet/sdk/6.0.201/Sdks

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	6.0.2
	6.0.1
	6.0.0
	5.0.15
	5.0.14
	5.0.3
	2.1.30

Xamarin.Profiler
Version: 1.7.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Xamarin Designer
Version: 17.1.5.45
Hash: 3fc68ad07
Branch: remotes/origin/d17-0-vsmac
Build date: 2022-03-23 20:02:44 UTC

Apple Developer Tools
Xcode 13.3 (20102)
Build 13E113

Xamarin.Mac
Version: 8.8.0.0 (Visual Studio Enterprise)
Hash: f10d9e023
Branch: xcode13.3
Build date: 2022-03-15 11:47:34-0400

Xamarin.iOS
Version: 15.8.0.0 (Visual Studio Enterprise)
Hash: f10d9e023
Branch: xcode13.3
Build date: 2022-03-15 11:47:35-0400

Xamarin.Android
Version: 12.3.0.0 (Visual Studio Enterprise)
Commit: xamarin-android/d17-2/d1799a0
Android SDK: /Users/israelsoto/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		12.0 (API level 31)
		11.0 (API level 30)
		10.0 (API level 29)

SDK Command-line Tools Version: 5.0
SDK Platform Tools Version: 31.0.3
SDK Build Tools Version: 30.0.3

Build Information: 
Mono: f34bd77
Java.Interop: xamarin/java.interop/main@05bfece4
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.38.0@ccd83d8
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@fc3c2ac

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.2.0.29
Hash: 5ff637a
Branch: remotes/origin/main
Build date: 2022-03-23 20:02:49 UTC

Android Device Manager
Version: 0.0.0.1108
Hash: 4afbd2a
Branch: remotes/origin/HEAD
Build date: 2022-03-23 20:02:49 UTC

Build Information
Release ID: 1701000521
Git revision: 3e76379cedf40e42208ab802d9c19b24555659cf
Build date: 2022-03-23 20:00:12+00
Build branch: main
Build lane: main

Operating System
Mac OS X 12.3.0
Darwin 21.4.0 Darwin Kernel Version 21.4.0
    Mon Feb 21 20:34:37 PST 2022
    root:xnu-8020.101.4~2/RELEASE_X86_64 x86_64

Build Logs

dotnet.binlog.zip
dotnet.log

Example Project (If Possible)

testcase.zip

It seems that this was fixed before with the following task: https://github.com/xamarin/xamarin-macios/blob/df395f2cff9b121fb3b7f1dc3a37f2948dbebc04/msbuild/Xamarin.Shared/Xamarin.Shared.targets#L208-L225

but for some reason, it's not being executed. Following the binlog, it seems that all our magic just happens within _WalkEachTargetPerFramework target, but after that, there aren't any other import of Xamarin stuff.

Even when we override the GenerateNuspecDependsOn property using Xamarin.Shared.targets, if you print this property before the GenerateNuspec target (the one that is failing), you will notice that the reassignment didn't happen; even when the logs shows that this property was reassignment correctly.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIf an issue is a bug or a pull request a bug fixdotnetAn issue or pull request related to .NET

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions