“找不到文件” 在 MSBuild 社区任务中——哪个文件?

发布于 2024-07-08 04:56:08 字数 559 浏览 8 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

客…行舟 2024-07-15 04:56:08

两个想法。 第一,有时类型加载异常表现为 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.

嗳卜坏 2024-07-15 04:56:08

@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.

海螺姑娘 2024-07-15 04:56:08

Procmon 和 Filemon 是很好的建议 - 只要确保过滤结果以仅显示错误即可。 否则成功消息将掩盖问题条目。 此外,您可以过滤掉没有错误的进程(通过过滤器对话框或右键单击条目并选择“排除进程”。)

其他一些想法:

  • 在 LocalFilePath 中,您指定单个文件而不是到一个文件夹。 另一方面,该任务指定以递归方式获取文件。 也许您需要从 LocalFilePath 中删除“\Astronom.sln”?
  • 构建任务是在您的帐户还是其他帐户下运行? 您可能遇到权限问题
  • 您是否已在同一位置获取了代码的副本? 也许无法覆盖现有文件/文件夹?

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:

  • In the LocalFilePath, you are specifying a single file as opposed to a folder. The task, on the other hand, specifies to get files recursively. Perhaps you need to remove "\Astronom.sln" from the LocalFilePath?
  • Is the build task being run under your account or another? It's possible you have a permissions issue
  • Do you already have a copy of the code pulled down in the same location? Perhaps there is a failure to overwrite an existing file/folder?
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文