Home

Could not open resource file

edited June 2012
I am referencing a C# assembly that reads an external file in a sub directory off this assembly, it doesn't look like LINQPad is copying this into it's temporary directory because when I call upon the code, I get the Exception "Could not open resource file C:\Users\xxxx\AppData\Local\Temp\LINQPad\myoniokz\shadow_hlfofe\xxxx.xml". Any suggestions?

Comments

  • Yes: LINQPad is like Visual Studio in that it copies non-framework reference assemblies to a local folder before executing the query. This ensures that the original assembly files aren't locked (so you can rebuild them in Visual Studio).

    As a workaround, go to Edit | Preferences | Advanced, and choose the option "do not shadow assembly references". This will, however, mean that LINQPad queries may keep a lock on the assemblies that you reference while the query is open. There are some heuristics to detect when you switch to Visual Studio and close the domain, but it won't always fire (for instance, if you have results to grids active, LINQPad must keep the domain alive or the grids will disappear).
Sign In or Register to comment.