1

I must be going mental, right?

Since a couple of days I have been getting errors like

MyAssembly Could not load file or assembly 'AnotherAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=' or one of its dependencies. Access denied C:\work\Assemblies\something\MyAssembly\SGEN

I thought it was something I'd done during my work on the feature I'm working on. Then today I had reason to check code out of our repo from two months ago. And got the same error.

What?! I know for a fact that that code built fine two months ago, it's running in production!

Has Microsoft pushed some update that has messed things up, or what?

Tim Lloyd
  • 37,954
  • 10
  • 100
  • 130
Name
  • 11
  • 1

2 Answers2

2

Well, there is a pretty specific error message "Access denied". This could refer to "AnotherAssembly" or an assembly that is needed by "AnotherAssembly". This most likely is a problem with some rights on your development machine and nothing else.

Daniel Hilgarth
  • 171,043
  • 40
  • 335
  • 443
0

The "Access denied" part of the error seems to point to a security problem. Assuming that you're on a development box and can change security settings freely, try giving all users read/write control to the folder mentioned in the error (C:\work\Assemblies\something\MyAssembly\SGEN)

Also, if it's a web application try clearing your temp asp.net files (%SystemRoot%\Microsoft.NET\Framework\versionNumber\Temporary ASP.NET Files) and giving it read/write access to all users.

Paolo Falabella
  • 24,914
  • 3
  • 72
  • 86