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.开发者_如何学Go
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.
精彩评论