Wiki

Changes between Version 4 and Version 5 of Troubleshooting

Show
Ignore:
Timestamp:
06/02/10 04:42:17 (7 years ago)
Author:
Chuck
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Troubleshooting

    v4 v5  
    6262 
    6363 
     64=== System.Security.!SecurityException === 
     65 
     66When you run a program created with Cobra you get "Unhandled Exception: System.Security.!SecurityException". 
     67 
     68This happens on Windows when the current directory is a network drive and the Cobra test runner is invoked. The key call within the test runner is to the instance method System.Reflection.Assembly.!GetName(). The exception reads: 
     69{{{ 
     70Unhandled Exception: System.Security.SecurityException: Request for the permissi 
     71on of type 'System.Security.Permissions.FileIOPermission, mscorlib, 
     72      Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. 
     73   at System.Security.CodeAccessSecurityEngine.Check(Object demand, 
     74      StackCrawlMark& stackMark, Boolean isPermSet) 
     75   at System.Security.CodeAccessPermission.Demand() 
     76   at System.Reflection.Assembly.VerifyCodeBaseDiscovery(String codeBase) 
     77   at System.Reflection.Assembly.GetName(Boolean copiedName) 
     78   at System.Reflection.Assembly.GetName() 
     79   at Cobra.Lang_ert_5ff8.Test.TestRunner._collectTestsFor(Assembly ass, 
     80      Boolean willFollowReferences, Set`1 found) 
     81... 
     82}}} 
     83 
     84Workarounds include: 
     85 1. Run the program on a non-network drive. 
     86 2. Recompile with -include-tests:no option. 
     87 
    6488=== Other Problems === 
    6589