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
NuGet package System.Threading.Overlapped fails to install in a Xamarin project
General
Xamarin projects are still using packages.config and the old NuGet system, so no PackageReference in the .csproj. I think that is why it is still looking for a lib folder with .NET Standard assemblies and why it is interpreting the NuGet package incorrectly.
I experienced this with an Android app, however looks like it doesn't really matter which kind of Xamarin project you're using as described in xamarin/xamarin-macios#3138
I manually added the package using a PackageReference in my csproj, which succeeded. But then the app crashes at runtime when trying to load the assemblies.
The other workaround to avoid the Win32 files mentioned in the issue didn't work for me and failed with the following compilation error:
/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/xbuild/Microsoft/NuGet/Microsoft.NuGet.targets(5,5): Error: Your project.json doesn't have a runtimes section. You should add '"runtimes": { "unix": { } }' to your project.json and then re-run NuGet restore.
Repro
Just create any Xamarin project (Android app, iOS app...) and try to install System.Threading.Overlapped with Visual Studio for Mac.
Version info
=== Visual Studio Enterprise 2017 for Mac ===
Version 7.3.3 (build 12)
Installation UUID: 75a3e4df-6d6e-4364-9dac-61e6293ef1f9
Runtime:
Mono 5.4.1.7 (2017-06/e66d9abbb27) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 504010007
=== NuGet ===
Version: 4.3.1.4445
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.0.5
2.0.0
1.1.2
1.1.1
1.1.0
1.0.5
1.0.4
1.0.1
SDK: /usr/local/share/dotnet/sdk/2.1.4/Sdks
SDK Versions:
2.1.4
2.0.0
1.0.4
1.0.3
1.0.0-preview2-1-003177
1.0.0-preview2-003131
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Apple Developer Tools ===
Xcode 9.2 (13772)
Build 9C40b
=== Xamarin.Android ===
Version: 8.1.5.0 (Visual Studio Enterprise)
Android SDK: /Users/sam/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.3 (API level 18)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 27.0.3
Java SDK: /usr
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Xamarin.Mac ===
Version: 4.0.0.216 (Visual Studio Enterprise)
=== Xamarin.iOS ===
Version: 11.6.1.4 (Visual Studio Enterprise)
Hash: db807ec9
Branch: xcode9.2
Build date: 2018-01-10 16:45:48-0500
=== Xamarin Inspector ===
Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 703030012
Git revision: b07492f1e48be596bad92dc4b7a3bc2d128ed0f9
Build date: 2018-01-30 13:15:55-05
Xamarin addins: 7c8f967d67207118dd99a1d0cc9c228045b30c5f
Build lane: monodevelop-lion-d15-5
=== Operating System ===
Mac OS X 10.13.3
Darwin 17.4.0 Darwin Kernel Version 17.4.0
Sun Dec 17 09:19:54 PST 2017
root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
=== Enabled user installed addins ===
Android Signature Tool 2.1.2
Gist Ide Information 1.1.0
MSBuild Editor 2.0.1
NuGet Package Explorer 0.2
NuGet Package Management Extensions 0.12.6
Redth's Addins 1.0.9
Show in Github 1.0.4
Internet of Things (IoT) development (Preview) 7.1
The text was updated successfully, but these errors were encountered:
NuGet package
System.Threading.Overlapped
fails to install in a Xamarin projectGeneral
Xamarin projects are still using
packages.config
and the old NuGet system, so noPackageReference
in the.csproj
. I think that is why it is still looking for alib
folder with .NET Standard assemblies and why it is interpreting the NuGet package incorrectly.I experienced this with an Android app, however looks like it doesn't really matter which kind of Xamarin project you're using as described in xamarin/xamarin-macios#3138
I manually added the package using a
PackageReference
in my csproj, which succeeded. But then the app crashes at runtime when trying to load the assemblies.The other workaround to avoid the Win32 files mentioned in the issue didn't work for me and failed with the following compilation error:
Repro
Just create any Xamarin project (Android app, iOS app...) and try to install
System.Threading.Overlapped
with Visual Studio for Mac.Version info
The text was updated successfully, but these errors were encountered: