C# closed XML library with .net core 3.1.1 - works when debugging but not when compiled

笑着哭i 提交于 2020-03-25 16:55:03

问题


when I run code via visual studio (IIS Express) it runs fine and exports xl spreadsheet.

var wb = new XLWorkbook();
var ws = wb.Worksheets.Add(dt, "Sheet1");
wb.SaveAs(fileName);

However when I compile and run on either IIS or IIS Express (on exactly same machine), I get the error

Could not find a part of the path 'C:\...'

Very wierd!

来源:https://stackoverflow.com/questions/60663348/c-sharp-closed-xml-library-with-net-core-3-1-1-works-when-debugging-but-not-w

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!