Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 55233 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 21560 [details]
San Andreas referencing a C++ Dynamic Shared Library
When referencing a C++ Dynamic Shared Library (Android) a warning appears: "The project 'SanAngelesLibrary' cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced." and the .apk is build without the .so. According to https://developer.xamarin.com/guides/android/advanced_topics/using_native_libraries/#Debugging_Native_Code_with_Visual_Studio_2015 this should be possible.
Thank you for taking the time to submit this bug. We are unable to reproduce this issue using the latest version of Visual Studio (Version 15.2). Can you update to Visual Studio 2017 (15.2) and try it again? Also, can you let us know which of the solutions within this sample are not building for you (SanAngeles_NativeDebug or SanAngeles_NDK)?
If you are unable to upgrade to VS 2017, can you apply all updates and verify that Xamarin.Android 184.108.40.206 or later is installed (click Help > About Microsoft Visual Studio and scroll down). Thanks!
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!
I am reopening this bug as it is still an issue with C++ shared objects and Xamarin.Android.
Here are a few observations:
1. After referencing the Dynamic Shared Library(Shared Object) project to a Xamarin.Android project, the reference will have a yellow triangle indicating a warning in which a warning will make the Visual Studio Error List UI:
"The project 'ProjectName' cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced."
2. This warning goes away after reopening the Xamarin.Android project in some fashion such as unloading/reloading or restarting Visual Studio.
It seems the Reference path gets messed up. Here is a scenario:
1. Right after referencing the path to the shared object is empty.
2. When reloading the project, the path is correct:
I would guess something is going on with our targets or the Visual C++ targets causing this warning in the first place. Given the nature of referencing the shared object in a Xamarin.Android project, I would guess our targets first.
Referencing a newly created Developer Community issue: