C#2005访问VSS问题
最近在写一个用VS2005访问VSS的工具,从VSS上下载文件,按照MSDN上的说明(http://msdn.microsoft.com/en-us/library/w3khk6k6(VS.80).aspx)但是有问题:按照下面第7步打开“添加引用”后,找不到“IVSS Microsoft.VisualStudio.SourceSafe.Interop.dll ”,而且增加using Microsoft.VisualStudio.SourceSafe.Interop后编译失败,提示:命名空间“Microsoft”中不存在类型或命名空间名称“VisualStudio”(是缺少程序集引用吗?)
不知是什么原因,望高手指点,多谢!!
//附MSDN的帮助
Create a C# Test Project
To create a test project in C# do the following:
Create a new SourceSafe database at c:\VSSTestDB.
1.For details on how to create a new database, see How to: Log In to Visual SourceSafe.
2.Start Visual Studio and, from the Start page, choose New Project.
3.Select Visual C# Projects from the tree view on the left side of the screen.
4.Select Console Application as the project template.
5.Set the name of the application to IVSSTest and click OK to create the project.
6.Highlight the file called Class1.cs in Solution Explorer and rename it to PName.cs. Completely delete the code inserted by Visual Studio into this file.
7.To use the Primary Interop Assembly for the SSAPI.DLL COM component, select References under IVSSTest project; use right mouse button and then select Add Reference. Make sure that the .NET tab is selected, and use Select button to select IVSS Microsoft.VisualStudio.SourceSafe.Interop.dll Primary Interop Assembly. This will add the component to the Selected Components list.
8.Click OK.
--------------------编程问答-------------------- 现在没有了可用分了,上面给分是0,望各位见谅,还请不吝赐教哈~~
再次感谢!! --------------------编程问答-------------------- 刚才搞错了,有50分,呵呵:) --------------------编程问答-------------------- 。。。VS2005里面有VSS控制啊,你写这个做什么。。。话说程序团队开发不都在VS2005下用VSS管理的吗 --------------------编程问答-------------------- 还真不知道咧
去网上搜下Interop.dll,看他是搞么事的 --------------------编程问答-------------------- 哈哈,我自己搞定啦。给大家分享一下:
在添加引用中点,通过浏览页选取VSS带的ssapi.dll,导入后,通过using SourceSafeTypeLib; 就可以访问VSSDatabase和IVSSItem了.
谢谢前面两位的关注,我开发的工具想从VSS上下载文件(不是项目、代码),
补充:.NET技术 , C#