SharpCrafters Forum – PostSharp.MSBuild.dll : Access is denied

SharpCrafters Support Forum

        


PostSharp.MSBuild.dll : Access is denied Expand / Collapse
Author
Message
Posted 8/19/2009 4:31:17 PM


Community Member
Hello,

I am using PostSharp in one of my projects (via MSBuild). I'm getting the following error on one of my development machines:

C:\Work\project1\Tools\PostSharp\PostSharp-1.5.targets(77,5): error MSB4062: The "PostSharp.MSBuild.PostSharp15GetCurrentProjectDirectory" task could not be loaded from the assembly C:\Work\project1\Tools\PostSharp\PostSharp.MSBuild.dll. Could not load file or assembly 'PostSharp.MSBuild, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7' or one of its dependencies. Access is denied. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available.


PostSharp is not installed globally. Process internals show that devenv.exe is the only process accessing PostSharp.MSBuild.dll. On other development machines the project is built without any problem.

What could possibly be the problem?

Thanks!
Post #3151
Posted 8/19/2009 4:54:25 PM


Gael Fraiteur

SharpCrafters
No idea. You can try:

1. fuslogvw
2. Run msbuild inside the debugger, enable Managed Debugging Assistants

-gael
Post #3152
Posted 11/9/2009 7:26:33 PM


Community Member
I think Post Sharp has no access permission on the debug assemblies of yours.

I had similar problem the exception was:
The "PostSharp.MSBuild.PostSharp15GetCurrentProjectDirectory" task could not be loaded from the assembly D:\PostSharp-1.5\PostSharp.MSBuild.dll. Could not load file or assembly 'file:///D:\PostSharp-1.5\PostSharp.MSBuild.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available.

The Post Sharp was trying to inject his policy in my assemblies. Simply, I've closed visual studio. Delete the bin and obj folders in my projects, then opened the visual studio again and built the solution. The error was resolved.

Try this,
and Good luck
Post #3153
« Prev Topic | Next Topic »


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

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.015. 8 queries. Compression Disabled.