私はSnarl C# APIを使用してsnarlに通知を送信しています。エラーが発生するのはなぜですか?CS0246:型または名前空間の名前が見つかりませんでしたか?
は今、私はSnarlNetwork.cs
という名前のファイルに上記のURLの内容を保存しているし、私のtest.cs
ファイルの内容は以下のとおりです。私はcsc test.cs
を使用して、私のtest.csファイルをコンパイルしようとすると
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");
}
}
}
}
は今、私が取得しますエラー以下:だから
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?)
、私はどんなusing directive
が欠落していないです、私に従っているため、ここで間違って何をやっています。
ありがとうございます。出来た。 – RanRag
答えとしてマークしますか? –
@JamesWood:私はstackoverflowに「あなたは2分で答えを受け入れることができる」と言います – RanRag