简体   繁体   English

在Sharepoint 2010 Foundation中部署时,不会刷新自定义母版页

[英]Custom master page not refreshing upon deployment in Sharepoint 2010 Foundation

I use VS2010 on Server 2008 R2 with Sharepoint 2010 Foundation. 我在Server 2008 R2上使用VS2010和Sharepoint 2010 Foundation。

I have created a custom master page following instructions from here: http://msdn.microsoft.com/en-us/library/gg447066.aspx (activating my custom page as feature), and was delighted with the results. 我按照以下说明创建了一个自定义母版页: http//msdn.microsoft.com/en-us/library/gg447066.aspx (激活我的自定义页面作为功能),并对结果很满意。 But as soon as I changed the images and attempted to deploy them through VS2010, I noticed that my changes were not showing in the page (which was still showing the old images). 但是一旦我更改了图像并尝试通过VS2010进行部署,我就注意到我的更改没有显示在页面中(仍显示旧图像)。

Useful observations: 有用的观察:

  • It's a Sandboxed solution. 这是一个沙盒解决方案。
  • I checked that wsp is built with the new images, and so it was. 我检查了wsp是用新图像构建的,所以它是。
  • When I retract my solution, I also go to Master Page Gallery, and delete my custom master page from there to make sure I start from scratch. 当我收回我的解决方案时,我也会去Master Page Gallery,并从那里删除我的自定义母版页,以确保我从头开始。 No difference. 没有不同。
  • My SP Designer does not give me an option to "revert to site definition". 我的SP Designer没有为我提供“恢复到网站定义”的选项。
  • My "Look and Feel" section in central admin does not offer a "reset to site definition" option. 中央管理员的“外观和感觉”部分不提供“重置到网站定义”选项。
  • Checking "CustomizedPageStatus" property of the SPFile for my master page shows that it's set to "none", and indeed, calling RevertContentStream throws an exception. 为我的母版页检查SPFile的“CustomizedPageStatus”属性表明它已设置为“none”,实际上,调用RevertContentStream会引发异常。 This indicates it may not necessarily be the unghosting issue. 这表明它可能不一定是unghosting问题。

Does anybody know where my images get deployed to , and what the cause of this problem may be? 有没有人知道我的图像部署到哪里 ,这个问题的原因是什么? The "Deployment Location" property does not lead to the correct location (in fact, I can't even see my Feature's folder). “部署位置”属性不会导致正确的位置(事实上,我甚至无法看到我的功能的文件夹)。 Could it be something to do with the way variables in the path - {SharePointRoot}\\Template\\Features{FeatureName}\\StyleLibrary\\Branding101\\Images\\ - are parsed? 它可能与路径中的变量 - {SharePointRoot} \\ Template \\ Features {FeatureName} \\ StyleLibrary \\ Branding101 \\ Images \\ - 的解析方式有关吗?

I am new to Sharepoint, so all and any help would be much appreciated. 我是Sharepoint的新手,所以非常感谢所有人和任何帮助。

Since this is a Sandboxed solution, everything gets stored in the content database, accessible through SharePoint Designer 2010. In SP Designer, open the site you are working on, then look under "All Files" in Site Objects: that's where I found my masterpages, images, etc. 由于这是一个沙盒解决方案,所有内容都存储在内容数据库中,可通过SharePoint Designer 2010访问。在SP Designer中,打开您正在处理的站点,然后查看站点对象中的“所有文件”:这是我找到我的主页的位置,图像等

Deployment paths (displayed in module properties in VS2010) are just red herring, as no deployment to the file system itself takes place. 部署路径(在VS2010中的模块属性中显示)只是红色鲱鱼,因为不会对文件系统本身进行部署。 Hope this helps somebody else! 希望这有助于其他人!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM