zoukankan      html  css  js  c++  java
  • 转载 使用Feature的方式部署Site column时, Field的Guid上忽略大括号将导致部署失败

    今天看到一篇老外的文章不错,转载下来,作个记录。

    文章的大意是:使用Feature的方式部署Site column时, xml文件中的Field结点的ID属性值,由于忽略大括号(如图一),导致部署时,一切正常,没有任何错误信息,但是却没有真正的部署成功。给ID的属性值加了大括号后(如图二)就OK了。

    MOSS and Site column deployment with features + missing curly brackets in guids

    I had nasty expience with Site column deployment this week and I thought I share it with you. I was doing normal Site column deployment with Features. It's nothing new and it's well documented in many places. I have done it before and I thought that it would be piece of cake. So I did my Feature.xml and SiteColumns.xml like I have done before. Here's a small clip from my SiteColumns.xml in Visual Studio:
    1
    And after that I did normal install stuff with stsadm. Everything went fine during install. No errors, warnings or nothing that would indicate that I have problems in my SiteColumns.xml. But when I searched for my new site columns at the SharePoint I couldn't find any. I checked my xmls many many many times and couldn't find anything that would ring a bell on me. After a long time of testing I finally tried adding { and } curly brackets into the ID -field of the site column definition (lines 4 and 11):
    2
    And then I did my stsadm magic again... hoping for a miracle. After that I checked Site Column Gallery at the SharePoint and I was stunned when I saw my site columns! So only problem that I had in my SiteColumn.xml was missing curly brackets in the guid! It's weird since in many other places you could have guid without the curly brackets. And even if the install phase ignored my site columns for that reason I think it would be nice to see warning like this:  "Cannot add field 'Account number' since it's missing ID". Ignoring something without any notice isn't nice...
    But even with that kind of issue I find the Feature & Solutions thingy really nice. Deploying stuff with Features & Solutions is something you should really learn if your playing with SharePoint. They'll make your life a lot easier when you want to deploy your stuff to another environment.
    Anyways... happy hacking!

  • 相关阅读:
    Visual Studio自带的的Developer Command Prompt对话框
    利用VS(Visual Studio)自带的工具查看DLL文件的信息
    谷歌面试官反馈级别
    Inno Setup中多语言时,使用占位符填充
    SQL*Plus命令
    Oracle 所有字典
    彻底完全卸载 SQL Server 2005 的图文教程
    win7(windows 7)系统下安装SQL2005(SQL Server 2005)图文教程
    创建表空间、新增用户、给用户赋予DBA权限 、删除用户下的上有数据表
    ORA-01012: not logged on
  • 原文地址:https://www.cnblogs.com/ITHelper/p/1716736.html
Copyright © 2011-2022 走看看