1

I have an app that I've recently added two C# classes to. It always built in both debug and release. The differences between the two configs are nothing. Now when I build the release, it says that one of the dependencies cannot be accessed. This is only for the release build. Nothing changed to that dependency and it always worked.

Any ideas?

Jason N. Gaylord
  • 7,910
  • 15
  • 56
  • 95
  • Looking at this further, it appears it has something to do with the dependencies being located on a network resource. I did get around this once before (most likely in debugging for VS 2010), but not sure why it isn't working for the release config. As soon as I find it out, I'll post back. – Jason N. Gaylord Oct 26 '10 at 23:46
  • SGEN : error : Could not load file 'X.dll' or assembly or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) – Jason N. Gaylord Oct 26 '10 at 23:46

3 Answers3

1

The config file is sgen.exe.config. I had to create the file and I was able to build the release after the file was added.

Scott
  • 21
  • 3
1

So to resolve this issue, I had to add a config file at C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools that read:

<?xml version ="1.0"?>
<configuration>
    <runtime>        
        <loadFromRemoteSources enabled="true" />
    </runtime>
</configuration>
Jason N. Gaylord
  • 7,910
  • 15
  • 56
  • 95
0

Are the references between the various projects project, or binary references? If they are binary references, are your output folders pointing to the right locations for the different build targets and platforms? You may also want to ensure that your build order is correct.

Hugo
  • 1,814
  • 1
  • 15
  • 23