MSBuild 脚本中的访问代码无效错误
我正在开发一个 MSBuild 项目,当我尝试从脚本访问 Visual SourceSafe 时,出现奇怪的错误(该脚本基于我们正在使用的其他成功脚本,并且正在使用 MSBuild.Community.Tasks 中的 VssLabel 任务) 。错误是
“无效的访问代码(错误参数)”
有一篇 Microsoft 支持文章似乎可以解决此问题此处< /a>,它讨论了“影子文件夹”的路径值(即,这应该是 UNC 路径而不是使用驱动器号),但在检查安全后我发现没有设置“影子文件夹”。我们的其他源代码保险箱都没有设置影子文件夹,并且使用 VSS 的项目中的构建脚本不会出现此错误,因此这有点神秘。
这是该任务的代码:
<VssLabel UserName="xxxxx"
Password="xxxxxx"
Recursive="True"
DatabasePath="\\ofm\vss\Active\PayeeServices_VSS\srcsafe.ini"
Path="$/PayeeServices.root/PayeeServices"
Label="$(VersionLabel)"
我已经检查并重新检查了该任务中的路径,它们都是正确的。
I'm developing a MSBuild project and am getting an odd error when I try to access the Visual SourceSafe from the script (the script is based on other successful scripts we are using, and is using the VssLabel task from MSBuild.Community.Tasks). The error is
"Invalid access code (bad parameter)"
There is a Microsoft support article that seems to address this HERE, which talks about the path value of the "shadow folder" (namely, that this should be a UNC path rather than use a drive letter), but upon checking the Safe I find there is no "shadow folder" set. None of our other source safes have shadow folders set, and this error doesn't come up with build scripts in the projects that use VSS, so this is a bit mysterious.
Here is the code for the task:
<VssLabel UserName="xxxxx"
Password="xxxxxx"
Recursive="True"
DatabasePath="\\ofm\vss\Active\PayeeServices_VSS\srcsafe.ini"
Path="$/PayeeServices.root/PayeeServices"
Label="$(VersionLabel)"
I've checked and rechecked the paths in this task, and they are all correct.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很明显,问题不是 MSBuild,而是 MSBuild.Community.Tasks 有问题,并且由于该库仍然适用于我们的 VS2008 项目,因此问题似乎出在 MSBuild v4 和 VS2010 上。当我进一步检查时,我发现 Tigris.org 上的 MSBuild.Community.Tasks 社区站点显然已停止运行。我之前没有注意到,但该库的最后一次更新是在 2007 年 2 月。这看起来与活跃的开源项目非常不同。
看来我必须为 MSBuild 构建自己的 VSS 界面。迷人的。
或者也许还有另一个图书馆。无论如何,这个问题毫无意义。
It has become clear that the problem isn't MSBuild, but there is something wrong with MSBuild.Community.Tasks, and since that library still works with our VS2008 projects, it appears that the problem is with MSBuild v4 and VS2010. As I checked further I found that the MSBuild.Community.Tasks community site at Tigris.org is apparently moribund. I hadn't noticed before, but the last update of the library was in February 2007. This seems very unlike an active Open Source project.
It appears that I am going to have to build my own VSS interface for MSBuild. Lovely.
Or maybe there's another library out there. In any case, this question is moot.