Scott Wojan

DotRant BLOG
posts - 18, comments - 63, trackbacks - 5

My Links

News

Archives

Post Categories

Image Galleries

Using PostSharp without installing via the MSI

So, it took me forever today to figure out how to get PostSharp working without installing it 'globally' with the msi installer.

In a nutshell, you have to include a directory for example /lib/ with all of the PostSharp baggage:
  • Default.psproj
  • PostSharp.targets
  • PostSharp-1.0.targets
  • PostSharp-1.0.version
  • PostSharp-AppDomain.config
  • PostSharp-Platform.config
  • PostSharp.Core.dll
  • PostSharp.Core.pdb*
  • PostSharp.Core.XmlSerializers.dll
  • PostSharp.exe
  • PostSharp.exe.config
  • PostSharp.pdb*
  • PostSharp.Laos.dll
  • PostSharp.Laos.pdb*
  • PostSharp.Laos.psplugin
  • PostSharp.Laos.Weaver.dll
  • PostSharp.Laos.Weaver.pdb*
  • PostSharp.MSBuild.dll
  • PostSharp.MSBuild.pdb*
  • PostSharp.Public.dll
  • PostSharp.Public.pdb*

* = Optional

Add a reference to the PostSharp.Laos and PostSharp.Public assemblies in your project.

Then you have to edit your .csproj file around the existing <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> section to be: 
  <PropertyGroup>
    <DontImportPostSharp>True</DontImportPostSharp>
    <PostSharpDirectory>lib\</PostSharpDirectory>
  </PropertyGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Import Project="$(PostSharpDirectory)PostSharp.targets" />

You can download a working demo: http://rapidshare.com/files/183439996/PostSharpTest.zip.html

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Wednesday, January 14, 2009 8:32 PM |

Feedback

Gravatar

# re: Using PostSharp without installing via the MSI

Thanks. This works!
2/27/2009 2:56 PM | Alan
Gravatar

# re: Using PostSharp without installing via the MSI

The link is dead :(
4/2/2009 8:24 AM | Nikos D
Gravatar

# re: Using PostSharp without installing via the MSI

We have several projects (14) hanging off of one solution and each will eventually use PostSharp. What would be the best strategy for deploying the above set of files to a target machine?
11/12/2009 2:40 AM | el bauldo
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: