这是什么?我收到错误1在模块mscorlib.dll中找不到类型System.ApplicationException。 agsxmpp_demo [英] what is this? am getting Error 1 Cannot find type System.ApplicationException in module mscorlib.dll. agsxmpp_demo
本文介绍了这是什么?我收到错误1在模块mscorlib.dll中找不到类型System.ApplicationException。 agsxmpp_demo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试连接服务器这里为我的wp8.1聊天应用程序我得到这个错误是什么?这是我第一次遇到这种类型的错误
i am trying to connect server here for my wp8.1 chat app iam getting this erroe what is this? this s first time i got this type of error
Error 1 Cannot find type System.ApplicationException in module mscorlib.dll. agsxmpp_demo
我的代码..
my code ..
using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Matrix.Xmpp;
using Matrix.Xmpp.Client;
using Matrix.Xmpp.Sasl;
using agsXMPP;
using agsXMPP.protocol.client;
using agsXMPP.protocol.iq.roster;
using agsXMPP.protocol.iq.vcard;
using agsXMPP.Collections;
using Windows.UI.Popups;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=391641
namespace agsxmpp_demo
{
public sealed partial class MainPage : Page
{
public string Jid_Sender = "sree1";
public string pw = "sree2";
string uname = "aps";
string server = "taurus";
public MainPage()
{
this.InitializeComponent();
this.NavigationCacheMode = NavigationCacheMode.Required;
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
}
void loggedIn (object o)
{
Frame.Navigate(typeof(page2));
}
void loginFailed(object o,agsXMPP.Xml.Dom.Element el)
{
MessageDialog msgbox = new MessageDialog("Check server name/IpAddress");
}
private void Button_Click(object sender, RoutedEventArgs e)
{
agsXMPP.XmppClientConnection objXmpp = new agsXMPP.XmppClientConnection();
Jid jid = new Jid("xyz@taurus.com");
objXmpp.Server = jid.Server;
objXmpp.Username = jid.User;
objXmpp.Password = "sree";
objXmpp.AutoResolveConnectServer = true;
try
{
objXmpp.OnLogin += loggedIn; // loggedIn is handler for successful login to server.
objXmpp.OnAuthError += loginFailed;
objXmpp.Open();
}
catch(Exception ex)
{
}
}
}
}
推荐答案
系统。数据不适用于Metro风格的应用。
从项目中删除对System.Data.dll的引用。
看看将System.Data添加到C#中MetroApp提供内部错误 [ ^ ]。
System.data is not available to Metro style apps.
Remove the reference to System.Data.dll from project.
Take a look at Adding System.Data into C# MetroApp gives internal eror[^] .
这篇关于这是什么?我收到错误1在模块mscorlib.dll中找不到类型System.ApplicationException。 agsxmpp_demo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文