Visual Studio网站参考路径 [英] Visual Studio Website Reference Paths

查看:118
本文介绍了Visual Studio网站参考路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio网站项目中(在Visual Studio 2005或更高版本中,不是在仍然存在.csproj文件的Web应用程序项目中)如何存储参考信息,并且有可能在不将编译二进制文件存储在源代码中的情况下进行源代码控制控制吗?

In Visual Studio website projects (in Visual Studio 2005 or later, not web application projects where there is still a .csproj file) how is the reference information stored, and is it possible to source control it without storing compiled binaries in source control?

如果右键单击网站项目并选择属性页",则第一个屏幕(参考)将列出所有项目参考.

If you right-click on a website project and select Property Pages, the first screen (References) lists all the project references.

System.*引用被列为GAC类型,其他DLL文件可以列为BIN或Project.

System.* references are listed as type GAC, and other DLL files can be listed as BIN or Project.

当您包含某些内容作为项目引用,然后将其提交到源代码管理(对于我们来说,Subversion,忽略.dll和.pdb文件)时,就会发生问题.

The problem occurs when you include something as a project reference, and then commit it to source control (for us, Subversion, ignoring .dll and .pdb files.)

另一个开发人员从资源库获取更新的代码,必须手动设置所有这些项目引用,但是我什至无法确定此信息的存储位置,除非它位于不对源代码控制友好的.suo中.

Another developer gets updated code from the repository and has to manually set up all of these project references, but I can't even determine where this information is stored, unless it's in that .suo, which is NOT source-control friendly.

推荐答案

如果通过浏览选项卡按文件名引用.dll,则应该创建一个.refresh文件(位于BIN中的dll下).我们将它们放在SVN中,并且效果很好(您可能需要手工编辑它们以使用相对路径).

If you reference a .dll by file name through the browse tab, there should be a .refresh file created (nested under the dll in BIN). We put those in SVN and it works great (you may have to hand edit them to use relative paths).

从.NET选项卡添加的引用被添加到web.config

References added from the .NET tab are added to web.config

项目引用存储在解决方案(.sln)文件中.打开.sln文件,您将看到列出的文件:

Project references are stored in the solution (.sln) file. Open the .sln file and you'll see them listed:

Project("{xxxxxxx-7377-xxxx-xxxx-BC803B73C61A}") = "XXXXXXX.Web", "XXXXXXX.Web", "{xxxxxxxx-BB14-xxxx-B3B6-8BF6D8BC5AFF}"
    ProjectSection(WebsiteProperties) = preProject
        TargetFramework = "3.5"
        ProjectReferences = "{xxxxxxxx-C3AB-xxxx-BBED-2055287036E5}|XXXXXX.Data.dll;
            ...

这篇关于Visual Studio网站参考路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆