Disable postsharp build task for a project?
3 posts • Page 1 of 1
Disable postsharp build task for a project?
(First, I want to thank Gael for this great project. The possibilities are amazing, although I only scratched the surface for now...)
In my current project, I use PostSharp/Laos to implement the INotifyPropertyChanged interface to my domain objects (which becomes even more elegant in combination with automatic properites in C# 3.0). As the assembly with my domain objects is referenced by a number of other assemblies, I have to add a reference to PostSharp.Public and PostSharp.Laos for these assemblies, too.
"Infecting" these assemblies with PostSharp where I don't explicitly use it is okay for me, but it triggers the PostSharp build action for all these assemblies. It's worth it to wait a few seconds for building an assembly when it saves a lot of code, however a few seconds for each assembly where I don't use it directly results in a considerably slower build in my case.
My question is, if there is any way to tell PostSharp to skip its post-compile task on a project, e. g. by setting a property in the project file, adding an attribute to AssemblyInfo, adding a compiler symbol or anything like that.
Thank you very much in advance!
In my current project, I use PostSharp/Laos to implement the INotifyPropertyChanged interface to my domain objects (which becomes even more elegant in combination with automatic properites in C# 3.0). As the assembly with my domain objects is referenced by a number of other assemblies, I have to add a reference to PostSharp.Public and PostSharp.Laos for these assemblies, too.
"Infecting" these assemblies with PostSharp where I don't explicitly use it is okay for me, but it triggers the PostSharp build action for all these assemblies. It's worth it to wait a few seconds for building an assembly when it saves a lot of code, however a few seconds for each assembly where I don't use it directly results in a considerably slower build in my case.
My question is, if there is any way to tell PostSharp to skip its post-compile task on a project, e. g. by setting a property in the project file, adding an attribute to AssemblyInfo, adding a compiler symbol or anything like that.
Thank you very much in advance!
- mschmidt
- Posts: 2
- Joined: Sat Feb 16, 2008 6:37 pm
- First Name: Markus
- Last Name: Schmidt
- Company: 2ZJ9J
Re: Disable postsharp build task for a project?
I have blogger about this recently.
The default behavior is to call PostSharp if the current project references (directly or indirectly) references PostSharp.Public.dll.
If you reference PostSharp.Public.dll but your project does not need to be postsharped, define the SkipPostSharp compilation symbol (or "constant") in your project.
Happy aspecting!
Gael
The default behavior is to call PostSharp if the current project references (directly or indirectly) references PostSharp.Public.dll.
If you reference PostSharp.Public.dll but your project does not need to be postsharped, define the SkipPostSharp compilation symbol (or "constant") in your project.
Happy aspecting!
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: Disable postsharp build task for a project?
gfraiteur wrote:If you reference PostSharp.Public.dll but your project does not need to be postsharped, define the SkipPostSharp compilation symbol (or "constant") in your project.
Thank you very much, works great! No idea why I missed that...
By the way, I wish some commercial tool vendors would offer such great support, even on a weekend
- mschmidt
- Posts: 2
- Joined: Sat Feb 16, 2008 6:37 pm
- First Name: Markus
- Last Name: Schmidt
- Company: 2ZJ9J
3 posts • Page 1 of 1
