找不到相对路径! [英] Relative Path could not be found!

查看:106
本文介绍了找不到相对路径!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用msbuild生成一个项目,该项目给出了一个相对路径,例如".. \ .. \ Path \ Project",实际上,该目标的位置是正确确定的.但是,msbuild返回错误:项目不存在."

1st我必须使用msbuild使用不同的语法指定相对路径吗?
2nd是否有其他原因导致此错误?


MSBuild在另一个项目中被称为PostBuildEvent,其行如下:
CommandoLine="msbuild ..\..\Path\Project
现在,我发现这条线在两种情况下导致
msbuild Project在命令提示符下以及在其他四种情况下(每种情况下项目"是一个不同的文件)导致了
msbuild ..\..\Path\Project在命令提示符下没有返回错误.
在每种情况下,都存在特定文件(所有文件都位于同一目录中).
我不相信计算机使用相同的命令执行不同的操作,所以那里出了什么问题?
msbuild是否可能更改了从wich生成的路径?



在此先感谢您的帮助.

关于

I tried to generate a project with msbuild giving a relative path like "..\..\Path\Project" and in fact the destination of this is determined correctly. However, msbuild returns an error: "Project does not exist."

1st Do I have to specify relative paths with a different syntax using msbuild?
2nd Are there ohter reasons for this error?


MSBuild is called in another project as a PostBuildEvent with the line:
CommandoLine="msbuild ..\..\Path\Project
Now I''ve discovered that this line in two cases led to
msbuild Project on Command Prompt and in four other cases (in each case "Project" is a different File) it led to
msbuild ..\..\Path\Project on Command Prompt which didn''t return an error.
In every case the specific file exist (all files are in the same directory).
I don''t believe in computers doing different things with the same command so what is wrong there?
Is it possible that the path from wich is generated is changed by msbuild?



Thanks in advance for any help.

Regards

推荐答案

在该行之前,发出命令"dir"以显示当前目录.这会告诉您msbuild认为它在哪里.
Right before that line, issue the command ''dir'' to display the current directory. This will tell you where msbuild thinks it''s at.


这篇关于找不到相对路径!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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