none
OutPut File RRS feed

  • Question

  • Hi All

    I'm running into a weird problem that has to do with the way VS 2005 copies your app database into the output directory. I have set the 'Copy to Output Directory' property of the local database to 'Do Not Copy'. The connection string in my app.config file is hardcoded to point to my local database:

     

    <add name="HF.My.MySettings.HFConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=D:\Data\VB\Net\Visual Studio 2005\ProjectSolutions\HF\App_Data\HF.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"

    providerName="System.Data.SqlClient" />

     

    When I build my app  get:

     

    Error 7 Unable to copy file "D:\Data\VB\Net\Visual Studio 2005\ProjectSolutions\HF\bin\Debug\App_Data\HF.mdf" to "bin\Debug\bin\Debug\App_Data\HF.mdf". Could not find file 'D:\Data\VB\Net\Visual Studio 2005\ProjectSolutions\HF\bin\Debug\App_Data\HF.mdf'.

     

    the system creates the following folders in my project directory:

    HF

    ...

    bin

    debug

    app_data

    bin

    debug

    app_data

     

    Anyone know why this is happening?

     

    TIA

     

    Gary

     

     

    Thursday, July 26, 2007 4:06 PM