VSTS 2010 SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x80131515)

前端 未结 13 2489
执念已碎
执念已碎 2020-12-07 13:35

I am experiencing a strange issue with VS2010. We use TFS to build our API dlls and we used to reference them in our projects usign a mapped network drive that was fully tru

13条回答
  •  我在风中等你
    2020-12-07 14:14

    I just had the same/similar issue on a TFS build server where a build was referencing dll's from a network share.

    The problems is that the CLR v4 security policy model has changed since previous versions and are not sandboxing assemblies as before.

    To fix your issue just find the location of sgen.exe and create a sgen.exe.config in the same folder with following contents:

    
      
        
      
    
    

    sgen.exe is usually at

    "C:\Program Files\Microsoft SDKs\Windows\v[current version]\bin\NETFX 4.0 Tools"
    

    You can read about some of the changes around CAS policies in .NET 4.0 in this blogpost: Link

提交回复
热议问题