Thanks to Tom Clarkson for adding this feature to WSPBuilder, its now able to load a wspbuilder.exe.config file from a local project. This enables project specific arguments to WSPBuilder when building from Visual Studio.
WSPBuilder will first look for the general config file, then the local project and last the command line arguments.
Saturday, August 30, 2008
Wednesday, August 27, 2008
0.9.8.0822 is a memory eating monster
Get the new version 0.9.8.0827 from codeplex
The previous version of WSPBuilder 0.9.8.0822 was a memory eating monster, now the memory foot print has been greatly reduced to a more acceptable level.
The reason for this was that Mono.Cecil uses a lot of memory to load the assemblies. Therefore when loading reference assemblies and base class assemblies like System.Web the memory consumption exploded. Now every assembly gets unloaded right after it has been used.
The previous version of WSPBuilder 0.9.8.0822 was a memory eating monster, now the memory foot print has been greatly reduced to a more acceptable level.
The reason for this was that Mono.Cecil uses a lot of memory to load the assemblies. Therefore when loading reference assemblies and base class assemblies like System.Web the memory consumption exploded. Now every assembly gets unloaded right after it has been used.
Friday, August 22, 2008
The history of WSPBuilder
WSPBuilder (June 2007)
In the beginning of 2007 I was tired of writing the wsp manifest.xml file and defining the DDF file by hand. I really needed a tool to auto generate this. I tried one of the first tools on the internet that someone had made (I have forgotten where),however it was written in VBscript and only implemented some very basic functionality. But it made me discover that the structure of the wsp file is simply a reflection of what goes into the 12 hive. Therefore it was clear to me that the next step was to simply make it a full blown C# project. Still I needed to be sure to cover all of the possibilities that wsp schema had to offer. Luckily Microsoft provides a xml schema definition for the manifest.xml file. This made it possible to auto generate a C# class library that would serialize into a manifest.xml file. Then the only thing that I had to do now was to fill in the code and serialize the objects. But I was not home yet, I needed something to create the CAB file (WSP). I was able to choose from the makecab.exe application provided by Microsoft or use the CabLib.dll project created by Elmue. In the spirit of GPL and for full control of the Cab file creation I went for the Elmue project.
Deployment (August 2007)
Here the power of the GPL license really comes into effect. Chris Doty created the deployment part of WSPBuilder and submitted it to me. First it was made as a independent console application WSPDeployer.exe and later on it was merged into the WSPBuilder application.
WSPBuilder Extensions (January 2008)
Tom Clarkson really did a big contribution here. He basically created the WSPBuilder Extensions project with Visual Studio project and item templates and an Visual Studio Addin with a MSI install program with it. After some minor modification the first version of WSPBuilder Extensions was born. In the following versions the Extensions has been improved and the Visual Studio Addin has been rewritten to a more professional look and the functionality extended.
Mono.Cecil (may 2008)
The WSPBuilder was having some issues with reflection on assemblies in order to be able to create the SafeControls tags in the manifest file. If an assembly was located in the Global Assembly Cache, the .NET framework would always pick up this assembly and not the newly build assembly from the project, therefore resulting in a possible incorrect manifest file. Also assembly references was a big problem for many users of WSPBuilder. This was because the users had the tendency to put reference assemblies other places on their system and because of this the .NET framework was not able to find them. With the Mono.Cecil project written by Jb Evain, WSPBuilder is now able to load the assemblies even that a copy existed in GAC and reflect on them without having to load all of the referenced assemblies.
Community
I want to thank all the people that have helped to improve the WSPBuilder product by using, testing and reporting bugs. Microsoft for providing the codeplex.com site that enables you to use team foundation source control with your Visual Studio Environment and also for hosting the WSPBuilder project.
Conclusion
Even that WSPBuilder has not reached its full first version yet, it’s nearly completed. There are still some bugs to be fixed and documentation to be made, but overall it should implement every possible scenario that you are able to make with the Windows SharePoint Package (WSP).
In the beginning of 2007 I was tired of writing the wsp manifest.xml file and defining the DDF file by hand. I really needed a tool to auto generate this. I tried one of the first tools on the internet that someone had made (I have forgotten where),however it was written in VBscript and only implemented some very basic functionality. But it made me discover that the structure of the wsp file is simply a reflection of what goes into the 12 hive. Therefore it was clear to me that the next step was to simply make it a full blown C# project. Still I needed to be sure to cover all of the possibilities that wsp schema had to offer. Luckily Microsoft provides a xml schema definition for the manifest.xml file. This made it possible to auto generate a C# class library that would serialize into a manifest.xml file. Then the only thing that I had to do now was to fill in the code and serialize the objects. But I was not home yet, I needed something to create the CAB file (WSP). I was able to choose from the makecab.exe application provided by Microsoft or use the CabLib.dll project created by Elmue. In the spirit of GPL and for full control of the Cab file creation I went for the Elmue project.
Deployment (August 2007)
Here the power of the GPL license really comes into effect. Chris Doty created the deployment part of WSPBuilder and submitted it to me. First it was made as a independent console application WSPDeployer.exe and later on it was merged into the WSPBuilder application.
WSPBuilder Extensions (January 2008)
Tom Clarkson really did a big contribution here. He basically created the WSPBuilder Extensions project with Visual Studio project and item templates and an Visual Studio Addin with a MSI install program with it. After some minor modification the first version of WSPBuilder Extensions was born. In the following versions the Extensions has been improved and the Visual Studio Addin has been rewritten to a more professional look and the functionality extended.
Mono.Cecil (may 2008)
The WSPBuilder was having some issues with reflection on assemblies in order to be able to create the SafeControls tags in the manifest file. If an assembly was located in the Global Assembly Cache, the .NET framework would always pick up this assembly and not the newly build assembly from the project, therefore resulting in a possible incorrect manifest file. Also assembly references was a big problem for many users of WSPBuilder. This was because the users had the tendency to put reference assemblies other places on their system and because of this the .NET framework was not able to find them. With the Mono.Cecil project written by Jb Evain, WSPBuilder is now able to load the assemblies even that a copy existed in GAC and reflect on them without having to load all of the referenced assemblies.
Community
I want to thank all the people that have helped to improve the WSPBuilder product by using, testing and reporting bugs. Microsoft for providing the codeplex.com site that enables you to use team foundation source control with your Visual Studio Environment and also for hosting the WSPBuilder project.
Conclusion
Even that WSPBuilder has not reached its full first version yet, it’s nearly completed. There are still some bugs to be fixed and documentation to be made, but overall it should implement every possible scenario that you are able to make with the Windows SharePoint Package (WSP).
WSPBuilder.exe version 0.9.8.0822 x86
New version of WSPBuilder has been released on codeplex.
This time some major issues with SecurityAttibutes reflection has been solved and also reflection on assemblies to created the relevant SafeControl tags has been implemented. Now the WSPBuilder with the Mono.Cecil project, is better able to create a correct manifest.xml than it was with the normal .NET assembly reflection. The only downfall is that WSPBuilder is a little bit slower than before, but it should not be notable. Also the Assembly Element tags has been moved to the top of the manifest.xml file in order to ensure that assemblies is deployed first, this seems to solve a problem in rare occasions.
Change list:
This time some major issues with SecurityAttibutes reflection has been solved and also reflection on assemblies to created the relevant SafeControl tags has been implemented. Now the WSPBuilder with the Mono.Cecil project, is better able to create a correct manifest.xml than it was with the normal .NET assembly reflection. The only downfall is that WSPBuilder is a little bit slower than before, but it should not be notable. Also the Assembly Element tags has been moved to the top of the manifest.xml file in order to ensure that assemblies is deployed first, this seems to solve a problem in rare occasions.
Change list:
- Assembly element tags in the manifest.xml is placed in the top of the manifest.xml file.
- Resolvement of assemblies is now supported with Mono.Cecil in order to create relevant SafeControl tags. Use the -DLLRefencePath argument to resolve referenced assemblies.
- Bug fixed where the 80\WPResources was not included-.
- Bug fixed where the security attributes was not reflected correctly.
Take care :o)
Subscribe to:
Posts (Atom)