can't create new mdf file in App_Code folder

Last post 06-10-2009 11:23 AM by blackwe. 7 replies.

Sort Posts:

  • can't create new mdf file in App_Code folder

    10-20-2008, 10:40 AM
    • Member
      33 point Member
    • jayman911
    • Member since 05-19-2003, 4:00 PM
    • Posts 52

    I just installed vwd express 2008 and SSE 2008.  For SSE i setup a default installation (i.e. SQLEXPRESS as the default instance name etc). 

    In VWD when i right-click on the "App_Data" folder and select "Add New Item--->SQL Server Database" i get the following message:

    "  Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL: ............."

    So to get around that what i've done is select the "Database Explorer" tab and right-click on "Connections--->Add Connection".  This process works for me but the other doesn't.  Any idea why?

    One problem with the 2nd approach is now that database appears in the database explorer for any project i have open in VWD.  Again any idea why thats happening?

     If anyone could offer a suggestion as to why i can't add a new connection in the solution explorer as explained above that would be fantastic.

     Also - i don't know if it matters but i'm running a 64-bit version of vista and have installed the x64 version of SSE.

     

    Jason

  • Re: can't create new mdf file in App_Code folder

    10-22-2008, 10:19 AM
    • Member
      33 point Member
    • jayman911
    • Member since 05-19-2003, 4:00 PM
    • Posts 52

     No suggestions?  In case i was unclear with my first posting -

     

    I just installed vwd express 2008 and SSE 2008.  For SSE i setup a default installation (i.e. SQLEXPRESS as the default instance name etc). 

    In VWD when i right-click on the "App_Data" folder and select "Add New Item--->SQL Server Database" i get the following message:
    "connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=49251"

    Also - i don't know if it matters but i'm running a 64-bit version of vista and have installed the x64 version of SSE and then uninstalled it and tried x86 version of SSE and no change.  I have "SQLExpress" setup as the instance name.

    So why can't i add a new connection in the solution explorer and why does the error message refer to SSE 2005 when i have 2008 installed?  

     

    Thanks 

    Jason

  • Re: can't create new mdf file in App_Code folder

    10-23-2008, 9:28 PM
    Answer
    • Member
      33 point Member
    • jayman911
    • Member since 05-19-2003, 4:00 PM
    • Posts 52

     I'm floored that no one here has encountered this problem.  Anyway - after 3 days struggling i believe i've finally figured it out and will offer my solution:

     There seems to be a TON of people having this problem with VS 2005 and SSE 2005, but in all my searches i could not find anyone that had this problem with VWD 2008 and SSE 2008.

     The solution was to be sure in VWD in "tools-->options-->database tools-->data connections" the Sql Server Instance name is set to "SQLEXPRESS" (provided you installed the default settings and left it at that name).  Once i did this i tried adding a new item and then got the following error:

    "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance".  After searching through some threads i found my solution on this discussion:

    http://forums.microsoft.com/msdn/showpost.aspx?postid=293667&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=1

     this discussion is long (71 threads) but on the 2nd page someone suggested deleting the folder:

    "Delete C:\Documents and Settings\User Account\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS"

    because i'm in VISTA not XP i had to guess the folder was:

    "C:\Users\<account name>\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS"

    (just in case this was wrong i just renamed the folder)

    Anyway - after a restart of visual studio i have been able to successfuly add a new database item.  (yay)

    Hope this is helpful to others.  If so please let me know.

    Jason

  • Re: can't create new mdf file in App_Code folder

    04-16-2009, 9:23 PM
    • Member
      2 point Member
    • ernestb08
    • Member since 04-17-2009, 1:18 AM
    • Posts 1

    I have Visual Studio 2008 and I'm also running Windows Vista Business (X64).

    I followed your steps and the ones in VWD 2008 don't seem to match with VS2008.

    Do you know of anybody that might run into the similar problem as I have.

     

    Thanks,

    Ernest

  • Re: can't create new mdf file in App_Code folder

    04-17-2009, 8:09 PM
    • Member
      2 point Member
    • jf1081
    • Member since 04-17-2009, 11:56 PM
    • Posts 1

     I have visual studio 2008 and SQL server 2008 and I am getting the same error message when I try to create a new database by right-clicking App_Data and selecting Add new item.  I can go to the Server Explorer and create the database, but I would like to do it from App_Data becasue the database comes with default tables for members and what not.  I tried following the procedure that worked for jayman11, but it has not worked for me.

    Any other thoughts?

  • Re: can't create new mdf file in App_Code folder

    04-27-2009, 7:19 PM
    • Member
      192 point Member
    • pryanjr
    • Member since 04-19-2009, 6:51 PM
    • Posts 91

    It may help to completely uninstall (removing registry enrties) and then reinstall. Check your directory and file permissions after.

  • Re: can't create new mdf file in App_Code folder

    05-02-2009, 9:24 AM
    • Member
      8 point Member
    • sauravraaj
    • Member since 12-21-2008, 12:38 PM
    • Posts 13

    I have the exact same error message as following:

     "connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=49251"

     My scenario is little different. I had everything working fine with SQL 2008 express + VWD 2008 express + Vista Enterprise

     I uninstalled SQL 2008, and installed SQL 2005 express. And now, VWD simply refuses to connect to the SQL. Hence I cannot add a new db 

     

    So now, I dont have any application Angry

    I did even convert the SQL 2008 db to SQL 2005 using database publishing tools wizard and created new db from Maanagement Studio. When I try to attach this db in VWD, i get the similar error, where VWD cannot connect to SQL.

     doomed Surprise

  • Re: can't create new mdf file in App_Code folder

    06-10-2009, 11:23 AM
    • Member
      2 point Member
    • blackwe
    • Member since 05-15-2007, 5:22 PM
    • Posts 8

    I have encountered the same problem with Vista Ultimate X64 and I get the identical error message.  Here is my setup:

     Vista Ulitmate x64.
    SQL Server 2008 Developer SP1 x64 - MSSQLSERVER
    SQL Server 2008 Express SP1? - SQLExpress
    Visual Studiio 2008 Professional Edition SP1

     There were no installation issues.  

    My advice, dont uninstall anything.  SQL Server Express 2008 is supposed to work with VS 2008 Pro+.

     Fortunately, the developer instance works great (not with *.mdf files).  I recommend you use

    SQL Server 2008 Developer SP1 x64

    until a fix is found for the SQL Express 2008 and VS 2008. 

    DO NOT trash your system trying to fix this, its not your system, its Microsoft.  They need to respond to this issue and tell us how to fix it.   THERE IS NO REASON THAT SQL EXPRESS 2008 SHOULD NOT WORK WITH VS 2008.

     Fix it please Microsoft.  I dont have time to fix my software AND yours.

     FYI:  I have SQL Express 2005 and SQL 2005 Developer x64 on my notebook (with Vista Business x64) and both work fine with VS 2008 Pro.  I would also strongly recommend using the Windows Vista versions that came with your MSDN subscriptions if you have them, they seem to work far better than OEM versions of Vista which in my experience are crap.

Page 1 of 1 (8 items)