|
|
|
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!
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
No idea. You can try:
1. fuslogvw 2. Run msbuild inside the debugger, enable Managed Debugging Assistants
-gael
|
|
|
|
|
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
|
|
|
|