Problem to add .MDF file from Visual Studio 2010 application

Hi All
I would like to add to project WPF applicaction in VS 2010 .MDF file.
The problem is that when I am trying to add new service-based database (.mdf) I am getting the error "Connection to SQL Server database files (.mdf) require SQL Server 2005 Express or SQL Server 2008 Express to be installed and running on the local computer.
The SQL Server 2008 is already been installed. How to fix the problem?
Thanks.

That is the sql express service.
It means it's already started and your error message is about something else.
Go get this:
http://www.microsoft.com/en-gb/download/details.aspx?id=22973
In that is sql server express management studio.
Use that to create your database as in my previous post.
This way you can see the thing created, query it and tell it's not going to get copied around by visual studio.  It's way too easy to get messed up by visual studio if you create a database in your project.
Do not create your database in visual studio.
Connect to the database from your visual studio project.
Don't create it from there.
How did you set your sql express up?
Is it mixed mode authentication or what?
If you don't know then make it mixed
http://msdn.microsoft.com/en-GB/library/ms188670.aspx
My preference is to use entity framework to access the database.
If you set up an entity data model in your solution that will sort your connection string.
Please don't forget to upvote posts which you like and mark those which answer your question.
My latest Technet article - Dynamic XAML

Similar Messages

  • Error importing result file from Visual Studio Online load test - Incorrect Syntax near ')'

    We are seeing the exact same issue as reported in:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/4a338992-1a46-47ae-9f13-10a53a6264b5/error-downloading-load-test-report-from-visual-studio-service-load-test-incorrect-syntax-near?forum=TFService#cb43383b-c60d-4dcc-a353-352ac6908b35
    When clicking on the "Download report" after running a load test using Visual Studio Online an error occurs.  The download completes, but the import fails at 15% with the following:
    This is happening for 2 different users on 2 different systems.  
    Any assistance in resolving this would be greatly appreciated!
    Let me know if additional information is needed.
    Thanks!

    Hi,
    We are researching your issue. Please clarify my question with detailed information:
    1. Do you get the error in your first post when you click ‘Download report’ after you run load test from
    Visual Studio 2013 on
    team foundation service?
    2 You said that ‘I am trying to import the test results into a Visual Studio 2012 (Update 3) on-prem instance’, what and where is
    your load test result repository? A SQL Server database or the default database:LoadTest2010 in SQL Express on the same machine with Visual Studio 2013?
    3 Whether you specify the load test result repository under Load Test->Manage Test Controller?
    4. What error do you get? Please provide us more detailed information about the error message or share us with a screenshot.
    5 Whether you can run the load test successfully locally and get the load test result with the same load test result database?
    6 You said that your co-worker can work fine. Please check whether your account has enough permissions for load test result database and download load test result from TFS to load test result database based on the account
    permission of your co-work.
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Crystal Report  not listed Add New Item for Visual Studio 2010

    I just finished installing cryestal report for visual studio 2010.
    During the installation a visual studio error dialog popped up "Operation cannot be completed. Access Denied", the crystal report installation continued and was informed that the installation was successful.
    But on opening my visual studio project to add new item,  crystal report item is not listed there.
    Is there anything that needs to be done to get it listed in the Add New Item dialog for visual studio?

    I wonder what file you ran to install CRVS2010? Was it the MSI as opposed to the actual install file?
    The link to the correct install is here:
    http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_2.exe
    Is that the file you ran to install CRVS2010? E.g. as opposed to:
    http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_2.zip
    - Ludek

  • Unable to open .cs files from Visual studio solution

    I am unable to open visual studio .cs files. .cs file are part of solution. Blank screen is displayed with no text display

    Hi Anonymous_99, 
    Thanks for your post.
    Your current solution stored in TFS Source Control? If yes, what’s the version of 
    your TFS and VS?
    You opened your solution in Solution Explorer, but you cannot open the .cs file from Solution Explorer? If yes, which message you received? Or you had opened your .cs file, but without any text display?
    If this issue only happened in this current one solution or your VS cannot open any .cs file on your client?
    Please share the screenshot(s) here, it will help us provide the better response.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error in deploying from Visual Studio 2010.

    Error occurred in deployment step 'Activate Features':  Field type SoftContent is not installed properly.
    Go to the list settings page to delete this field.
    Indul Hassan

    Hi,
    What if you delete this issued field and then deploy again?
    It would be better if more details about how you develop this solution can be provided, others will be easier to find the root cause of this issue for you.
    Two links about the similar issue for your reference:
    http://sharepoint.stackexchange.com/questions/42311/how-to-remove-a-field-from-the-list-settings-page
    http://www.fewlines4biju.com/2011/04/field-type-field-name-is-not-installed.html
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Debugging a c++ dll from visual studio 2010

    Hi everybody
    I'm extending and optimizing a c++ dll that is called in a labview file. I have managed to get it update and running but it's not doing what is supposed to .
    I need to debug it by setting break point in the c++ code because the labview part is just memory and display. How I can do that? Any help will be really appreciated
    I'm using labview 2012 and VS210 express.
    Tanks a lot
    Amos
    i attached the main file of the dll and the labview interface.
    Solved!
    Go to Solution.
    Attachments:
    Fistola mono array.llb ‏1024 KB
    Dll lab.cpp ‏21 KB

    I have deleted the main, and as far as i can see ( so means see that everything says debug, i'm in local system should i switch to remote?) the configurations is fine. the strange things is that he keep asking me to compile the file when i start the debug even if i just do it. i'm sure i'm calling the right dll and i have set break point everywhere but still nothing. i tried to run labview step to step but it isn't helping. in labview the dll node debug proprety is set to maximum.
    i send you the adjurned dll
    Attachments:
    Dll lab.cpp ‏12 KB
    dllmain.cpp ‏1 KB

  • Problem making a C++ DLL in Visual Studio 2010 work in LabView

    Hello, I've noticed that I cannot do ' extern "C" ' on the methods Open(), Close(), StartStreaming(), and StopStreaming() in the following Class:
    class ApplicationIo : public FiclIo
        friend class X5ScriptPlayer;
        friend class ApplicationSettings;
        typedef std::vector<__int64>    IntArray;
    public:
        //  Member Functions
        ApplicationIo(IUserInterface * ui);
        ~ApplicationIo();
        ModuleIo &  ModIo()
            {  return Module;  }
        unsigned int BoardCount();
        void Open();
        bool IsOpen()
            {  return Opened;  }
        void Close();
        void StartStreaming();
        void StopStreaming();
    How can I export the methods of the Class mentioned above? I've read the manuals and seen examples about how to get DLLs working in LabView, however none of them ever talk about when there is an actual Class involved and exporting the methods of said Class.
    Any help would be greatly appreciated.

    Okay, well at least that clears up one piece of the puzzle.
    Here is the wrapper I need:
    Here's the .h of the wrapper:
    #ifndef _APPIO_DLL_WRAPPER_H_
    #define _APPIO_DLL_WRAPPER_H_
    #define DLLEXPORT __declspec (dllexport)
    #ifdef __cplusplus
    extern "C" {
    #endif
    typedef struct ApplicationIo ApplicationIo; /* make the class opaque to the wrapper */
    DLLEXPORT ApplicationIo* Construct_AppIo(IUserInterface* ui);
    DLLEXPORT void Destruct_AppIo(ApplicationIo* LV_Ref);
    DLLEXPORT void Open(ApplicationIo* LV_Ref);
    DLLEXPORT void Close(ApplicationIo* LV_Ref);
    DLLEXPORT void StartStreaming(ApplicationIo* LV_Ref);
    DLLEXPORT void StopStreaming(ApplicationIo* LV_Ref);
    #ifdef __cplusplus
    #endif
    #endif /* _APPIO_DLL_WRAPPER_H_ */
    Here's the .cpp of the wrapper:
    #include "AppIoDll.h"
    #include "ApplicationIo.h"
    ApplicationIo* Construct_AppIo(IUserInterface* ui)
    return new ApplicationIo(ui);
    void Destruct_AppIo(ApplicationIo* LV_Ref)
    LV_Ref->Close();
    delete LV_Ref;
    void Open(ApplicationIo* LV_Ref)
    LV_Ref->Open();
    void Close(ApplicationIo* LV_Ref)
    LV_Ref->Close();
    void StartStreaming(ApplicationIo* LV_Ref)
    LV_Ref->StartStreaming();
    void StopStreaming(ApplicationIo* LV_Ref)
    LV_Ref->StopStreaming();
    The one problem I have with this is how am I supposed to get the pointer to the IUserInterface class to the C Wrapper constructor?

  • "Error occurred in deployment step 'Retract Solution': The solution does not have a WSP file associated with it." occurs while deploying from Visual studio

    HI,
    I get this error "Error occurred in deployment step 'Retract Solution': The solution does not have a WSP file associated with it. " when deploying my project from visual studio 2010 to
    SharePoint 2010 site. I tried restarting IIS, but it didn't help. This application used to work fine until the server crashed during the deployment process. All the other applications on the same server works fine also. Any ideas how to fix this issue? 
    Thanks in advance,
    AM

    Hi
    AM ,
    Thank you for your posting!
    According to your error message, it says your solution does not have a WSP file associated with it. Take a look at the file system.  After you Right Click -> Deploy Solution on the VS Solution, there
    should be a .wsp file at <Solution Directory>\bin\<debug|release>.
    Also the error can be occurring when the developer try to deploy solutions over pre-existing solutions  with material changed  in the solution.  Go to your Central Administration Site and then
    Operations and then Solution Management.  Make sure that there not already a solution with the same name deployed or installed there.  If there is, remove it and try deploying again.
    And you could look in logs and find if there is a below error in ULS log (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS).
    Thank you for your understanding and support.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Problem when adding ABAP custom webservice with Visual Studio 2010

    Hi All,
    After creating a webservice for a custom RFC function developed in a ECC6.0 SAP machine, I tried to add it to a Visual Studio 2010 windows aplication (through a web reference connection).
    The sequence I've done is:
    - Create RFC in ABAP, with testing ok
    - Create a WEBSERVICE with the ABAP editor
    - Configured the webservice with SICF with:
         Procedure: Standard
         Logon data: standard R3 user
         Security requirement: Standard
         Authentication: Standard SAP User
    Then, in SOAMANAGER I copied the webservice URL and tried to add it to Visual Studio 2010, but it keeps asking me the user and password. I try to supply the R3 username and password but if fails.
    Why is ECC6.0 asking the user and passord if I've defined a SAP user for the login process?
    Is there any way to disable this?
    Thanks,
    Manuel Dias

    Hello Manuel,
    You can use the following code:
    CredentialCache cache = new CredentialCache();
          cache.Add(new Uri("WEBSERVICEURL:PORTNUMBER/"), "Basic", new NetworkCredential("USERNAME", "PASSWORD"));
    SAP needs a password.
    Kind regards,
    JK

  • Network Issues with Visual Studio Online Application Insgihts

    My team is using Visual Studio Application Insights to monitor availability of our web server (we use cloud service)by making a call to it every 5 minutes from different locations around the world including Singapore, Japan, France and Switzerland.
    We experienced continuous failures of this monitoring from Singapore from September, 19-th and the issue became very big on September 21-st, September, 22-nd. After that on September, 23-rd and 24-th we have failures form Paris. Then starting from September,
    24-th to September, 26 we have very high percent of failures from Japan. Our problems finished with one more failure coming from Switzerland on September, 26.
    I wanted to find what the source of the problem is since we checked our code and it very simple to cause network issues. However, it is very difficult to reproduce the issue. My questions is - were all these problems coming from Visual Studio Online Application
    Insights?
    One example error that it is tracked in Visual Studio Online Application Insights is:
    System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because
    connected host has failed to respond 138.91.9.51:8080
       at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at Microsoft.VisualStudio.TestTools.WebStress.WebTestTransaction.ResponseReceived(IAsyncResult result)
       at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
    Thank you!
    Kanio

    Hello Kanio,
    There is nothing AI-specific in the stack, and, since the exception was reported to the portal, I would say that AI was working that time. However, if the issues goes away as soon as you disable AI - then it might mean that the issue is induced by AI presence.
    Also, you can try the latest AI SDK (0.13 as of today) and see if the issue still happens.
    Dmitry Matveev

  • Maintain a rptproj in Visual Studio 2010

    I need to maintain a reporting project and RDL files in Visual Studio 2010. I am struggling to find the right download that allows me to do that.
    I am an MSDN subscriber
    Certified Geek

    Hello Arne,
    The rptproj seems to be SSRS project? If so, it is not installed from Visual Studio, it belongs to BIDs which is installed from SQL Server Setup and please check the following thread:
    http://stackoverflow.com/questions/14333459/are-ssrs-reports-supported-in-visual-studio-2010-or-2012
    See here:
    Install Visual Studio 2010 PLUS SP1.
    Install
    SQL Server Data Tools (SSDT)
    Install SQL Server 2012 with Data Tools and Reporting Services. (I used the trial version)
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Crystal Report errors when installing visual studio 2010 app

    I'm trying to install a Visual Studio 2010 application on two client's machines and I get a different error on each one.  Both errors point to Crystal Reports.
    I have a feeling that I'm supposed to install something on the client's machines but I'm not sure what.
    The first client's error says that CrystalDecisions.Windows.Form Version 13.0.2000.0 cannot be loaded.
    The second client's error says that FlashControlV71. Version 1.0.3187.32366 needs to be installed in the GAC.
    What am I supposed to install on the client's machines?  Or if that's not the problem, what is causing the errors?
    This is my first visual studio app so I'm a complete newbie.
    Thanks for any help or advice.

    Thanks for your reply.  I installed the runtime (x64) and am now getting a new error on the first client's machine.  I think it's telling me that I installed the wrong version of the runtime.  The client is running x64t Win 7 so I chose the x64 runtime to install. 
    System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: An error has occurred while attempting to load the Crystal Reports runtime. Either the Crystal Reports registry key permissions are insufficient, or the Crystal Reports runtime is not installed correctly. Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required.  Please go to http://www.businessobjects.com/support for more information.
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()
       --- End of inner exception stack trace ---
       at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
       at IM_CMETracking.ReportViewer.CrystalReportViewer1_Load(Object sender, EventArgs e)
       at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
       at CrystalDecisions.Windows.Forms.CrystalReportViewer.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    The second client is running XP.  The error I'm getting on their machine is this:
         CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException:    Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
    Thank you for your help.

  • Where does "C:\Program Files\Microsoft Visual Studio 8" folder come from?

    This seems like the right forum to ask, Where does "C:\Program Files\Microsoft Visual Studio 8" folder come from, need to find out by what app it was installed.

    Hi Anna,
    Could you please tell us what about this problem now?
    If you have been solved the issue, would you mind sharing us the solution here? So it would be helpful for other members
    who get the same issue.
    If not, please let us know the latest information about it.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problems consuming a MII web service using 'Add Service Reference' in Visual Studio

    I can generate a client proxy when I use 'Add Web Reference' in visual studio, but when I try to use 'Add Service Reference', I get an empty stub. We have a product that generates web service client proxy code in a manner similar to that used by the Microsoft 'Add Service Reference' code. We are usually able to consume ASMX web services as well, but currently are unable to consume the SAP MII web service. Any help would be appreciated.

    Hi Didi,
    I can successfully add a Service Reference and execute an MII transaction with input and output parameters through the Service Reference.  This is using MII14 SP5 latest patch, and Microsoft Visual Studio 2008 in C#.
    Which version of MII, and which version of VS?
    Can you paste the MII url into a browser and get it to return the WSDL?
    Regards, Steve

  • Problem creating a repository in Oracle from Visual studio Load test

    Hi,
    I have an issue which will be greatly appreciated if answered soon. I have created a load test using Visual studio 2010 Ultimate in Oracle 11 g environment . I just want to create a load test repository in Oracle db to store results of the load test results. I have read on MSDN the method to do so for SQL server(at http://msdn.microsoft.com/en-us/library/ms182600.aspx) but not Oracle. Please respond asap. Thanks

    912605 wrote:
    Hi,
    I have an issue which will be greatly appreciated if answered soon. I have created a load test using Visual studio 2010 Ultimate in Oracle 11 g environment . I just want to create a load test >repository in Oracle db to store results of the load test results. I have read on MSDN the method to do so for SQL server(at http://msdn.microsoft.com/en-us/library/ms182600.aspx) but not >Oracle. Please respond asap. Thanks
    I could be wrong, but I believe to achieve this you will need to buy a third party tool that supports the Load Testing project with Oracle like "Toad Extension for Visual Studio".

Maybe you are looking for