Where does a deployed application look for data files?
8 次查看(过去 30 天)
显示 更早的评论
I have compiled a MATLAB application into a .NET assembly. I can launch the assembly ok from C# (using Visual Studio 2013), but it fails when it looks for a file (using xmlstringinput) that is normally found in the MATLAB path (when not deployed).
I have tried placing copies of this file in a number of different places, with no success. I suspect that it will work to specify that the file be included in the deployment package, but I would rather that it load this file at runtime rather than be packaged with the deployment.
Where does a deployed application look for data files?
0 个评论
采纳的回答
Image Analyst
2015-1-17
You're best off not referring to files without the full path prepended. The folder where you put the executable is not the "real" folder where the "real" executable is located. What the first one does is to unpack the real executable and all the other stuff you included with it into some secret hidden folder. What I do is to ship data files and install them to some known location - a known folder - and then have my code point to it there. There are ways to get the actual folder it's running from if you need it.
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Compiler SDK 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!