Wednesday, May 21, 2008

PublishingFeatureHandler

Feature ID 22A9EF51-737B-4ff2-9346-694633FE4416

In lack of documentation on this feature and the properties it contains, I did some reflection on the class. But the inner workings of the class is obfuscated and therefore I was only able to get the properties declared as constants. I have not tested all of the properties, so I actually do not know if they will work.

Properties in the PublishingFeatureHandler feature that you are enable to set in the ONET.XML

Like this...

<!-- Publishing feature -->
<Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416">
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="WelcomePageUrl" Value="$Resources:cmscore,List_Pages_UrlName;/Default.aspx" />
<Property Key="PagesListUrl" Value=""/>
<Property Key="AvailableWebTemplates" Value=""/>
<Property Key="AvailablePageLayouts" Value=""/>
<Property Key="SimplePublishing" Value="true" />
...
</Properties>
</Feature>

PublishingFeatureHandler properties

NameTypeDefault value Simple publishingDefault value Complex publishingDescription
AlternateCssUrlstringnullnull

Add the css file to the application pages resided in the layouts folder.
Syntax format: ~SiteCollection/Style Library/mycustom.css

AvailablePageLayoutsstringnullnull

Syntax format: ~SiteCollection/<pagelayout path1>:~SiteCollection/<pagelayout path2>:~SiteCollection/<pagelayout path3>Example..:
~SiteCollection/_catalogs/masterpage/mypage1.aspx: ~SiteCollection/_catalogs/masterpage/mypage2.aspx: ~SiteCollection/_catalogs/masterpage/mypage3.aspx
Use the : colon as the separator.

AvailableWebTemplatesstringnullnull

AvailableWebTemplates Key Format is:LCID-[sitetemplatename][#sitetemplatenumber];LCID-[sitetemplatename][#sitetemplatenumber];LCID-[sitetemplatename][#sitetemplatenumber]
Example: 1033-BLANKINTERNET#1;1049- BLANKINTERNET #1;*- BLANKINTERNET #2;*-BLANKINTERNET#2

ChromeMasterUrlstringnullnullSyntax format:
~SiteCollection/_catalogs/masterpage/mycustom.master
EnableApprovalWorkflowOnDocumentsboolfalsetrue
EnableApprovalWorkflowOnImagesboolfalsetrue
EnableApprovalWorkflowOnPagesboolfalsetrue
EnableModerationOnDocumentsboolfalsetrue
EnableModerationOnImagesboolfalsetrue
EnableModerationOnPagesboolfalsetrue
EnableSchedulingOnDocumentsboolfalsetrue
EnableSchedulingOnImagesboolfalsetrue
EnableSchedulingOnPagesboolfalsetrue
MigrationOverrideboolfalsefalse
PagesListUrlstringnullnull
RequireCheckoutOnDocumentsboolfalsetrue
RequireCheckoutOnImagesboolfalsetrue
RequireCheckoutOnPagesboolfalsetrue
SimplePublishingboolIf not defined, the default value is true. Specifies the setup with simple or complex publishing configurations.

VersioningOnDocuments

VersioningSettingsMajorMajorAndMinor

Possible values for VersioningSettings is: Major, MajorAndMinor, None

VersioningOnImagesVersioningSettingsMajorMajorAndMinor
VersioningOnPagesVersioningSettingsMajorAndMinorMajorAndMinor
WelcomePageUrlstringnullnull

Defines the page that will act as the startup page.

Example: $Resources:cmscore,List_Pages_UrlName;/default.aspx


Friday, April 11, 2008

WSPBuilder.exe version 0.9.8.0408 (experimental)

I finally got around to implement the Mono.Cecil library into WSPBuilder. I hope this will solve some of the resolvment issues with assembly reflection that was with Assembly.LoadFrom. Further more that Global Assembly Cache is ignored when loading assemblies. Also security reflection (CAS) of the assemblies have been improved and should now be complete. The -CustomCas parameter still needs improvement and may be rewritten.


WSPBuilder.exe version 0.9.8.0408 (experimental)
Note! This version is a complete rewrite of the assembly reflection done in WSPBuilder and therefore the experimental status.
----------------------
Assembly reflection is now done with the Mono.Cecil project. This enables the WSPBuilder to reflect on assemblies without having to load all depending assemblies.
-DLLReferencePath are now obsolete, because there is no need for load depending assemblies, but it still may be used in the future.
The WSPBuilder are not able to detect if a control is inherited from a WebControl, therefore there may be more safecontrols tags in the manifest. This is because that depending assemblies are not loaded.
Code Access Security declaration in the manifest.xml have been improved for DLLs in the 80\Bin folder.
The "assembly is already in the GAC bug" have been solved. WSPBuilder now only loads assemblies from the project folder and do not care about the assemblies in the Global Assembly Cache.
-PermissionSetLevel do NOT support Unrestricted PermissionSet. Because its not possible to add this to the manifest.xml.


Note that there are two versions on codeplex.
Different versions:
WSPBuilder Extensions ver. 1.0.1 - Visual Studio Addin, wspbuilder.exe 0.9.8.0206 is included in this package.
WSPBuilder.exe version 0.9.8.0408 (experimental) - Only exe file and libraries.

The x64 version of WSPBuilder.exe will be added to codeplex soon.

Thats it for today.

Wednesday, February 06, 2008

Visual Studio Addin and Templates for WSPBuilder

WSPBuilder Extensions ver. 1.0.0 (RC)

Now the first version of WSPBuilder Extensions is ready. It has been a long road up the hill and a lot of hours spend at home after my day work to get this first version done.

I want to specially thank Tom Clarkson for doing the Visual Studio Templates, he has done an awesome work on creating the templates and I would never have been able to finish it without him.

It has also been great that the community contributes to the WSPBuilder project with error reports and suggestions for new features.

The WSPBuilder Extensions ver. 1.0.0 (RC) supports Visual Studio ver. 2005 and 2008 and comes in a nice MSI install package.

The WSPBuilder.exe contains a lot of functionality that I simply did not have time to implement into Visual Studio. Also WSPBuilder.exe does not read the Visual Studio project file but still relies on the project folder to build the WSP file. Therefore you may not see the file in Visual Studio because it’s excluded from the project file, but it still gets build into the WSP file.

After install start your Visual Studio, and create a new project.



Now create a new SharePoint Feature.



Finally build the project and deploy it.



Try it out and tell me what you think.

Take care.

/keutmann

Thursday, December 27, 2007

WSPBuilder 0.9.7.1227. From Mono.Cecil to LoadFrom

It have been a long way to the next version. I have been looking into other ways to reflect on Assemblies, but I ended up using the technique I was using from the start however just with better assembly resolvement.

My goal was to avoid to resolve referenced assemblies when getting the class types from a loaded assembly.

I started looking into Mono.Cecil that looked very promising at first, but there was very little documentation on it and little on how to use it on the Internet. However I was successful nearly to the end but it stranded on SecurityAttributes. It was not able to read them when the attributes had parameters.

Now I turned my focus on to the Assembly.ReflectionOnlyLoadFrom method. This also stranded because it was not able to read the SecurityAttributes (this is actually by design from Microsoft).

So now I had no other options than go back to Assembly.LoadFrom method. I have then improved the resolvement of assemblies, so there will be a good error message when a referenced assembly fails to resolve. Then use the -DLLReferencePath argument to resolve the assembly.

Download: WSPBuilder

Versions
---------------------
0.9.7.1227
-BuildSolution is now fixed. This enables you to build multiple projects into one WSP file.
Multiple files with the same name (location) in CAB file have been solved.
Assembly resolve now outputs better error description - bin\debug and bin\release is now supported.
Bug fixed with ProjectDLLPath argument.
Feature warning corrected.

Wednesday, December 12, 2007

SharePoint Manager 2007 added to codeplex

I finally got around to release the SharePoint Manager 2007 with source code on codeplex.

You can get it here http://www.codeplex.com/spm

My focus is currently on WSPBuilder, so I will not be doing much on this project. However if you have any changes or will like to develop on this project, please contact me.

Monday, December 10, 2007

WSPBuilder 0.9.7.1211

New version is up and it contains following fixes.
0.9.7.1211
-------------------
Satellite assemblies is now supported for GAC and WebApplication. (Strong name your Resource.DLL when adding it to the GAC)
The -Retract argument now works again.
The -Createfolders argument have been changed and fixed.
A bug with inner exceptions looping fixed.
Build from \GAC and \80\bin fixed.

Get it here : http://www.codeplex.com/wspbuilder

Wednesday, December 05, 2007

New version of WSPBuilder

Just finished the next version of WSPBuilder. It has been some time underway because I was focused on the WSPBuilder Visual Studio integration but this was taking more time than I thought. Therefore I have got some help from one of my good friends Anders Dissing and hopefully this will speed things up a little. The WSPBuilder however needed some attention for bug fixing and now this release.

The new version 0.9.7.1205:
-----------------------------------------------
The WSPDeploy.exe has now been implementet into the WSPBuilder.exe, this means that deployment is now done from the WSPBuilder.exe. However this means that you properly can not build from a non SharePoint environment.
The argument -CustomCAS have been added. This enables you to specify a custom CAS for the solution. See the manual.txt.
The argument -Deploy and -Retract have been added to support deployment.
The argument -projectpath and -solutionpath have been added. This enables you define a path to where the project i located.
The argument -BuildCAB have been added. If set to true then a WSP 'Cab' file will be generated. If false the manifest.xml and DDF can still be created.
UnmanagedDLL support added. It is now possible to include unmanaged DLL's to the WSP package. Will always be added to the WebApplication bin folder.
Build from bin\debug and bin\release fixed.
Problem with assembly resolment fixed. Thanks to Alex Henderson.
Problem with some files not been excluded fixed. Thanks to Alex Henderson.
Trace bug fixed. Tracing now works properly.
Minor bugs fixed.

The WSPBuilder project.

Sunday, October 21, 2007

WSPBuilder Visual Studio extensions is underway.

Now the WSPBuilder.exe is nearing version 1.0, its time to look at some integration into Visual Studio. This means that there will be Visual Studio project and item templates with Build and Deploy menu functions in the Project Context menu. Currently I got the menu items added by use of Visual Studio Add-ins and soon the templates will follow. It will be packed up in a nice MSI install package, so hassle there. If you cant wait to see the progress you can download the source code from codeplex.

Major change in WSPDeploy.exe....

The WSPDeploy.exe has been merged into WSPBuilder.exe, because there is no need for two EXE files when you can settle with one. However has be tested a bit more before release.

Dev-Connections in Las Vegas? Yes... I'll will bee there :)

So if you are around Las Vegas in November 2007 and want to talk about building WSP solutions, you are most welcome.


Cya.

Thursday, September 20, 2007

WSPBuilder now supports x64

The WSPTools now supports 64 bit systems. Actually its only the Cablib.dll that have been build in x64 mode, the .NET code is still x86 but works fine on a Windows Server x64. If you are using the WSPTools source code on a x64 system, you have to use the Cablib.dll x64 version from the binary package.

Happy WSP Building :D


Get the latest release here: http://www.codeplex.com/wspbuilder

Wednesday, September 12, 2007

WSPBuilder 0.9.7.0912 now including WSPDeploy

Finally I got around to post the latest version of WSPBuilder. There has been some changes in this version regarding how the Visual Studio project is setup. The project is now called WSPTools because there are more than one tool (Dooh) :D

I will like to thank Chris Doty for creating the WSPDeploy project. The new tool is basically a console app. that can deploy SharePoint solutions. The good thing about it is that WSPDeploy uses a library and therefore makes it easy to create a winform app. on top of it.

Chris Doty, if you come around Copenhagen, Denmark one day, I'll like to buy you a beer! Cheers

The 0.9.7.0912 release

This release has primarily been about the auto detection of Security Attributes and is now supported to some degree. But there are still a lot of issues to be solved. Like it can only detect the first Attribute and use this, all other attributes of the same type gets discarded. Therefore if you are not sure of what you are doing with the Security Attributes, use the Global Assembly Cache instead.

Get the latest release here: http://www.codeplex.com/wspbuilder .

/Keutmann