转载 使用Feature的方式部署Site column时, Field的Guid上忽略大括号将导致部署失败
2010-04-21 00:10
453 查看
今天看到一篇老外的文章不错,转载下来,作个记录。
文章的大意是:使用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:
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):
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!
文章的大意是:使用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:
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):
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!
相关文章推荐
- 转载:FastDFS的配置、部署与API使用解读(3)以流的方式上传文件的客户端代码
- sql语句中导致索引失败的一些错误使用方式
- Taglib的打包部署和使用方式详解(转载)
- 在lighttpd上使用fastcgi方式部署hg server[转载]
- 使用ASP.NET Web API自带的类库实现对CORS的支持(在开发中使用这种方式)(转载)
- ARX二次开发中使用DAO方式访问数据库,导致AutoCAD2004及以上版本退出时报错的解决方法
- 转载 Android中使用BitmapFactory的decodeStream()方法解码图片失败问题
- 使用getJSON进行局部刷新时,url所带参数过长,导致失败的解决方法
- VB6 无法加载ieframe.dll,导致不能使用 浏览器控件--(转载)
- Taglib打包部署和使用方式
- (转载)oracle 10g使用exp管道压缩方式减小文件大小
- 使用nisebosh方式部署cloudfoundry多节点一
- 使用Myeclipse进行java web开发的三种Tomcat部署方式
- iOS 7.1使用企业应用部署方式无法安装app
- yaf 使用__get后造成模板自动渲染失败--补充转载
- iOS 7.1使用企业应用部署方式无法安装app(2014-09-13更新:dropbox被墙后的解决方案)
- MDT2010部署之三使用LTI基于光盘安装方式部署Windows XP
- git使用之忽略不需要上传的文件的几种方式
- 使用过多的窗体导致创建句柄失败的解决办法
- Unity5 使用自带的字体导致BuildAssetbundle失败An asset is marked with HideFlags.DontSave but is included in the