我是Phone 7开发新手。将文件从桌面应用到Windows Phone 7隔离存储
我想创建一个应用程序,将加载我从手机上的设置位置创建的所有DLL。
我有一个基本的菜单应用程序,将加载我创建的所有DLL,然后向用户显示一个列表,然后使用反射从DLL和描述中获取图标。
我有以下代码来获取所有DLL,但它不工作
Dim cPlugins As New PluginCollection
Dim temp As String = System.Reflection.Assembly.GetExecutingAssembly.GetName().CodeBase.ToString
temp = System.Reflection.Assembly.GetExecutingAssembly.FullName
Dim strFolder As String = System.IO.Path.GetDirectoryName(temp)
strFolder = System.IO.Path.Combine(strFolder, "DLLS")
For Each strFile As String In System.IO.Directory.GetFiles(strFolder, "*.dll")
cPlugins.Add(New Plugin(strFile))
Next
上面的代码不工作,不断返回错误未找到文件。
请帮忙吗?
这是在电话上运行吗? – ChrisF 2011-06-06 20:12:35
它落在行'Dim temp As String = System.Reflection.Assembly.GetExecutingAssembly.GetName()。CodeBase.ToString' – 2011-06-06 20:40:59