“找不到文件” 在 MSBuild 社区任务中——哪个文件?
我正在尝试使用 MSBuild 社区任务的 VssGet 任务,但错误消息“找不到文件或项目”让我大吃一惊。 我无法弄清楚错误消息具体指的是什么。 任务如下:
<LocalFilePath Include="C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronom.sln" />
<VssGet DatabasePath="\\ofmapoly003\Individual\michaelc\VSS\Astronom_VSS\srcsafe.ini"
Path="$/Astronom_VSS"
LocalPath="@(LocalFilePath)"
UserName="build" Password="build"
Recursive="True" />
如果我编写一个 Streamreader 来读取数据库路径或本地路径,它就会成功。 因此,通向一切的道路似乎都是可以通达的。 有任何想法吗?
I'm trying to use the VssGet task of the MSBuild Community Tasks, and the error message "File or project not found" is beating me with a stick. I can't figure out what in particular the error message is referring to. Here's the task:
<LocalFilePath Include="C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronom.sln" />
<VssGet DatabasePath="\\ofmapoly003\Individual\michaelc\VSS\Astronom_VSS\srcsafe.ini"
Path="$/Astronom_VSS"
LocalPath="@(LocalFilePath)"
UserName="build" Password="build"
Recursive="True" />
If I write a Streamreader to read to either the database path or the local path, it succeeds fine. So the path to everything appears to be accessible. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
两个想法。 第一,有时类型加载异常表现为 FNF - 希望不是这样。 但如果代码确实是诚实的,您可以使用 Procmon 或 Filemon。 启动这些实用程序之一,然后再次运行您的任务。 您应该能够找到无法定位的文件的记录。
Two thoughts. One, sometimes a type load exception manifests as a FNF - let's hope that's not it. But if the code is actually being honest, you can track the problem using Procmon or Filemon. Start one of those utilities and then run your task again. You should be able to track down a record of a file that couldn't be located.
@knownhamsandwich 这是一个很好的回应——我以前没有听说过 procmon 或 filemon。 尝试了 procmon 来解决这个问题,但即使在筛选了相关输出之后(天哪,机器在屏幕后面做了比我意识到的更多的事情)我也找不到我引用的文件在哪里没有找到。
@famoushamsandwich that's a great response -- I had not previously heard of procmon or filemon. Tried procmon on the problem, but even after sifting through the relevant output (my gosh the machine does a lot more stuff behind the screen than I was aware of) I couldn't find where a file I'm referencing wasn't being found.
Procmon 和 Filemon 是很好的建议 - 只要确保过滤结果以仅显示错误即可。 否则成功消息将掩盖问题条目。 此外,您可以过滤掉没有错误的进程(通过过滤器对话框或右键单击条目并选择“排除进程”。)
其他一些想法:
Procmon and Filemon are good suggestions - just make sure you filter the results to only show errors. Otherwise the success messages will bury the problem entries. Also, you can filter out processes that are not at fault (either through the filter dialog or by right-clicking the entry and choosing "Exclude Process".)
A couple other thoughts: