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/
Related
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.
I have the job of getting a legacy project working again. This project was done many years ago using Silverlight and C# Class Library's.
The error I am getting is to do with a namespace inside the project file called Silverlight.Business:
Code
using Tcx = global::MapTools.Xml;
Error:
The type or namespace name "MapTools" could not be found in the global namespace (are you missing an assembly reference?)
MapTools is a C# Class Library and Silverlight.Business is a Silverlight Library. Due to this I can't add a reference to MapTools inside the Silverlight project file.
The silverlight project does have a WCF RIA Service's Link but that does not connect to anything.
I am now wondering how the person that wrote the code has managed to call that namespace? I have tried researching how to add the MapTools.dll to the Global namespace but have not found anything.
Anyone have any ideas?
To do that there should be an some tool been used .
We had used in our projects a Portable library which allowed us to communicate through cross type of projects , below is the link :
https://msdn.microsoft.com/library/gg597391(v=vs.100).aspx
I am following http://facebooksdk.net/docs/phone/tutorial/ for logging into my Windows Phone 8 app through Facebook. Upon going through the article when I try to run the application, it gives me error-
The type or namespace name 'FacebookSessionClient' could not be found (are you missing a using directive or an assembly reference?)`
and,
The type or namespace name 'FacebookSession' could not be found (are you missing a using directive or an assembly reference?)
I am sure I have added all references and namespaces. So what I am doing wrong?
I'm not really familiar with this, but have you imported everything correctly? See also https://stackoverflow.com/a/3964462/561485
For in the top of your class:
using Facebook.Session;
I think this component has been removed from the lastest version.
The way about login is replaced by
"Session.ActiveSession.LoginWithBehavior("email,public_profile,user_friends", FacebookLoginBehavior.);"
public enum FacebookLoginBehavior
{
LoginBehaviorApplicationOnly,
LoginBehaviorMobileInternetExplorerOnly,
LoginBehaviorWebViewOnly,
}
But I still try how to login by using Facebook Beta App. If you have any ideas, I think we can discuss about this issue.
This happens because of the version of the Facebook SDK and the Facebook.Client.
Above problem can be resolved by installing the Facebook SDK version 6.3.2 and the Facebook.Client version 0.40-alpha
You can download and install using the Package Manager Console and the command can be found in here and here too.
I'm trying to follow this tutorial
http://msdn.microsoft.com/en-us/library/vstudio/ee943166.aspx
, but
using Microsoft.VisualStudio.PlatformUI;
fails for me. I get an error in VS 2012 and .NET Framework 4.5
The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Would be happy if someone tells how to fix it.
Thanks
The problem was solved by downloading and installing Microsoft Visual Studio 2012 SDK and adding Microsoft.VisualStudio.Shell.11.0.dll as ProgramFOX proposed.
Add a reference to Microsoft.VisualStudio.Shell.11.0.dll
I have found this link:
Detect Antivirus on Windows using C#
However when I try this code in visual c# express edition 2008 it says :
Error 1 The type or namespace name 'ManagementObjectSearcher' could not be found
(are you missing a using directive or an assembly reference?)
C:\Users\Andy\Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs 15 17 ConsoleApplication1
Amongst other similar errors on the 2 lines which seem important!
Looks like the code segment is missing some imports or something?
I am using Windows 7... Please help!
Andy
You are missing a reference to the assembly containing the type ManagementObjectSearcher, which is in the System.Managementnamespace. Add this namespace and it should work.
You will have to rightclick the project -> add reference and add the System.Management assembly. System.Managment is not added automatically with the creation of a new project.
WMI reference
WMI + C#