文件应该放在 SharePoint 解决方案中的哪里?
我们的 SharePoint 解决方案最近已升级到 SharePoint 2010,我们正在研究如何打包和部署网站,看看是否有更好的方法来完成任务。
我们目前打包了我们网站所需的所有文件(dll、图像、svc 文件、xap 文件、js 文件、css 文件、母版页、html 文件、aspx 文件)并将它们部署到 14/template/features/OurFeature/
我已经大量阅读有关 Microsoft Visual Studio 2010 中的 SharePoint 开发人员工具的内容,我想用它来打包/部署我们的解决方案。 Visual Studio 似乎允许将文件夹映射到 SharePoint 的图像和布局目录,并且还允许其他映射文件夹。我想知道上面提到的任何其他文件类型是否有标准位置,或者我们当前在模板/功能文件夹中存储内容的方法是一个好主意吗?目前,我们将内容映射到 IIS 中的此文件夹,因此 ~/images/ 指向我们网站的图像等。
有人可以向我指出 SharePoint 网站文件组织的最佳实践吗?以一种方式做事比另一种方式有好处吗?
Our SharePoint solution has recently been upgraded to SharePoint 2010, and we are taking a look at how we package and deploy the site to see if there are better ways to do things.
We currently package all files needed for our site (dll's, images, svc files, xap files, js files, css files, masterpages, html files, aspx files) and deploy them to 14/template/features/OurFeature/
I've been doing a lot of reading about SharePoint Developer Tools in Microsoft Visual Studio 2010, and I would like to use this to package/deploy our solution. It seems Visual Studio allows for mapped folders to SharePoint's images and layouts directories, and also allows other mapped folders. I'm wondering if there are standard locations for any of the other file types that I have mentioned above, or is our current method of storing things in the template/features folder a good idea? We currently map things to this folder in IIS, so ~/images/ points to our site's images and so forth.
Can someone point me to best practices for SharePoint site file organization? Are there benefits to doing things one way versus another?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
图像应该放在
14\TEMPLATE\IMAGES
或图像库中(我通常使用图像库,这样就可以在不强制部署的情况下更改图像)。客户端库(.xap 文件、.js 文件等)应放入
14\TEMPLATE\LAYOUTS\ClientBin
.dll 文件应发送到
GAC
或BIN
目录运行程序集 .dll 文件的 Web 应用程序GAC
或BIN
目录可以存在于文档库、ClientBin、14\TEMPLATE\Layouts
下的自定义文件夹或14\TEMPLATE\LAYOUTS\STYLES
中(我通常将它们放在样式库中因此,如果需要,可以更改它们,而无需重新部署整个解决方案。).svc 文件应该进入
14\ISAPI
。这些可在/_vti_bin/
路径下访问。功能位于
14\TEMPLATE\FEATURES
Images should go in
14\TEMPLATE\IMAGES
or an Image Library (I usually use an image library so images can be changed without forcing a deployment).Client Libraries (.xap files, .js files, etc.) should go in
14\TEMPLATE\LAYOUTS\ClientBin
.dll files should get sent to the
GAC
or theBIN
directory for the web application running the assembly.css files can live in a document library, ClientBin, a custom folder under
14\TEMPLATE\Layouts
, or14\TEMPLATE\LAYOUTS\STYLES
(I usually put these in a style library so they can be changed if needed without having to re-deploy the whole solution.).svc files should go in
14\ISAPI
. These are accessed under the/_vti_bin/
path.Features go in
14\TEMPLATE\FEATURES
除了凯尔所说的之外,如果您将文件放入配置单元 (14) 中,例如图像、布局、样式,通常最好添加一个目录(缩短的命名空间)以避免名称冲突。
In addition to what Kyle said, if you put files in the hive (14), say in Images, Layouts, Styles, it is normally good practice to add a directory (shortened namespace) to avoid name clashes.