tag:blogger.com,1999:blog-4126985520350746834.post8891733122178196122..comments2024-03-28T07:00:21.554+00:00Comments on Chris O'Brien: Building and deploying SharePoint Solution packagesChris O'Brienhttp://www.blogger.com/profile/10022906552670607366noreply@blogger.comBlogger41125tag:blogger.com,1999:blog-4126985520350746834.post-84425288695473526592009-05-13T19:39:00.000+01:002009-05-13T19:39:00.000+01:00@Anonymous,
Sure you can do this. If you are buil...@Anonymous,<br /><br />Sure you can do this. If you are building the Solution manually as I describe in this article, you should add lines for these files to the .ddf file. If you're using WSPBuilder (perhaps a more modern approach compared to this article), the files should be picked up and packaged if they are in your 12 hive structure.<br /><br />HTH,<br /><br />Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-82313700508933692392009-05-11T09:15:00.000+01:002009-05-11T09:15:00.000+01:00Hi Chris,
Can you help me to deploy .JS and .c...Hi Chris,<br /> <br />Can you help me to deploy .JS and .css files as a package include with the feature package? Deploying webpart as a feature is working for me . I need to add .js and .css file's as required for the webpart.<br />Thank youAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-8969145388005379462009-01-20T09:24:00.000+00:002009-01-20T09:24:00.000+00:00Hi,It's been a while since I've done CAS, so afrai...Hi,<BR/><BR/>It's been a while since I've done CAS, so afraid I don't have a definitive set of steps for this. However, the following links might be useful:<BR/><BR/>- <A HREF="http://weblogs.asp.net/jan/archive/2005/06/23/WebPartSecurity.aspx" REL="nofollow">http://weblogs.asp.net/jan/archive/2005/06/23/WebPartSecurity.aspx</A> - a SharePoint 2003 article but has good detail on the policy XML required. You'd need to adapt to working with SharePoint 2007's Solution framework (wsp)<BR/>- <A HREF="http://store.bamboosolutions.com/kb/article.aspx?id=10405" REL="nofollow">http://store.bamboosolutions.com/kb/article.aspx?id=10405</A><BR/>- <A HREF="http://daniellarson.spaces.live.com/blog/cns!D3543C5837291E93!1963.entry?sa=849563486" REL="nofollow">http://daniellarson.spaces.live.com/blog/cns!D3543C5837291E93!1963.entry?sa=849563486</A><BR/><BR/>I'd start with those. <BR/><BR/>HTH,<BR/><BR/>Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-90928474615693067762009-01-20T05:36:00.000+00:002009-01-20T05:36:00.000+00:00I need to give full trust to a dll without deployi...I need to give full trust to a dll without deploying it to GAC. How can I do it through Code Access Security config modifications in manifest.xml. It does not recognize "Unrestricted=true" in PermissionSet in PolicyItem in <BR/>Code Access Security section.<BR/>Please tell me how can I grant full trust to this dll.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-47146503120379660432008-11-05T14:41:00.000+00:002008-11-05T14:41:00.000+00:00Hi Andy,Couple of notes:- web.config keys you can ...Hi Andy,<BR/><BR/>Couple of notes:<BR/><BR/>- web.config keys you <I>can</I> do as part of the .wsp deployment - the technique is to use the SPWebConfigModification class in code to add your entries<BR/>- there's no support for adding registry entries, but you might be able to do it in code somehow, perhaps in a Feature receiver which is in your solution<BR/><BR/>I have a solution which uses these techniques at <A HREF="http://www.codeplex.com/SPConfigStore" REL="nofollow">www.codeplex.com/SPConfigStore</A>, but note there's a minor bug somewhere which means the web.config changes aren't rolled back when the solution gets retracted (they should be). Suggest also checking out Vince's tool at <A HREF="http://blog.thekid.me.uk/archive/2007/03/24/web-config-modification-manager-for-sharepoint.aspx" REL="nofollow">http://blog.thekid.me.uk/archive/2007/03/24/web-config-modification-manager-for-sharepoint.aspx</A>.<BR/><BR/>HTH,<BR/><BR/>Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-4616880269113008772008-11-05T12:16:00.000+00:002008-11-05T12:16:00.000+00:00Hi Chris,I'm deploying a feature with a WSP file t...Hi Chris,<BR/>I'm deploying a feature with a WSP file that was built from a ddf file and then compiled using Makecab.<BR/>Does anyone know if it is possible, and if so, how to include registry entries and extra web.config keys to the solution?<BR/>Any examples would be very useful,<BR/>Thanks<BR/>AndyAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-59048273112088962402008-08-22T14:01:00.000+01:002008-08-22T14:01:00.000+01:00Hi Chris, well presented..Thanks a lot for this b...Hi Chris, well presented..<BR/>Thanks a lot for this blog<BR/><BR/>RameshSubburajAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-55042786447379524372007-11-19T22:49:00.000+00:002007-11-19T22:49:00.000+00:00Hi Val,You should always reference the site using ...Hi Val,<BR/><BR/>You should always reference the site using the same address you'd use in the browser. Remember though, that whilst solutions are deployed to a top-level site (http://testsite), you may have Features scoped at the web level so these may be at a different URL (http://testsite/childsite).<BR/><BR/>HTH,<BR/><BR/>Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-36550324301383569942007-11-16T15:58:00.000+00:002007-11-16T15:58:00.000+00:00Hi Chris: A great post. I am having a problem th...Hi Chris: <BR/><BR/>A great post. I am having a problem that deals with referencing the site url. The web application has SSL encryption and although I can add the feature OK it will not let me deploy the feature. I first tried to resolve to localhost, then the hostname, and finally the https url without success. Do you have any suggestions where I might look to fix this problem.<BR/><BR/>Thanks again, <BR/><BR/>Val D.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-42266649768594571932007-09-12T10:23:00.000+01:002007-09-12T10:23:00.000+01:00This is something I've only just become aware of, ...This is something I've only just become aware of, thanks to <A HREF="http://www.point2share.com/Blog/Lists/Posts/Post.aspx?ID=34" REL="nofollow">Daniel McPherson's post</A> about this. <BR/><BR/>However, I can say that my changes to my files happen OK on feature re-activation <I>when the file in question is not customized (unghosted)</I>. This is a key point as the file on the filesystem (i.e. the one the feature overwrites) will not be referenced if it has been customized - instead the version which was put into the content database will be used.<BR/><BR/>Additionally, I've not tested updating a file from a different feature to the one which originally provisioned it. <BR/><BR/>Assuming those two factors are the same for you (file not customized, update from same feature), I'm pretty sure your file should upgrade OK.<BR/><BR/>Cheers,<BR/><BR/>Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-55353087708489155742007-09-12T08:52:00.000+01:002007-09-12T08:52:00.000+01:00this is a great article and explains very well. Th...this is a great article and explains very well. The killer for me is that although you wrap a solution around a feature and get it deployed and upgraded easily with rollback, if now upgraded feature is disabled and re-enabled, and attempts to override an existing file it either does not, or barfs depending on the IgnoreIfAlreadyExists directive. Can you think of a clever way to deal with this?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-30265079915564574622007-09-06T16:23:00.000+01:002007-09-06T16:23:00.000+01:00Hi again. We're using the right url, and seem to b...Hi again. We're using the right url, and seem to be creating the .WSP correctly. Once in a great while it works and deploys to both WFEs, but most of the time it does not work. That is what is so crazy, if it never worked I'd keep thinking I'd done something wrong, but sometimes it does. It almost always only updates the WFE with central admin running, no matter how many other applications I try to deploy to (choosing different urls), or using the central admin screen to deploy to them all. It will deploy to all the applications, but most of the time only updates the server running central admin, not the other.<BR/><BR/>So now I wonder if something else is wrong with our server setup.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-41295108191218274852007-08-30T21:12:00.000+01:002007-08-30T21:12:00.000+01:00Chris B,Thanks for the feedback.Hmm, I'm not reall...Chris B,<BR/><BR/>Thanks for the feedback.<BR/><BR/>Hmm, I'm not really familiar with using VS deployment projects to generate a .cab. I know it's possible, but seem to remember there are issues if you wanted to include localized resources in the package. However, I do know that a .OSD isn't used by SharePoint as such, so there's no dependency there.<BR/><BR/>In terms of why your solution is not going to the WFEs, I'm wondering if you're deploying to the correct URL? This should be the actual content site URL, not the Central Admin URL..<BR/><BR/>HTH,<BR/><BR/>Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-64520537443612684172007-08-30T20:25:00.000+01:002007-08-30T20:25:00.000+01:00Hi ChrisI just discovered your blog the other day,...Hi Chris<BR/>I just discovered your blog the other day, it has been a huge help. Thanks for taking the time to write all this.<BR/><BR/>I have 2 questions:<BR/>1. when I create a .CAB using VS's built in deployment project (as part of a solution containing my webpart) it creates a *.OSD file. When I create the .WSP using the cab sdk, it does not. Is that file needed? In "Developer's Guide to Windows Sharepoint Services 3.0" Bleeker keeps it in his, but I don't see it generated. I can deploy to a single-server "farm" and it works fine.<BR/><BR/>2. On the multi-server farm, my solution is not being deployed to all web front ends on my farm. It only goes to one: the server that Centeral Administration services is running on. Do you have any guesses on where to look to troubleshoot this?<BR/><BR/>thanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-80832196604477983632007-08-29T22:03:00.000+01:002007-08-29T22:03:00.000+01:00Hi,Yes this is possible. Have just looked over the...Hi,<BR/><BR/>Yes this is possible. Have just looked over the articles I wrote and don't seem to have covered this anywhere, so I'll try and explain it here.<BR/><BR/>What you need to do is:<BR/><BR/>1. Obtain the web part definition with the settings you want to use, i.e. by adding the web part to a page, configuring, then exporting the webpart. This will give you the .webpart file.<BR/><BR/>2. Assuming you're deploying your page which hosts the webpart using a Feature (you need to be), within the 'File' element in the Feature's elements file (often named 'elements.xml'), add an 'AllUsersWebPart' element. Suggest checking the documentation for this, and also perhaps having a look at <A HREF="http://sharepointnutsandbolts.blogspot.com/2007/04/deploying-master-pages-and-page-layouts.html" REL="nofollow">Deploying master pages and page layouts as a Feature</A> if you're not familiar with deploying files using a Feature.<BR/><BR/>3. Drop the contents of your .webpart file into the 'AllUsersWebPart' element.<BR/><BR/>4. Deploy using your normal approach, e.g. using a Solution package<BR/><BR/>Note that all the pieces for the web part (assembly, SafeControls entry etc.) need to be deployed for everything to work successfully.<BR/><BR/>HTH,<BR/><BR/>Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-51141447037788391362007-08-29T20:10:00.000+01:002007-08-29T20:10:00.000+01:00Great post. One question now...Is there a way, wh...Great post. One question now...<BR/><BR/>Is there a way, when I deploy my webparts, to deploy a couple sample pages that have pre-configured webparts?<BR/><BR/>Thanks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-65455367602952282432007-08-21T22:36:00.000+01:002007-08-21T22:36:00.000+01:00Hi Collin,I tend to use the deactivate/retract/dep...Hi Collin,<BR/><BR/>I tend to use the deactivate/retract/deploy/reactivate sequence because I know it works and I noticed that's the process VSeWSS uses. I figure MS may well have developed WSeWSS to work in this way for a good reason. That said, I'm also fairly sure the upgradesolution route shouldn't actually make much difference, aside from the solutions being versioned inside the solution store.<BR/><BR/>I actually think your problem could be down to something else. I'm thinking you might have deployed your master pages and CSS files as features, and later used SPD or the browser to make a change which involved a check-out/check-in. This would cause the files to become unghosted or customized, and future updates via features will not work. See my article <A HREF="http://sharepointnutsandbolts.blogspot.com/2007/07/considerations-when-using-features-to.html" REL="nofollow">Considerations when using Features to deploy SharePoint files - ghosting/unghosting</A> for more info on this.<BR/><BR/>HTH,<BR/><BR/>Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-50752155018208683032007-08-21T15:51:00.000+01:002007-08-21T15:51:00.000+01:00Chris - I note from your script file above that yo...Chris - <BR/><BR/>I note from your script file above that you appear to be deactivating and retracting a solution, then readding it rather than using the upgrade solution route. Is this particular to the web part example, or a general rule?<BR/><BR/>I ask because I've been working with a master page/page layouts feature for our intranet and it seems that once a file is in use, it doesn't upgrade. This is true of the layouts and the css files. Now, it appears that I can manually upload the replacement files, but this isn't a great idea in a multiple site environment, I'm guessing.<BR/><BR/>Thanks again for your support.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-26944446111493194352007-08-21T11:34:00.000+01:002007-08-21T11:34:00.000+01:00bk201173,Using the web part properties for your co...bk201173,<BR/><BR/>Using the web part properties for your config could be a good solution. You'd need to consider the following though:-<BR/><BR/>- your code would need to be written so that the web part does not error if the config values have not yet been entered<BR/>- the config would need to be entered every time a user added the web part to a page. Unless that is, you added a pre-configured version of the web part to the web part gallery for them to use.<BR/><BR/>Otherwise yes, reading from the web.config file or a custom XML file are common solutions. In terms of web.config, as I mentioned the AppSettings section is provided for this purpose. It is also possible to use <I>custom</I> sections (though this is more work to implement).<BR/><BR/>Best of luck,<BR/><BR/>Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-61037575711576344282007-08-17T22:02:00.000+01:002007-08-17T22:02:00.000+01:00I am at Wit's end...and I dont know what to do. I ...I am at Wit's end...and I dont know what to do. I thought may be I will do customizable properties of web part, but then realized, the webpart wouldnt even show up because the conn settings are missing, so, let alone how can I set the properties if it errors. And I am correct in saying this right?<BR/><BR/>Web.config file...that sounds like a good idea. May be I can put my own section and read from it? dont know...will investigate that idea.<BR/><BR/>The other way may be is to deploy an xml file with config info with the solution and read from that?<BR/><BR/>Thanks Chris for all your help.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-1298155109880584712007-08-14T21:29:00.000+01:002007-08-14T21:29:00.000+01:00Hi bk201173,That's an interesting question. Unfort...Hi bk201173,<BR/><BR/>That's an interesting question. Unfortunately there isn't really anything specific in the deployment framework which allows you to separate out config values this way. The only thing that springs to mind is that properties can be passed to Features and the values can then be used in a Feature receiver, but that doesn't sound like what you want to do.<BR/><BR/>Hence I think you need to look at general .Net techniques for storing config values. You can use the ApplicationSettings section of the web application's config file, and there is special provision for named connection strings. In my organisation we often store config values in a special SQL table, which is cached in memory for fast retrieval. But there are many other options.<BR/><BR/>Hope that's of some use!<BR/><BR/>Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-61907487096297319972007-08-13T16:27:00.000+01:002007-08-13T16:27:00.000+01:00Hello Chris :) ...Greetings Please remember that I...Hello Chris :) ...Greetings <BR/><BR/>Please remember that I am using VS2005 sharepoint extension templates in <BR/>developing webparts. <BR/><BR/>After much effort, I got my impersonation working and my webpart working and <BR/>got it to a deployable condition. Woof...what a journey! <BR/><BR/>Now, I have some configuration items that I specified in my solution like <BR/>username, password, path to the access(.mdb) file, a SQL Query etc which all <BR/>should be configurable at deployment time. <BR/><BR/>How do I specify these as configurable items during deployment so that <BR/>somebody(say QC or admin during deployment) can change it? <BR/><BR/>Thanks for your helpAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-10820091627698333882007-08-09T12:41:00.000+01:002007-08-09T12:41:00.000+01:00Sowmya,In answer to your questions:1. Yes you're a...Sowmya,<BR/><BR/>In answer to your questions:<BR/><BR/>1. Yes you're absolutely right. Deploying the site definition only makes it available for use, it doesn't actually create any sites with it. This is another step.<BR/><BR/>2. In terms of updating items deployed as part of a site definition, it's not a good idea to go back to the original site definition to make the change. If this is now in use you could break things. See my article on <A HREF="http://sharepointnutsandbolts.blogspot.com/2007/08/creating-deploying-and-updating-custom.html" REL="nofollow">Creating, deploying and updating custom site definitions</A> for more details on this.<BR/><BR/>Generally speaking, updates to items which have already been created need to be done using the API (assuming we don't want to make the change manually through the web UI).<BR/><BR/>HTH,<BR/><BR/>Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-50779738052060619512007-08-08T11:24:00.000+01:002007-08-08T11:24:00.000+01:00Hi Chris,Thanks for the great article. Actually I ...Hi Chris,<BR/>Thanks for the great article. Actually I have some doubts regarding the wsp files. i am using SharePoint Solution Generator to create and deploy the solutions. My Doubts are<BR/>1. In SP, I am creating a Web Application and then i am deploying the solution. When i deploy this is available as a site template and by deploying it is not automatically creating a site. Right? We have to explixitly go and create a Site collection by selecting this Template. Please correct me if i am wrong. After creating the site, i am able to see all the custom lists created by me.<BR/>2. Now i have a problem. Imagine in the dev environment i have modified one of my custom list and I have added an extra column to it. Now this change has to be deployed to the production. How can wsp technique help me in this.I tried creating the Site definition again and tried to upgrade the solution. but that does not seem to work,<BR/>Any help will be appreciated.<BR/><BR/>Thanks <BR/>SowmyaAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-27589235100480309852007-08-06T21:49:00.000+01:002007-08-06T21:49:00.000+01:00Chris-Thanks for referencing my article. I hope to...Chris-<BR/>Thanks for referencing my article. I hope to have a more extensive solution and updated post very soon.<BR/><BR/>-ACAChttps://www.blogger.com/profile/15731521971131302788noreply@blogger.com