Unable to modify PostSharp compiled assembly
5 posts • Page 1 of 1
Unable to modify PostSharp compiled assembly
Greetings,
I have been trying to get a stable solution that allows one of our assemblies to make use of PostSharp (our solution has 34 projects in it). What we are noticing is random problems involving OutOfMemory, assembly can not be updated, or the PostSharp.Extensibility.Message cannot be converted ...
In a previous thread we talked about changing from doing the postsharp build step using the command-line (presumingly using a different process outside of Visual Studio). When I use this flag I frequently get the "assembly is in use" type situation where it can not update the MSIL with the aspects.
I went with checking in with the PostSharpUseCommandLine = False and told people they may notice occassional out of memory issues which will cause them to restart Visual Studio. Not the best solution I admit, but it was less frequent then the problem listed above. However, now (as indicated in the conversion thread I started) we are getting that problem.
It appears to me that when I use the command-line that the Visual Studio process still might have a handle to the assembly file which is preventing PostSharp from doing its thing. Is there something I am missing to avoid this problem? You had indicated that this will likely be the default going forward in future builds, so I figured I might be missing something.
Thanks!
I have been trying to get a stable solution that allows one of our assemblies to make use of PostSharp (our solution has 34 projects in it). What we are noticing is random problems involving OutOfMemory, assembly can not be updated, or the PostSharp.Extensibility.Message cannot be converted ...
In a previous thread we talked about changing from doing the postsharp build step using the command-line (presumingly using a different process outside of Visual Studio). When I use this flag I frequently get the "assembly is in use" type situation where it can not update the MSIL with the aspects.
I went with checking in with the PostSharpUseCommandLine = False and told people they may notice occassional out of memory issues which will cause them to restart Visual Studio. Not the best solution I admit, but it was less frequent then the problem listed above. However, now (as indicated in the conversion thread I started) we are getting that problem.
It appears to me that when I use the command-line that the Visual Studio process still might have a handle to the assembly file which is preventing PostSharp from doing its thing. Is there something I am missing to avoid this problem? You had indicated that this will likely be the default going forward in future builds, so I figured I might be missing something.
Thanks!
- bmorley
- Posts: 8
- Joined: Tue Apr 08, 2008 6:08 am
- Full Name: Bob Morley
- Company: Software Innovation
Re: Unable to modify PostSharp compiled assembly
This "file is in use" issue is strange. Can you send details? What exactly is the message?
Thanks,
Gael
Thanks,
Gael
Gael Fraiteur, project leader
got good support? consider donating to the project.
got good support? consider donating to the project.
- gfraiteur
- Site Admin
- Posts: 581
- Joined: Tue Dec 18, 2007 3:09 pm
- Full Name: Gael Fraiteur
- Company: postsharp.org
Re: Unable to modify PostSharp compiled assembly
We had a developer now run into this issue and has provided me the error message that was being reported. Right now we use apply the aspects in-process and he ran into the typical "OutOfMemory" exception. In these cases I have people flip over to the command-line method and he then ran into this error:
Error 27 Unable to copy file "obj\Debug\PostSharp\SoftInn.Services.dll" to "C:\workspace\Coreworx_DEV\Projects\SoftInn.Services\obj\Debug\SoftInn.Services.dll". The process cannot access the file 'C:\workspace\Coreworx_DEV\Projects\SoftInn.Services\obj\Debug\SoftInn.Services.dll' because it is being used by another process. SoftInn.Services
I had him shutdown visual studio and change back to in-process and then rebuild. Any ideas on this particular issue? He did suggest that he was building and had stopped a build at one point before he ran into this error.
Error 27 Unable to copy file "obj\Debug\PostSharp\SoftInn.Services.dll" to "C:\workspace\Coreworx_DEV\Projects\SoftInn.Services\obj\Debug\SoftInn.Services.dll". The process cannot access the file 'C:\workspace\Coreworx_DEV\Projects\SoftInn.Services\obj\Debug\SoftInn.Services.dll' because it is being used by another process. SoftInn.Services
I had him shutdown visual studio and change back to in-process and then rebuild. Any ideas on this particular issue? He did suggest that he was building and had stopped a build at one point before he ran into this error.
- bmorley
- Posts: 8
- Joined: Tue Apr 08, 2008 6:08 am
- Full Name: Bob Morley
- Company: Software Innovation
Re: Unable to modify PostSharp compiled assembly
That's strange. It may be related to that: http://www.postsharp.org/tracker/view.php?id=206.
Please subscribe to this bug to get notification of fixes.
Gael
Please subscribe to this bug to get notification of fixes.
Gael
Gael Fraiteur, project leader
got good support? consider donating to the project.
got good support? consider donating to the project.
- gfraiteur
- Site Admin
- Posts: 581
- Joined: Tue Dec 18, 2007 3:09 pm
- Full Name: Gael Fraiteur
- Company: postsharp.org
Re: Unable to modify PostSharp compiled assembly
The MSBuild issue should be solved. Please see http://www.postsharp.org/tracker/view.php?id=207.
Gael
Gael
Gael Fraiteur, project leader
got good support? consider donating to the project.
got good support? consider donating to the project.
- gfraiteur
- Site Admin
- Posts: 581
- Joined: Tue Dec 18, 2007 3:09 pm
- Full Name: Gael Fraiteur
- Company: postsharp.org
5 posts • Page 1 of 1