Janus Xml保存约会摘要方法失败VB.NET 2010
我正在使用Janus Schedule dll(以及其他Janus引用,如Janus.common、Janus.calendar.dll)将约会保存在xml文件中(我正在使用Janus Winforsv) 控制套件V3.0) 我已在我的电脑上成功运行了该应用程序,但在其他电脑上运行该程序时,调用Janus Xml保存约会摘要方法失败VB.NET 2010,xml,vb.net,visual-studio-2010,.net-4.0,janus,Xml,Vb.net,Visual Studio 2010,.net 4.0,Janus,我正在使用Janus Schedule dll(以及其他Janus引用,如Janus.common、Janus.calendar.dll)将约会保存在xml文件中(我正在使用Janus Winforsv) 控制套件V3.0) 我已在我的电脑上成功运行了该应用程序,但在其他电脑上运行该程序时,调用saveappoints方法时程序失败,错误出现在Schedule1。saveappoints(stream) 方法是: Private Sub SaveAppointments() Di
saveappoints
方法时程序失败,错误出现在Schedule1。saveappoints(stream)
方法是:
Private Sub SaveAppointments()
Dim stream As System.IO.Stream
If (fileName Is Nothing) Then
If (saveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK) Then
fileName = saveFileDialog1.FileName
stream = saveFileDialog1.OpenFile()
Else
Return
End If
Else
stream = New System.IO.FileStream(fileName, System.IO.FileMode.Create)
stream.Position = 0
Schedule1.SaveAppointments(stream) ''*******HERE IS THE ERROR
stream.Close()
stream = Nothing
appointmentsChanged = False
End If
End Sub
我得到的错误是:
System.TypeLoadException: Abstract Method with non-zero RVA
at Janus.Windows.Common.Layouts.PropertyValue.a(XmlWriter , IJanusLayout
at Janus.Windows.Common.Layouts.JanusLayoutWriter.a(XmlWriter , IJanusLayout )
at Janus.Windows.Common.Layouts.JanusLayoutWriter.FillStream(Stream stream)
at Janus.Windows.Schedule.Schedule.SaveAppointments(Stream stream)
at FOEA.MainForm.SaveAppointments()
at C:\FOE\UI\MainForm.vb:línea 78
at FOEA.MainForm.MainMenu_Click(Object sender, EventArgs e)
at C:\FOEA\UI\MainForm.vb:line 143
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItem.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Command.DispatchID(Int32 id)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
首先,我怀疑目标PC需要为Xml.linq.dll
安装.NET3.5,
但是我引用了DLL,然后我将Copy local赋值为true,并添加了所有必需的DLL,仍然抛出该错误
另一个猜测是System.Xml.dll
的名称与我的bin目录中的dll不一样(System.Xml.dll
),可能是大写字母使vb.net无法识别Xml dll?,但我认为这与错误无关
我已安装:
- Microsoft.NET 4 Framework客户端配置文件
- 微软.NET4框架扩展版
- MSXML 4.0 SP2解析器和SDK
- MSXML 4.0 SP3解析器
我不知道该怎么办,因为该程序运行在我的电脑和其他我有,但不是在目标电脑上运行。。。你认为我应该在目标电脑上安装Janus winforms吗?也许那会有用我以前用过杰纳斯。 我使用的保存约会的方法是:
Private Sub SaveAppointments()
Me.Cursor = Cursors.WaitCursor
Dim appointmentsDir As String = "yourAppsFile.xml"
Dim appointmentsStream As System.IO.FileStream
appointmentsStream = New System.IO.FileStream(appointmentsDir, System.IO.FileMode.Create)
Schedule1.SaveAppointments(appointmentsStream)
appointmentsStream.Close()
Me.Cursor = Cursors.Default
End Sub
还要验证xml文件是否具有所有根和元素(格式良好的xml)
在Janus 3.5中
<?xml version="1.0" encoding="utf-8"?>
<Schedule>
<Fields Collection="true" ElementName="Field" />
<Owners Collection="true" ElementName="Owner" />
<Appointments Collection="true" ElementName="Appointment">
<Appointment0>
<Description>test </Description>
<EndTime>10/10/2011 11:00:00</EndTime>
<Text>test </Text>
<StartTime>10/10/2011 10:30:00</StartTime>
</Appointment0>
</Appointments>
</Schedule>
试验
10/10/2011 11:00:00
试验
10/10/2011 10:30:00
我只需简单地更改标签,就可以轻松地将您的潜在观众人数增加一倍。从你的代表人数来看,你在这里待的时间够长了,你应该知道自己应该这样做。