我在vb.net中制作插件应用程序,也为此进行设置,但我需要在instller.vb类文件中的一些帮助
我想将TestAddIn.addin文件复制到客户端位置,并且此文件是随安装文件一起添加的,我如何在复制到客户端计算机的安装程序文件中执行代码?
目标路径:
Dim addinTargetPath As String = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Visual Studio 2008\Addins")
源路径:
dim addinsourcePath As String =....................???????????
在提供当前工作目录的源路径中写入什么?
发布于 2014-01-02 20:30:13
这类似于问题executable directory where application is running from;Justin Niessner提供的答案是一个非常好的解决方案,它将返回当前正在执行的应用程序的路径
返回的字符串的格式为" path :\Directory“,因此您必须修剪前6个字符才能在程序中将其用作路径字符串。这就是我在我的一个程序中使用它的方式
strPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase)
i = strPath.Count
strPath = strPath.Substring(6, i - 6)
发布于 2013-03-11 11:25:05
https://stackoverflow.com/questions/15337230
复制相似问题