Unable to write to output file '<filename>': <error>
There was a problem creating the file.
An output file cannot be opened for writing. The file (or the folder containing the file) may be opened for exclusive use by another process, or it may have its read-only attribute set.
Common situations where a file is opened exclusively are:
The application is already running and using its files. To solve this problem, make sure that the application is not running.
Another application has opened the file. To solve this problem, make sure that no other application is accessing the files. It is not always obvious which application is accessing your files; in that case, restarting the computer might be the easiest way to terminate the application.
If even one of the project output files is marked as read-only, this exception will be thrown.
Error ID: BC31019
To correct this error
Compile the program again to see if the error recurs.
If the error continues, save your work and restart Visual Studio.
If the error continues, restart the computer.
If the error recurs, reinstall Visual Basic.
If the error persists after reinstallation, notify Microsoft Product Support Services.
To check file attributes in Windows Explorer
Open the folder you are interested in.
Click the Views icon and choose Details.
Right-click the column header, and choose Attributes from the drop-down list.
To change the attributes of a file or folder
In Windows Explorer, right-click the file or folder and choose Properties.
In the Attributes section of the General tab, clear the Read-only box.