OnExit is not included via PostSharp in asp.net project

I have a PostSharp setup and it seems to work, but I don't force it to type OnExit (I registered the setup to make sure it works) ...

It's a bit tricky to set up with asp.net - or is it just me ... I'm using 1.5 new version

I basically have the following in my web.config and had to add SearchPath, otherwise it won't be able to find my assemblies

  <postsharp directory="C:\Program Files\PostSharp 1.5" trace="true">
   <parameters>
     <!--<add name="parameter-name" value="parameter-value"/>-->
   </parameters>
   <searchPath>
     <!-- Always add the binary folder to the search path. -->
     <add name="bin" value="~\bin"/>
   </searchPath>

 </postsharp>

      

I have set up the trace, but it is strange to me that it is being generated in the temp directory, maybe this is my problem, I am not sure ... hence I am doing F5 ... Is it possible to name the Output directory and the output file? As you can see, this is a DLL editing in a temporary directory, so IIS is no longer in control, so it doesn't execute it.

Confused! :-)


C: \ Program Files \ PostSharp 1.5 \ postsharp.exe "/P:Output=C:\Windows\Microsoft.NET\Framework\v2.0.50727\ ASP.NET External Files \ mysitemvc-1.2 \ c2087140 \ 8ac2dc93 \ postsharp \ App_Web_04ae3ewy .dll "" /P:IntermediateDirectory=C:\Windows\Microsoft.NET\Framework\v2.0.50727\ ASP.NET External Files \ mysitemvc-1.2 \ c2087140 \ 8ac2dc93 \ postsharp "/ P: CleanIntermediate = False / P: ReferenceDirectory =. / P: SignAssembly = False / P: PrivateKeyLocation = / P: ResolvedReferences = "/ P: SearchPath = C: \ Source \ Visual Studio 2008 \ Projects \ mysitemvc \ mysitemvc \ bin," / V / SkipAutoUpdate "C: \ Program Files \ PostSharp 1.5 \ Default.psproj "" C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ ASP.NET Temporary Files \ mysitemvc-1.2 \ c2087140 \ 8ac2dc93 \ before-postsharp \ App_Web_04ae3ewy.dll "

PostSharp 1.5 [1.5.6.627] - Copyright (c) Gael Fraiteur, 2005-2009.

info PS0035: C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ ilasm.exe "C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ ASP.NET Temporary Files \ mysitemvc-1.2 \ c2087140 \ 8ac2dc93 \ postsharp \ App_Web_04ae3ewy.il "/ QUIET / DLL / PDB" /RESOURCE=C:\Windows\Microsoft.NET\Framework\v2.0.50727\ ASP.NET external files \ mysitemvc-1.2 \ c2087140 \ 8ac2dc93 \ postsharp \ App_Web_0 res "" /OUTPUT=C:\Windows\Microsoft.NET\Framework\v2.0.50727\ ASP.NET External Files \ mysitemvc-1.2 \ c2087140 \ 8ac2dc93 \ postsharp \ App_Web_04ae3ewy.dll "/ SUBSYSTEM = 3 / FLAGS = 1 / BASE = 18481152 / STACK = 1048576 / ALIGNMENT = 512 / MDV = v2.0.50727

+2


source to share


1 answer


PostSharp.AspNet implements IAssemblyPostProcessor. The path is passed to ASP.NET. What PostSharp does is that it creates a temp subdirectory in that directory, which is passed to ASP.NET, writes its output there, and then copies the output back to the input.

There is no way to change this mechanism (and I still don't see any reason).



-gael

+1


source







All Articles