I am building in Visual Studio an iOS Binding Library. Objective Sharpie generated a code in ApiDefinition.cs. I am using directive namespace "Foundation" but clicking F12 at "Foundation" is not redirecting me to namespace definition. The "NSURL" type is not recognized. Other classes like "NSString" etc. are recognized well. There is an error:
CS0246 C# The type or namespace name 'NSURL' could not be found (are you missing a using directive or an assembly reference?)
What should I do to make 'NSUrl' recognized?
The compiler will prompt a large number of errors . Such as
You have to do something. For example, use the ulong/long instead of nuint ,and annotate the code such as [Verify(MethodToProperty)] .In addition,there are some differences between iOS and Xamarin.iOS in name of Object.For example ,NSURL in OC and NSUrl in C#.You need to manually modify it.
Related
I am trying to import Steamworks from the Steamworks.NET package that I imported through the unity package manager.
I can clearly see that the Steamworks.NET package was installed and that it contains the namespace Steamworks.
However, when I actually try to use this namespace, like this:
using Steamworks;
I get the error:
Assets\Scripts\SteamIntegration\SteamManager.cs(15,7): error CS0246: The type or namespace name 'Steamworks' could not be found (are you missing a using directive or an assembly reference?)
This makes no sense to me - The namespace clearly exists in the project. Why can I not use it / How can I use it?
You seem to be using an Assembly definition for your scripts.
In that case you additionally will need to reference the assembly definition of according package(s).
In your case the file starting with com.rlabrecque....
I want to run the Xamarin project and did all the updates. When I run the project I get the following error
The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?)
for the lines
using Windows.Storage;
using Windows.ApplicationModel.ExtendedExecution;
That's because you're missing these .dll
The recommended steps to get access to UWP APIs are listed in the dedicated blog post on Windows Blog.
Basically you can take two approaches: add the references to UWP dlls and winmd files manually or use the UwpDesktop NuGet package that will take care of this for you automatically.
For more details, you can check: How do I get access to Windows.Storage namespace?
I am trying to create a form in C#.
Unfortunately, I can not use Visual Studio for this effort.
The program I am using has a live script c# compiler that allow user to write and compile code within the program. I am trying to use
using System.Windows.Forms;
but I get the following error
The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)
Is there a way to reference System.Windows.Forms with out visual studio?
I tried this on a online compiler and got similar results so maybe there is a correlation?
I have a Xamarin.Forms application and I need to be able to manage a DB. I'm developing in Microsoft Visual Studio 2017 and I'm following this tutorial dor the SQLite: https://msdn.microsoft.com/en-us/magazine/mt736454.aspx
The problem is that when I get to the point: Figure 6 Generating a Connection String in the Universal Windows Project, that is to say implementing the DatabaseConnection_UWP.cs class. There I get some errors:
using LocalDataAccess.UWP;
Here it says: The type or namespace name "LocalDataAccess" could not be found (ar you missing a using directive or an assembly reference?)
And in the line:
[assembly: Dependency(typeof(DatabaseConnection_UWP))]
It says: The type or namespace name "DatabaseConnection_UWP" could not be found (ar you missing a using directive or an assembly reference?)
The code is exactly the same, all I have done is to copy-paste from the tutorial.
Solved it following a different tutorial that worked perfectly: https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/databases/
I just installed Visual Studio 2012 so I could take advantage of better ways to implement MVVM with Silverlight.
The first thing I wanted to do is start using the [CallerMemberName] attribute so I didn't have to hard-code property name strings.
I created a new Silverlight app, created a new class, included 'using System.Runtime.CompilerServices', and proceeded to type [CallerMemberName]. However, I get the error:
"The type or namespace name 'CallerMemberNameAttribute' could not be found (are you missing a using directive or an assembly reference?)"
However, I did include the using directive and there are no other assemblies that need to be referenced.
This is driving me up the wall since no Google search returned any information about why I might not be able to use it in VS2012/Silverlight. How do I fix this?
It looks like the version of Silverlight you're targetting doesn't include that attribute.
However, that's OK; you can simply define it yourself:
namespace System.Runtime.CompilerServices {
sealed class CallerMemberNameAttribute : Attribute { }
}