草庐IT

product_path

全部标签

c# - 'Property:NETFRAMEWORK45' 部分中对符号 'Product:*' 的未解决引用

在TFS2010中构建应用程序时出现错误。未解决对“产品:*”部分中符号“属性:NETFRAMEWORK45”的引用。这是用于Wix3.9Wix包引用了NetFxExtension。我可以在我的本地机器上很好地构建wix,但是当我通过TFS构建它时,我得到了错误。谁能帮我解决这个问题?我有以下导致错误的代码。 最佳答案 您必须在您的项目中包含WixNetFxExtension,最多3个位置在wxs文件的Wix元素中,添加命名空间xmlns:netfx="http://schemas.microsoft.com/wix/NetFxEx

c# Directory.CreateDirectory( path ),我应该先检查路径是否存在吗?

我需要将一些文件复制到目录中,但有时该目录不存在,必须先创建。大多数情况下,该目录将存在,因为它只需创建一次。我知道我可以将Directory.CreateDirectory()放在文件副本之前,如果目录已经存在,CreateDirectory()就会返回。stringdestFolder;//pathtodestinationstringsourceFolder;//pathtosourceDirectory.CreateDirectory(destFolder);//thiswillworkevenifdestFolderexistsFile.Copy(sourceFolder+s

c# - Process.Start() 和 PATH 环境变量

我有以下简单的C#应用程序,它只是尝试启动“jconsole.exe”,它在我的机器上位于C:\Programs\jdk16\bin中。usingSystem;usingSystem.Diagnostics;namespacednet{publicclassdnet{staticvoidMain(string[]args){try{Process.Start("jconsole.exe");Console.WriteLine("Success!");}catch(Exceptione){Console.WriteLine("{0}Exceptioncaught.",e);}}}}如果我

c# - 将文件夹名称与 Productivity Power Tools 颜色编码相匹配的正则表达式

我想配置RexEx以匹配任何打开文件的文件路径的任何文件夹(父文件夹或子文件夹)。因此,如果文件路径中的任何文件夹包含打开文件的名称,则选项卡的颜色编码将根据RegEx匹配设置。例如:websiteRoot/Content/MyName1/site.css=文件打开时的绿色标签websiteRoot/Content/MyName2/site.css=文件打开时的橙色标签websiste/Shared/MasterPages/MyName1/main.master=文件打开时的绿色标签websiste/Shared/MasterPages/MyName2/main.master=文件打开

c# - new FileInfo(path).Name 与 Path.GetFileName(path)

哪个更好用,为什么?我的意思是这两个命令在哪些方面不同以及如何不同?性能、可读性……newFileInfo(path).Name或Path.GetFileName(path) 最佳答案 因为您不必为使用Path.GetFilename()创建新对象,所以性能会更好。这是两者的比较:代码:Path.GetFileName("G:\\u.png")IL:IL_0000:ldstr"G:\u.png"IL_0005:callSystem.IO.Path.GetFileName代码:newFileInfo("G:\\u.png").Name

c# - ASP.NET Core 2.0 预览版 1 : How to set up Cookie Authentication with custom login path

在ASP.NETCore2.0中,.UseAuthentication()中间件有一个重大更改,不再允许oldsyntaxmentionedhere去工作。新版本似乎在addAuthentication中处理配置,但我无法在任何地方找到任何关于如何更改指定自定义登录和注销url的旧代码的详细信息。services.AddAuthentication(o=>{//WherecanIspecifythis?????varopt=newCookieAuthenticationOptions(){LoginPath="/api/login",LogoutPath="/api/logout",}

c# - "Access to the path ... is denied"(.NET C#)

我一直在将一个小的XML数据文件保存到外部驱动器,没问题。但后来我尝试使用ApplicationData文件夹和其他文件夹,甚至C:\但没有运气。我收到类似“访问路径“C:\”被拒绝”的错误。只是为了确认,文件已创建并使用当前代码正常读取到外部驱动器。我想这与安全和权限有关,但我没有发现任何有用的东西。如果您能在这方面为我指明正确的方向,请提前致谢!stringfipData=@"F:\IL2\SIIYM\SIIYMData.xml";//externaldriveok:-)//stringfipData=Environment.GetFolderPath(Environment.Sp

c# - 具有驱动器号的 Path.Combine() 行为

根据有关Path.Combine方法的官方文档:https://msdn.microsoft.com/en-us/library/fyy7a5kt(v=vs.110).aspxRemarksIfpath1isnotadrivereference(thatis,"C:"or"D:")anddoesnotendwithavalidseparatorcharacterasdefinedinDirectorySeparatorChar,AltDirectorySeparatorChar,orVolumeSeparatorChar,DirectorySeparatorCharisappended

c# - 为什么这个 Path.Combine 不起作用?

这个问题在这里已经有了答案:WhydoesPath.CombinenotproperlyconcatenatefilenamesthatstartwithPath.DirectorySeparatorChar?(16个答案)关闭9年前。我有以下命令:stringreportedContentFolderPath=Path.Combine(contentFolder.FullName.ToString(),@"\ReportedContent\");当我查看调试器时,我可以看到以下内容:contentFolder.FullName="E:\\"不过reportedContentFolde

c# - 在 Directory.GetFiles 中使用通配符时出现 "Illegal characters in path"错误

我有一个包含多个包含.doc文件的子目录的目录。示例:C:\Users\user\Documents\testenviroment\Released\test0.docC:\Users\user\Documents\testenviroment\Debug\test1.docC:\Users\user\Documents1\testenviroment\Debug\test2.docC:\Users\user\Documents1\testenviroment\Released\test20.doc我想获取所有Debug文件夹下的所有test*.doc文件。我试过:string[]fi