Sto usando Snarl C# API per inviare notifiche al ringhio.Perché visualizzo l'errore CS0246: Impossibile trovare il nome del tipo o dello spazio dei nomi?
ora ho salvato il contenuto di sopra URL in un file chiamato SnarlNetwork.cs
e il contenuto del mio file test.cs
sono:
using SnarlNetworkProtocol;
using System;
class test
{
public static void Main(String[] args)
{
SNP snarl_object = new SNP();
string hostname = "localhost";
string hostport = "9887";
string appName = "Spotify";
bool val = snarl_object.register(hostname, hostport, appName);
if (val == true)
{
string title = "hello";
string message = "world";
string timeout = "5";
bool newval = snarl_object.notify(hostname, hostport, appName, null, title, message, timeout);
if (newval == true)
{
Console.WriteLine("sucessfull");
}
}
}
}
Ora, quando provo a compilare il mio file Test.cs utilizzando csc test.cs
ho la seguente errore:
C:\Users\Noob\csharp>csc test.cs
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.4926
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.
test.cs(1,7): error CS0246: The type or namespace name 'SnarlNetworkProtocol' could not be found (are you missing a using directive or an assembly reference?)
Allora, che cosa sto facendo male qui perché secondo me non manca alcun using directive
.
Grazie. Ha funzionato. – RanRag
Contrassegnare come risposta? –
@JamesWood: Lo farò, ma StackOverflow dice 'È possibile accettare la risposta in 2 minuti' – RanRag