SharpCrafters Forum – PDB is not generated if assembly is installed into the GAC

SharpCrafters Support Forum

        


PDB is not generated if assembly is installed... Expand / Collapse
Author
Message
Posted 4/29/2009 10:47:31 PM


Community Member
All previous problems (<!-- l --><a class="postlink-local" href="http://www.postsharp.org/forum/postsharp-laos/debugging-not-possible-sharepoint-project-t207.html">postsharp-laos/debugging-not-possible-sharepoint-project-t207.html</a><!-- l -->, <!-- l --><a class="postlink-local" href="http://www.postsharp.org/forum/integration/error-while-loading-the-assembly-amd64-t753.html">integration/error-while-loading-the-assembly-amd64-t753.html</a><!-- l -->) are finally solved, but there is still one issue. When I'm compiling the assembly which is already installed into the GAC PDB switch is not turned on for ilasm command.
I attached debugger to postsharp and I figured out that GetSymbolReader method in DotNet20Platform class is looking for PDB file in GAC instead of BeforePostSharp folder.
When I removed the assembly from GAC PDB started to be generated.

It would be nice to solve this issue, because very often there is no option to remove the assembly from GAC before every build process.


public override Assembly LoadAssembly()
{
....
AssemblyName assemblyName = AssemblyName.GetAssemblyName( this.fileName );

foreach ( Assembly assembly in AppDomain.CurrentDomain.GetAssemblies() )
{
  if ( AssemblyName.ReferenceMatchesDefinition( assembly.GetName(), assemblyName ) )
  {
     Trace.PostSharpObject.WriteLine( "The assembly {{{0}}} was already loaded.", assemblyName );
     return assembly;
  }
}

return AssemblyLoadHelper.LoadAssemblyFromFile( this.fileName, this.Evidence );
.....
}
Post #3044
Posted 4/30/2009 6:37:35 AM


Gael Fraiteur

SharpCrafters
<!-- m --><a class="postlink" href="http://www.postsharp.org/tracker/view.php?id=338">http://www.postsharp.org/tracker/view.php?id=338</a><!-- m -->
Post #3045
Posted 2/5/2010 1:01:56 PM


Community Member
Hi,

I'm on the latest build of 1.5.6.627 and am still experiencing the above stated issue. Is there an eta on a fix for this?
Post #3046
Posted 2/9/2010 7:44:40 AM


Gael Fraiteur

SharpCrafters
The issue has not been fixed; the assembly to be transformed cannot be present in GAC. This is not and won't be supported. You should remove it from GAC before PostSharp does the job.
Post #3047
« Prev Topic | Next Topic »


All times are GMT +1:00, Time now is 11:45am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.020. 7 queries. Compression Disabled.