Amir
Amir

Reputation: 9627

ClickOnce deployment "System.IO.IOException"

I'm trying to deploy an application by ClickOnce deployment. Clicking on the setup.exe initiates the installation but suddenly dialog box prompts saying that

An Error has occured writing to the hard disk.Check if there is enough available space on the disk.Contact the application vendor!

When I click the Details button of the dialog box, it shows the inner exception,stacktrace,... and here is the useful part of the exception message:

System.IO.IOException
        - The file 'E:\Users\XXXX\AppData\Local\Temp\Deployment\JO85B12B.BBL\N1TJQM37.HZ5\Microsoft.ExceptionMessageBox.dll' already exists.
        - Source: mscorlib

It also worth saying that, this is the package for a project called Project A, referencing a second project, say Project B which needed to be included in the ClickOnce package, so I have mark it as Include in the Project A properties. And Microsoft.ExceptionMessageBox.dll which's been mentioned in exception is used in both projects, so I've marked that as include in both places (although on my machine Microsoft.ExceptionMessageBox.dll is in the GAC (as a part of SQL Server), it is not available on client's PC, so that's why I have included that on the package as well)

Upvotes: 2

Views: 2235

Answers (1)

LawMan
LawMan

Reputation: 3625

I had a dll that was giving me this problem. I went to the project's properties >> Publish Tab >> Click the Application Files button >>

  • Set the "Publish Status" to "Include" for the File in question.
  • Create a new "Download Group" for the assembly that's giving you problems and select it (I don't know why this worked).
  • Publish.

Upvotes: 3

Related Questions