Has any one tried to version WSP in SharePoint 2010?
Thanks,
It would help to be a bit more specific that ".wsp" in your question.
As Flo mentioned - if you keep the assembly version the same but change the AssemblyFileVersion then you can upgrade the assemblies in your WSP solution using
STSADM -o upgradesolution ...
See my answer on SO - How can I use wildcard assembly versioning?
This will suffice for webparts but if you've got other artifacts and are using things like Feature things like event receivers then you may have to retract and re-deploy.
Thanks all for your replies. I have two concerns:
a. Assume my wsp is deploying a webpart with assembly version as 1.0.0.0 and assembly file version is also 1.0.0.0. Now after few days i need to deploy a recent version of webpart. The assembly version now will be 2.0.0.0 and assembly file version will also be 2.0.0.0. I have noticed that even if i retract and redeploy the wsp, the .webpart files that sits in the web part gallery always shows assembly version as 1.0.0.0. I guess this is because wsp retraction will not delete the .webpart file and neither feature deactivation. So the only option that remains is to write feature deactivation code to delete the .webpart file from webpart gallery. This will be largely in efficient as i will need to iterate through all the site collections of deployed webapplication to determine from the code ( a windows form as installer) the site collection where feature is activated and deactivate the same.
b. I need to query the webpart dll version for some operation. I was thinking it will be good if we can version wsp and keep the wsp version same as the web part dll. This will help me to remain in the SharePoint context to determine the web part dll version ( rather than querying the dll to find the version).
Thanks
WSP don't really version.
You can however version components into it:
Feature or WebParts via different names (FeatureV1, FeatureV2...)
Assembly using standard assembly versioning (WebpartV1 use assembly 1.0.0, WebPartV2 use 1.1.0 and so on)
...
Related
I am using visual studio 2010 on windows server 2010 with Sharepoint 2010 server. I am deploying webparts to a Sharepoint instance running on the same server.
My new webpart makes use of a custom library, AE.Net.Mail. When I deploy this webpart, I get the Could not load file or assembly... error for AE.Net.Mail. I have run gacutil but I do not see the assembly in C:\Windows\assembly. I do see it in a subdirectory of C:\Windows\Microsoft.NET\assembly.
Now I am not sure about this but I think when my Sharepoint instance runs, it only looks at C:\Windows\assembly. And that is why it is not able to find the library. The reason I believe this is that the name of my webpart is present in C:\Windows\assembly. It's being cached there and not in a subdirectory of C:\Windows\Microsoft.NET\assembly.
I am using version AE.Net.Mail Version 1.6.0.0 which is compatible with .NET 3.5. I think my Sharepoint server is using 3.5 although 4.0 is present on the machine. I think so because when I tried to install the the library using nuget, I couldn't install the latest version that requires .NET 4.0. The error said that my project is using 3.5. Version 1.6.0.0 is compatible with 3.5
So, what do you guys think is going on and how do you think I can get AE.Net.Mail into C:\Windows\assembly? Been at this for hours now and I can't figure it out (Dragging and dropping doesn't work)
Thanks guys. :)
Judging from the sources AE.Net.Mail isn't strongly typed which is something GAC-deployment (and SharePoint) require.
To add the binary to the GAC you must download the binaries of AE.Net.Mail from Github, sign the assembly and compile it yourself. This is easy, simply follow this guide http://msdn.microsoft.com/en-us/library/ms247123(v=vs.100).aspx
Remember to compile for .net 3.5 since that's what SP2010 supports, it wont recognize net4 assemblies
I am upgrading an SP2007 project to SP2010 where I have made the necessary changes to the project(changed the reference, master pages, etc.). I have deployed the farm solution in my machine I am getting the following error:
Cannot add the specified assembly to the global assembly cache: System.Web.Extensions.dll.
I have referenced this DLL in my project.
Could anyone help me to resolve this issue?
Another good idea is to include an iisreset and a Restart-Timer SPtimerv4 while deploying, as this will help to release similar locks.
However, do you really need to deploy System.Web.Extensions with your WSP now that you've upgraded to 2010? Since 2010 runs on .Net framework 3.5 it should already be present on your server..
Best regards,
Rikard
I am new to sharepoint and installshield. My responsiblity is to build and deploy the sharepoint solution as a package using istallsheild. Previously I was using solution package wsp and content database restoration. But now the client wants to deliver the total solution i.e. dlls, ascx files, xml files, servce files(.cs), feature files using installsjield from development server to another (test and/or client) server.
Can any body help me on this: how to do the sharepoint deployment using installshield?
thanks in advance.
I presume you are using SharePoint solutions to package dll's, ascx and xml files for deployment to a sharepoint server. These solutions are built using a tool like WSPBuilder.
If not: YOU SHOULD!
If so: Why not use SharePoint Installer? It is an installer wrapper around a .wsp (SharePoint solution) file. It will check for the existence of a sharepoint installation, if the required services are started etc.
For deployment to a test machine: Why would you need the .cs files? If you want to test (debug) code on a test machine, I suggest you use either continuous integration using a tool like CruiseControl.NET, or just install Visual Studio on the test machine (which I presume to be a dev test, not a client test machine) and get the latest version, do a build, then roll out the solution.
And what do you mean with "client" server? is there some windows app that's communicating with sharepoint included in the installer? If so, I suggest separating the SharePoint solution from the actual windows app. They might share DLL's but are not supposed to be in the same installer.
We are using a tool (open source - saf.codeplex.com) to automate the Sharepoint components using MSBuild/Features/STSADM etc. Recently they have upgraded this to use WIX so that we can deploy any SharePoint components.
saf.codeplex.com
It has got an very good documentation and also we got a good support in fixing and implementing the SharePoint automated deployment in our premise.
Thanks
BalamuruganK
i have project in C#, ASP.Net and SharePoint. i want to deploy it usung VS2005 Setup and Deployment tool (As i am not allowed to use any otther software). Can i deploy the Sharepoint part like webparts in VS2005. please tell me what steps i have to take for sharepoint.
All Suggestions are welcome.
Thanks in advance
In short using the VS2005 Setup & Deployment for deploying items to SharePoint is not recommended or not supported.
SharePoint by itself has it well know deployment way called SharePoint Solutions or WSP file. Almost all the items you will want to deployed to SharePoint can be done using WSP(this includes WebPart as well, not only webpart it will allow to add a safe control entry to WebConfig as well). As per your question you are not allowed to use any other tool. To create WSP solution you will not need any extra tool. You can create a WSP file just with notepad (ddf file) & makecab.exe (its avaliable in most of the windows OS).
If you want to make it life simpler try out WSPBuilder and to install the WSP to sharepoint you can use the STSADM command or SharePointInstaller I have been using these tools for past 3 years and they work like charm.
You also have another option of doing it in the Visual Studio just by installing this template VSeWSS version 1.2!
I created a utility library for my Sharepoint WebParts. Now when I reference this library from my WebPart project, it compiles fine, but the library is not included in the .wsp package. This means the library assembly is not deployed to the target system, causign the WebPart to fail.
Is there any way to fix this? I am using Visual Studio 08 & VseWSS 1.2.
Brij's answer is partially correct, your VSeWSS version is the problem. This feature only came in version 1.3 (I recommend the March CTP) to have the CopyToLocal=true automatically add the assemblies to the GAC for you.
Right click of Assembly > Properties
Set “Copy Local” property = true
Build project.
See following for more details:
http://urenjoy.blogspot.com/2009/08/add-assembly-wsp-vsewss.html