C# Ado.net Entity Framework error? - c#

I create a project to display a list of student on Database (the current.net framework version is 4.6.1). The wizard ask me to add database to the project and I accept it.
When I build the project on Debug mode, everything works fine on Windows 10.
I copy the debug folder to windows 7 and try to run the project, it shows me the error message.
System.Data.EntityException: The underlying provider failed on Open.
I try to install the .net framework 4.6.1 for windows 7 but it didn't work. This is the list of installed programs on windows 7:
The list of installed programs on windows 10:
I really don't know why my project didn't work on windows 7, are there some missing files or frameworks?
Thanks for your reading :D

"...LocalDB is a feature of SQL Server Express targeted to developers."
You can use LocalDB on your development machine, but don't expect it to be working on other machine. I can't tell you an exact solution as it depends on what you are allowed to do. Moving to a "real" database maybe.

Related

unable to install or run C# application on client PC

I have developed a desktop application in c# & SQL server 2012 using Visual Studio 2013. I have included the reference for Microsoft.VisualStudio.DebuggerVisualizers and set copy local : true.
The application runs perfectly on client systems with windows 8, 10.
But its showing this error while installing on a windows 7 system.
- OS Windows 7 Ultimate
- already installed .NET Framework 4.5
- installed Report Viewer.exe 2012
- installed report viewer.msi 2010
- installed sqlclr types
- the system doesnt have any microsoft c++ redistributable , i am not sure whether it has any impact.
I checked in the assembly folder, but couldnt find the Microsoft.VisualStudio.DebuggerVisualizers.dll
Am I missing any prerequisites here? How to solve this issue so that i can install the application
Error Message
It needs the Microsoft.VisualStudio.DebuggerVisualizers.dll in the global assembly cache. The GAC is the area where libs are placed which can be accessed from all of the system.
It's kinda a ugly fix but you could place this lib in the same or subdirectory of the same directory where the application is.
Is it possibly that you haven't installed VS on that Win7 machine but on the others?
Unintentionally the Microsoft.VisualStudio.DebuggerVisualizers.dll had been included in the project reference. And in the client system the specified dll could not be found even after trying to install it. Hence I removed it from reference and then it worked perfectly fine without any issues. I guess instead of report visualizer i have included debuggervisualizer. It was a manual error.
Thank you for your support

Lightswitch 2012 and Windows XP

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.

How to deploy the .Net Compact Framework and SQL Server Compact Edition with the Application

I have a windows mobile 6 application.For Application installation,Device require sql server ce and .net framework to run Application on the device...If a device has these Prerequisited Softwares already...the application will work.
If a device has no these Prerequisited Softwares [Sql server ce or dotnet framework to run the App] it wont work. So i need to install this also at the time of Application installation along with the cab.
How to Pack these Preqrequist Softwares with the cab file????
Or Any Other Solution to this...please help me on this...
I have added an image as i have in my application as of now....
The best way to try to include SqlServer CE and your .NET Framework files in your project is to mark your Application Project so that it includes all dependencies and include those files in your Setup Project.
That said, sometimes the installs work and sometimes they require a lot of debugging to make them work.

MySQL Connector/Net 6.0.2 path not found

I created a Windows form application (C#) with Mysql as back end
mysql connector net 6 0 2 is used in my form for connection
the exe works fine on my system but when i copied it to other computer and try to run it, it is giving me eror as
MySQL Connector/Net 6.0.2 file path not found
Thanx
You either need to deploy the MySQL Connector assemblies with your own application (or merge them into your own application assembly), or ensure the connector is installed on the machine you need to run the application on.
Try packing your application in a installer and add the connector as a resource when setting the project .Net makes this really easy but differs based on the IDE you are using.

How to make my project runnable on any system?

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

Categories