Hi,
not sure what triggered this, but I have started seeing these issues when running unit tests for code that creates files on filesystem.
Granted I would assume it's my filesystem issue. but VS test runner (and live unit tests) works fine!
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Xunit
VS2017
Windows 2012 server
running in parallels machine.
nCrunch fails both in x64SateliteProcess/HostInsideIDE modes
And VS is running as local admin.
interstingly tests are able to create CSV files but not XLSX usingDocumentFormat.OpenXml;
I understand it's very specific use case, but one that might force me turn to MS live testing :(
Any tips?!
Thanks,
Daniel
Remco NCrunch Developer
#15302
03 Feb 2021 23:25 UTC
Hi Daniel,
Thanks for sharing this issue.
I'm not aware of anything in NCrunch that could directly cause this problem. The test environments we create default to full trust, and this looks like the kind of exception that could be thrown from partially trusted or constrained code.
Does this happen consistently for you? Or is it intermittent?
Check that there isn't a virus scanner involved here. They can do some strange things when it comes to security.
Can you try turning off the 'Track File Dependencies' setting? We're aware of some compatibility issues between this and isolated storage.
If you can isolate the issue in a sample project you can share with me (i.e. one that works with other runners but fails under NCrunch), I should be able to investigate further and hopefully provide some kind of resolution.
Thanks for sharing this issue.
I'm not aware of anything in NCrunch that could directly cause this problem. The test environments we create default to full trust, and this looks like the kind of exception that could be thrown from partially trusted or constrained code.
Does this happen consistently for you? Or is it intermittent?
Check that there isn't a virus scanner involved here. They can do some strange things when it comes to security.
Can you try turning off the 'Track File Dependencies' setting? We're aware of some compatibility issues between this and isolated storage.
If you can isolate the issue in a sample project you can share with me (i.e. one that works with other runners but fails under NCrunch), I should be able to investigate further and hopefully provide some kind of resolution.
Hi Remco,
thanks for coming back to me. "Track File Dependencies" applied to test project sorted it.
All back to normal again!
Thanks.
thanks for coming back to me. "Track File Dependencies" applied to test project sorted it.
All back to normal again!
Thanks.
Post a reply
Log in to reply.