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 61060 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
I made a Xamarin.Forms project with a .NET Standard 2.0 Library and I am getting the same error on all 3 of my projects; Android, iOS, UWP.
This is happening before I have edited any code, just clean setup.
But on an older project with a PCL library there's no error, it is able to find the reference to the library.
Even if you clean and rebuild the project to clear the error, project never is able to recognize the App() or its containing class has any references.
Its the same bug as Bug 56538, but doesn't seem to be resolved as it's marked?
Error CS0246 The type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?)
errors in MainActivity.cs
App.xaml.cs, should have 3 references.
public App ()
MainPage = new BlankApp1.MainPage();
Microsoft Visual Studio Professional 2017
Microsoft .NET Framework
Installed Version: Professional
Visual C# 2017 00370-10003-35475-AA496
Microsoft Visual C# 2017
ASP.NET and Web Tools 2017 15.0.31120.0
ASP.NET and Web Tools 2017
Mono Debugging for Visual Studio 4.8.4-pre (3fe64e3)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 4.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
SQL Server Data Tools 15.1.61710.120
Microsoft SQL Server Data Tools
TypeScript Tools 15.5.11025.1
TypeScript Tools for Microsoft Visual Studio
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Tools for Universal Windows Apps 15.0.27128.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
Mac Extension for Visual Studio
Xamarin 126.96.36.1992 (4a1f0ea)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 4.8.182 (76aa1723e)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin.Android SDK 188.8.131.52 (HEAD/9cfa7836b)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 184.108.40.206 (c4240f3)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
I've tried creating new classes in both the android project and the .net standard library and i am not able to get the android project to recognize any references from the .net library.
The other bug seems related to the Xamarin Live Player. If it's possible, please attach a reproduction project where you are seeing this issue. From past experience I believe you need to compile the "Shared" project first and then the platform projects when it comes to Xamarin.Forms. i.e. Compile the PCL or NetStandard library first, and then the platform.
Can you also include steps of how you are reproducing this scenario?
Perhaps in the future this can be resolved with Design Time Build work.
I think I have same problem. I had a Xaramin Forms PCL project with Android & iOS projects. In the PCL project I have an Interface (namespace DiaryManager.Persistence). In the Android & iOS projects I created a Class from that Interface, and both projects successfully referenced the DiaryManager.Persistence namespace.
After recent VS2017 updates I no longer had the PCL option so am trying to use .NET Standard (as per guidelines).
I've created the exact same setup (DiaryManager.Peristence namespace in Shared project) but neither the Android or iOS projects can see this namespace now (which they could when using PCL).
I get a "namespace could not be found, are you missing a directive or assembly reference?" error.
Both the Android & iOS projects have references to the DiaryManager Shared project but it seems they cannot see the namespace(s) within that (at least not ones below the top-level).
Can I just get my PCL option back as that was a lot easier!?!?
I noticed the .NET Standard Shared project does not have an AssemblyInfo.cs file (which the PCL did). Would re-instating this help??
Would be great if either the .NET issue could be resolved or the PCL option accessed (so I can created PCL project instead), as this has broken my development now which I'm contracted to complete in the New Year :(
I've managed to resolve my issue by doing the following in the .NET standard/Shared project:
- Create folder named properties
- Copy old PCL project AssemblyInfo.cs file into properties folder
- Amend details to match new Solution/Project
Now my Android and iOS classes can see the DiaryManager.Persistence namespace in the Shared project and use the Interface I've created.
I encountered the same issue. I finally figured out that I needed to reference my .Net Standard Project from my iOS project.