I am using Visual Studio Setup and Deployment deploying my wpf app. My aim is to package my wpf app so that I can install and run it in any machines which don't have sql installed and machines don't have internet access. I am using sql server express 2008 r2 and VS2010. I did some research, migration might be the solution but I have no idea how to use it and I don't find helpful tutorials for that. Please help me. Thanks in advance.
You can use Microsoft SQL Server Compact Edition with a private deployment. See this good article
In your setup Project, Go to project properties, Click for prerequisite button and check sql server version you are using for your project, also check the .Net version of the project.
if the host computer don't have the internet than select "specify the install option" as Download the prerequisites form the same location as my application.
This will create a full package of your application and ready to be deployed in any machine.
Related
I'm trying to learn how to create a simple application using Visual Studio IDE in C#.
I wrote a little application that uses a local SQL Server database for reading and storing data. On my machine, the program seems to work normally, but when trying to install the application on client computer it seems unable to read from the database.
I've tried to include the following prerequisites to the publish properties but it doesn't work:
Microsoft .NET Framework 4.5.2
SQL Server 2012 Express LocalDB
Any ideas about the right way to do it?
Thanks to all.
You need to install SQL Server Express LocalDB (SqlLocalDB.MSI) on the computer you are deploying your ClickOnce application to.
Selecting "SQL Server Express LocalDB" in the Prerequisites window and using "Download prerequisites from the component vendor's web site" should take care of that:
If you do that it should install the LocalDB for you and any database errors are more than likely resulting from connection string errors or leaving Integrated Security enabled.
You need to test on a target computer which does not have "SQL Server Express LocalDB" installed and verify that after the ClickOnce deployment it is installed. This will confirm that the problem is not the missing prerequisites but the database access issues...
I create project in Visual Studio. My app use .mdf files. I created a setup project using InstallShield. On my computer where I developed my app, setup works just fine!
But when I install app on another machine I get an error
you need install SQL Server Express
How to embed SQL Server Express into my setup project?
You need to install SQL Server on your computer, Visual Studio can not embed this. Go to https://msdn.microsoft.com/en-us/sqlserver2014express.aspx, download and install. I'm not sure if you can get it without a Microsoft account.
By using .mdf you got a dependency on SQL Server Express (at least). You might want to pack your database to a server and have your app just use client libraries or you could switch to SQLite or something with less footprint.
Also take a look here how to bundle your setup with SQL Server Express:
Can I deploy SQL Server Express with my desktop application just like builtin database?
Visual Studio publishing tool can do that. If you're required to use InstallShield, there's a guy who ensembled a video guide: http://www.installationdeveloper.com/3356/how-to-install-sql-server-2008-express-r2-in-installshield/
I'm working on a C# project for windows mobile 6.5 and as of this morning I'm getting "Reference package not found. Device Connectivity Component" whenever I try to deploy.
It builds without errors and was working up until today. I did a bit of looking around and only found dead ends online. As far as I can see there are no clues about that component or package this is a reference to. I think it may be related to Windows CE SQL Compact but that's based on nothing. I've rolled back to an earlier version of my code and cleaned a few times. I'm stumped.
I would greatly appreciate any help even diagnosing this a bit further. I'm using Visual Studio 2008 3.5 SP1
Update: When I disable "Deploy latest version of the .NET Compact Framework (including Service Packs)" it does deploy but then throws errors related to the SQL database which worked previously. assumedly because it doesn't have access to the correct SQL packages.
Update: I also get the same error with the emulator, it builds, the emulator starts but can't deploy, giving the same error.
Update: I think this might have something to do with it. Note the double slashes in the path. I keep removing them. It keeps coming back.
Update/Correction: I can now deploy to the emulator, I had a problem before but it seems to be ok now. I still can't beploy to the device, same error.
For anyone who was pulling their hair out like me. I couldn't figure out what was wrong although I still suspect it was something to do with the .NET compact package. Eventually I created a new project, set up the references and copied and pasted the code over. It's not a nice solution but it worked after days of being stuck.
HA! I found it! This may not be your solution, but this was how I did it.
See this REF: http://msdn.microsoft.com/en-us/library/aa983326(v=vs.90).aspx
Since Microsoft is bad about deleting their old info, I'm going to post it here, too. But basically, if you select a Private Deployment, then Microsoft Updates will not influence your project or update your 3.5 databases to ...whatever the newest stuff from Microsoft is.
How to: Deploy a SQL Server Compact 3.5 Database with an Application
You have two deployment options for applications that contain SQL Server Compact 3.5 databases. The method of deployment you choose depends on the servicing requirements of your application and whether your users will need administrative credentials on the computer on which the application will be installed.
Following are the deployment options for SQL Server Compact 3.5 databases:
Traditional Microsoft Windows Installer (Microsoft setup technology)
Users need administrative credentials to install the application.
SQL Server Compact 3.5 will be serviced by Microsoft Update.
Can use ClickOnce deployment.
-or-
Private file–based deployment (deploying the SQL Server Compact 3.5 DLLs as part of the project)
Users do not need administrative credentials to install the application.
SQL Server Compact 3.5 will not be serviced by Microsoft Update.
Can also use ClickOnce deployment.
Traditional Windows Installer
Traditional Windows Installer technology is used in both standard Setup and Deployment projects and in ClickOnce deployment. When you deploy a SQL Server Compact 3.5 database, ClickOnce deployment provides an option that automatically installs SQL Server Compact 3.5 if it is not detected on the target computer. For this reason, ClickOnce is the preferred method of deployment for applications that include SQL Server Compact 3.5 databases (as opposed to creating a custom action in a Setup and Deployment project).
ClickOnce deployment has been updated so that it automatically includes the SQL Server Compact 3.5 runtime as a prerequisite for applications that include SQL Server Compact 3.5 databases. It also recognizes .sdf files as data files and sets these to the correct publish status.
Creating a ClickOnce deployment for an application that contains a SQL Server Compact 3.5 database consists of configuring the proper publish information in the Project Designer.
To use Windows Installer technology for ClickOnce deployment of an application that contains a SQL Server Compact 3.5 database
To open the Project Designer, in Solution Explorer/Database Explorer, double-click My Project if you are working on a Visual Basic project (or Properties if you are working on a C# project).
Click the Publish tab.
Click Application Files and set the .sdf file to Data File (Auto). (This setting notifies the installer to treat this as a local data file and to put it in the Data Directory.)
Click Prerequisites and select SQL Server Compact 3.5. (This setting notifies the installer to check whether the SQL Server Compact 3.5 runtime exists and to install it from the Internet if it is not found.)
Creating the Installer After the publish information is configured, create the installer.
To create the installer
In the Publishing Location box, type the Web site, FTP server, or file path to publish the installer to.
Click Publish Now to create the installer.
The application is ready to be installed. Go to the location you published to, and install the application to verify.
Private File-Based Deployment
Private file–based deployment refers to the process of including the required SQL Server Compact 3.5 DLLs as files in the project (as opposed to a reference to DLLs already on the target computer). If you include the necessary DLLs with the application, the requirement to install SQL Server Compact 3.5 is removed. Therefore, the administrative credentials are no longer needed.
You can use ClickOnce deployment technology for private file–based deployment. If you do, you must remember to clear the SQL Server Compact 3.5 prerequisite so that the Setup program does not install it.
To deploy a SQL Server Compact 3.5 database by using private file–based deployment
To open the Project Designer, in Solution Explorer/Database Explorer, double-click My Project if you are working on a Visual Basic project (or Properties if you are working on a C# project).
Click the Publish tab.
Click Prerequisites and then clear the check box for SQL Server Compact 3.5.
Close the Project Designer.
Go to the directory that contains the SQL Server Compact 3.5 DLLs. These are located in C:\Program Files\Microsoft SQL Server Compact Edition\v3.5.
Select the seven SQL Server Compact 3.5 DLLs and copy them:
sqlceca35.dll
sqlcecompact35.dll
sqlceer35EN.dll
sqlceme35.dll
sqlceoledb35.dll
sqlceqp35.dll
sqlcese35.dll
Paste the DLLs into the project in Solution Explorer/Database Explorer.
Select all seven DLLs in Solution Explorer/Database Explorer and open the Properties window.
Set the Copy to Output Directory property to Copy if newer. (This will replace any earlier DLLs in an existing application with the newer ones if the application is updated.)
Click the Show All Files button in Solution Explorer/Database Explorer.
Expand the References node.
Select System.Data.SqlServerCe.
Set the Copy Local property to True. (Because your development computer has the SqlServerCe DLLs in the global assembly cache, you must configure the application to use the DLLs in the output directory.)
Right-click the project in Solution Explorer/Database Explorer and select Publish to open the Publish Wizard.
Complete the wizard to publish the application.
The application is ready to be installed. Go to the location you published to, and install the application to verify.
I had the same problem. I got it to work by closing visual studio, renaming the directory:
C:\Documents and Settings\\Local Settings\Application
Data\Microsoft\CoreCon
Then reopening visual studio and the deploy worked.
i finally finished a proyect i was requested in my university with Lightswitch. Im ready to deploy (publish) next week, and i was JUST told that the people that will recieve the software, are using XP machines. I've read a lot of questions and lots of fixes, to get Lightswitch working on Windows XP, like:
Changing the DumpBin with "editbin vslshost.exe /SUBSYSTEM:WINDOWS,5.01 /OSVERSION:5.1"
deploy it as a desktop application with the services deployed to IIS (i dont think this will work because those are really old pc's)
install all the prerequisites manually and launch the ClickOnce application directly from deployment manifest file (.application)
create a sample ClickOnce application using Visual Studio 2010 OR Visual Studio 2008 with the same name as mentioned in Visual Studio 2012 and publish it. From the published location take the setup.exe bootstrapper and replace the existing setup.exe bootstrapper created using Visual Studio 2012
With all of this workarounds available, i NEED to ask, will this ultimately work? Can someone REALLY tell me that using one-or-all of this workarounds i WILL be able to deploy the application!?
Someone?
The 2-Tier Deployment issue on XP was also addressed in VS 2012 Update 2 IF you upgrade to a "V3" LightSwitch project by right-clicking on the root project in Solution Explorer and selecting "Upgrade Project". This updates the project to the "V3" project system, runtime and will use a much newer publish wizard. The version of VSLSHOST.exe that ships with VS 2012 Update 2 is compatible with XP.
Dave Kidder - LightSwitch team
http://social.msdn.microsoft.com/profile/dave%20kidder/
I have a successfully deployed application using the 3-tiers running as an out-of-browser (desktop app) on XP. Initially I was going to do the 2-tier deployment, but I was unable to get a workaround to work.
So I have one server, which runs IIS as well as my SQL server (OS is Windows Server 2003, but doesn't have to be.)
The client machines range from Windows XP to Windows 7, and I haven't had any special problems with windows XP.
So I can definitely say XP will work as a client. I was unable to get it to run the middle tier (hence IIS on the server) but I didn't try every last idea I found, so I won't say it's impossible.
The two links I found most helpful in the process were
http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx
and
http://blogs.msdn.com/b/bethmassi/archive/2012/03/29/lightswitch-iis-deployment-enhancements-in-visual-studio-11.aspx
Hope that helps.
I have developed a solution in Visual Studio 2008 C# WPF!
I'm using a service-base SQL database (I've created and managed using Microsoft Visual Studio Sever Explorer), now I'm going to publish it but the problem is that when I install .NET Framework 4.0 and SQLEXPRESS 2005 on other systems, my application doesn't launch! :-(
What componenets should I install on the systems to make it runnable?
If you develop with Visual Studio 2008 you will probably need to install .NET Framework 3.5 with Service Pack 1.
If that is not enough you need to post the error you get. Probably in the eventviewer you will see more info.
You can try to create a setup using Clickonce. To do this you need to go to the property pages of the WPF project an go to the tab Publish.
There you can choose to publish it to the network or to a local directory which can be put on a CD or USB device. The most important thing for you to check is the button "Prerequisites".
I hope this helps!
EDIT to help with the comments:
It is perfectly possible to put the prerequisites in the same folder as the install or even better in a fixed network location as you can see in this screenshot below