Search code examples
sqlsql-servervisual-studiowinformswindows-installer

Visual Studio installer extension output


I am using Microsoft Visual Studio Installer Projects to make a setup file for my C# app and when I install my app it says:

Failed to update database because the database is read-only

one

Here is screenshot of my database in Microsoft SQL Management Studio that shows read-only is false.

two

Here is screenshot of my database file in installer that shows read-only is false.

three

Yet after installing my app I get error above.

Any idea?


Solution

  • Solved

    While comments above were helpful but easiest solution for me that didn't require lots of editing and coding was to change Application Folder path to outside of Program Files (86) folder something like this

    C:\[Manufacturer]\[ProductName]
    

    Here is screenshot of where to change that path and everything works fine now

    one

    Now it will install on path like C:\My_Company\App_Name where there is no permission restrict for system to access database file.