Create secondary DLL

Share with us how you use PostSharp, or how you would like to use it.

Create secondary DLL

Postby mrpmorris on Sun Jun 08, 2008 7:29 pm

I have a project which has business objects in it. Whenever the project is built I would like to automatically create a secondary DLL based on the classes within it. This secondary DLL would be shared between client and server for serialising and deserlialising objects.

Is this something I can do with PostSharp?


Regards

Pete
mrpmorris
 
Posts: 8
Joined: Sun Jun 08, 2008 7:27 pm
First Name: Peter
Last Name: Morris

Re: Create secondary DLL

Postby gfraiteur on Mon Jun 09, 2008 8:54 am

Hi,

You can do it with PostSharp, but I wonder if it would not be easier to use normal reflection to read the assembly, and System.CodeDom to emit the new assemblies.

You would work at a higher abstraction level, which I think is better.

Gael
Gael Fraiteur, project leader
gfraiteur
Site Admin
 
Posts: 834
Joined: Tue Dec 18, 2007 3:09 pm
First Name: Gael
Last Name: Fraiteur
Company: postsharp.org

Re: Create secondary DLL

Postby mrpmorris on Wed Jun 11, 2008 9:22 am

The main thing that attracted me to postsharp was the fact that the process takes place whenever I compile. The fact that latter projects in the build process would depend on this generated DLL means it would save me from having to run the project and then rebuild.


Pete
mrpmorris
 
Posts: 8
Joined: Sun Jun 08, 2008 7:27 pm
First Name: Peter
Last Name: Morris

Re: Create secondary DLL

Postby gfraiteur on Wed Jun 11, 2008 9:38 am

You can achieve the same automatic post-build processing using "custom build steps".

It has always been possible with Visual Studio and is still possible with MSBuild.
Gael Fraiteur, project leader
gfraiteur
Site Admin
 
Posts: 834
Joined: Tue Dec 18, 2007 3:09 pm
First Name: Gael
Last Name: Fraiteur
Company: postsharp.org


Return to What To Do With PostSharp?