在Windows 7 x64中使用.NET读取MPP文件 [英] Reading MPP file with .NET in Windows 7 x64

查看:109
本文介绍了在Windows 7 x64中使用.NET读取MPP文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在.NET中开发了一个测试应用程序,可以读取MPP文件.它只是遍历''可用节点并将其显示为列表,例如:
''打开文件.如您所见,此构造函数中有许多选项
Dim proj As Project = projectApp.ActiveProject
对于proj.GetType().GetProperties()中的每个p作为System.Reflection.PropertyInfo
如果p.CanRead然后
试试
Console.WriteLine("{0}:{1}",p.Name,p.GetValue(proj,Nothing))
昏暗的项目作为RadListBoxItem =新的RadListBoxItem
item.Name = p.Name
item.Text = p.Name
item.Value = p.GetValue(proj,Nothing)
lbNodes.SelectedIndex = 0
如果blnComboboxItemSelected = False,则
lbNodes.SelectedItem = p.Name
blnComboboxItemSelected = True
如果结束
lbNodes.Items.Add(item)
异常捕获
结束尝试
如果结束
下一个
这在XP Pro中有效.我可以看到任务"节点.但是,Windows 7 Pro x64中缺少它.

I have developed a test app in .NET that reads an MPP file. It just iterates thru'' the available nodes and shows them as a list, like such:
'' Open the file. There are a number of options in this constructor as you can see
Dim proj As Project = projectApp.ActiveProject
For Each p As System.Reflection.PropertyInfo In proj.GetType().GetProperties()
If p.CanRead Then
Try
Console.WriteLine("{0}: {1}", p.Name, p.GetValue(proj, Nothing))
Dim item As RadListBoxItem = New RadListBoxItem
item.Name = p.Name
item.Text = p.Name
item.Value = p.GetValue(proj, Nothing)
lbNodes.SelectedIndex = 0
If blnComboboxItemSelected = False Then
lbNodes.SelectedItem = p.Name
blnComboboxItemSelected = True
End If
lbNodes.Items.Add(item)
Catch ex As Exception
End Try
End If
Next
This works in XP Pro. I am able to see the "Task" node. However, it is missing in Windows 7 Pro x64.

推荐答案

ms并不是一个太大的标记. Windows 7 4 bit或VB.NET怎么样?

您要构建64位版本吗?您是说代码可以运行,但是所需的节点丢失了,还是炸掉了?
ms is not much of a tag. How about Windows 7 4 bit, or VB.NET ?

Are you building a 64 bit version ? Are you saying that the code works, but the node you need is missing, or it blows up ?


32位.该代码有效.该节点丢失.它不会爆炸.
32 bit. The code works. The node is missing. It doesn''t blow up.


我输入了ms项目,只用了ms:)
I typed ms project and it just took ms :)


这篇关于在Windows 7 x64中使用.NET读取MPP文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆