System.IO.IOException: Sharing violation on pat

来源:互联网 发布:子曰能以礼让为国乎 编辑:程序博客网 时间:2024/06/08 03:58
System.IO.IOException: Sharing violation on path E:\wang\downloadmanage\Assets\download\IEM2.apk
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00251] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:320 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess)

  at DownloadFramework.ThreadManager+<Download>c__AnonStorey1.<>m__0 () [0x00024] in E:\wang\downloadmanage\Assets\ThreadManager.cs:1


解决:File.Create(filePath).Dispose(); 开始后面没有添加 Dispose

阅读全文
0 0
原创粉丝点击