In an application we can output a report as a csv file and load it up similar to the following code:
Process.Start("C:\MyReport.csv") ' Not real path
When running code analysis it produces the following error:
CA2122 Do not indirectly expose methods with link demands 'Form.Function(Definition)' calls into 'Process.Start(String)' which has a LinkDemand. By making this call, 'Process.Start(String)' is indirectly exposed to user code
I have seen somewhere to mark the assembly with the SecurityTransparentAttribute
, does this just suppress the message? If so this is not what I would like. Is there another way of opening the file that would circumvent this message without suppressing it? I would ideally like to avoid Excel automation if I can as Excel is not used anywhere else at the moment.
Ideas?