include .NET dll references with the project - c#

AoA,
I am trying to make a music player app in wpf C#(Visual Studio 2012, Win 8), I have made a demo(to chk the app on different computer, whether the app is running or not). 4 out of 7 passed, but I cant figure out why my app is not executing on the remaining 3?
6 out of 7 have windows 8 and visual studio 2010 or 2012. One is using windows 7 with Visual Studio 2010(app runs fine on this one)
I cant figure out the problem! There is no error, the app unable to execute on the 3 pc's
Is there a way that I can use my app with the references included? so that there is no need of external
references?
Any help?

You should try to debug it on one of the machines where your app refuses to run.
If it should be a runtime enviroment issue even if something like user account control (UAC) interferes, u get exceptions. So this doesn't seem to happen, so there must be a flaw in your code. Again, try to debug it on one of those machines. Or programm control of an installed firewall is blockin your app silently in the background...

Related

Win Form exe closes immediately after launch, deploying a win form application using setup project

I have created a win form application in c# with sqlce. I followed the steps here http://erikej.blogspot.dk/2013/10/sql-server-compact-4-desktop-app-with.html making some tweaks along the way since I was using sqlce 3.5 .net and that blog was talking about 4.0 .net.
When I finished the application, I created a set up project and build it which gave me an msi and setup file.
Now when I run this set up on my own machine where I developed the applicaton, it works a charm.
I tried it on a friend's machine as well, it worked well, he had visual studio 2010 as well on his machine.
Now when I tried it on 2 other machines with VS, after installation, on launching the exe, it launches and immediately closes, I do not see anything although.
I know it launches as i look at processes from my task manager it shows it in there for like 3-4 seconds and its gone.
I tried using this Not able to run the .exe file created from c# where i wrapped the try and catch around all the code inside the root win form but no text file was created with any errors.
On doing some research, it says it could be because I am missing some dll's, how do i make sure all the dlls from the references would be copied into the project ? I set all dll's to true for copy local.
Is this something else and not related to dlls?
I really just want to be able to install the application on any machine without any problems.
Thank you for your time.
EDIT
I need to add that this was a project that involved using an XBox controller sending data to a wireless receiver that was hooked to a PC. I used the XNA framework to intercept these and display some form of output on the Win Forms.
When packing and installing/deploying an application that makes use of the XNA DLLs on another non developer machine, the XNA framework needs to be installed.
My solution was packing my application along with the xna installer and so the xna framework installs as a prerequisite and then my application installs and then it no longer crashes.
Thanks to mrlucmoring and Mark for their support and troubleshooting.

C# Windows forms app created using Visual Studio 2012 not working on windows xp

I have created a windows forms application using C#.net 4.0 on Visual studio 2012.
App works great on windows 8 and windows 7 but when I try to run the same app on Windows XP I get following error message.
Following are the prerequisites for my app:
1. .net Framework 4.0
2. Windows Installer 4.5
3. ReportViewer 2010
4. MYSQL DB 5.6
5. Visual Basic PowerPack 10
I have installed all these pre-requistes on Windows XP. My 1 click setup installs the application correctly but on application Start up I am receiving error.
I also tried upgrading visual studio 2012 and then rebuilding and publishing the app but still the same error persists.
Following is the screen shot from the Application Event logger
Screenshot from Project's configuration manager
Screenshot from Project Properties
Can anyone suggest me what could be the issue.
If your program icon (or possibly any icons used by your program) has any images that are larger than 64x64 pixels, you can get this error on XP (in System.Drawing).
Check all your icon files and ensure that none contain images larger than 64x64
You Need Service pack 3 for XP and check the EXE build whether it might build for X64 and also check your XP machine is having .Netframework 4.0 change that into AnyCpu and once again build
the EXE and check with XP. and change your framework as .NetFramework 4.0
Are you targeting Mixed Platforms/Any CPU/x86? Can you try different build configurations?
Are you referencing any third party DLL's?
Can you catch and log details of the exception, or does the program fail to execute entirely?
I've had strange issues before when compiling for Mixed/Any CPU, and x86 machines throw a wobbler if the program isn't specifically targetted to x86.

Windows Mobile 6 Emulator fails to launch Visual Studio 2008 Project

Whenever i try to debug a solution for windows mobile 6 I am met with this error
The project works on other machines around the office and has worked on my machine before. My guess is a setting has changed on my machine that is causing this to fail but I haven't found any solutions.

Windows SmartScreen prevented an unauthorized app from running

I developed a c# software using windows 7. IDE is Visual studio 2010 professional, and the only dll it use is speech.dll. I generated an installer using the default way build menu->publish _software name_ -> Finish, when the setup wizard is on.
I provided the whole publish folder into 2 computers, windows 7 and windows 8. App installs fine in both machines but when it is about to run, windows 8 is saying Windows SmartScreen prevented an unauthorized app from running
Why is this happening? Please help!
Windows 8's SmartScreen is designed to "protect" consumers from malicious programs. In order to be trusted, you need to either buy a cert or sign up to distribute your application through the Windows Store (which costs less money).
It's a terrible move by Microsoft and will hurt devs like you, but there's currently no way around it. You will need to press "More information" when the SmartScreen alert comes up and then press the "Run" button to let your application run.

C# application publish - errors on different systems

I've made an application in C# . it's a WPF application with SDF DB.
I have VS2008 express.
I published my application (with SQL-CE dll) and installed it on my computer (I have windows XP) and on another WinXP computer and it worked fine.
I sent the same files to 2 people with windows 7.
the first one couldn't install the application - she got an error message like "cannot download the application [...] missing required files [...]".
the second one (window 7 with 64 bit) installed it but she could see only the main screen (that doesn't require DB) but after she tried to go to another screen - the application crashed and there was an error message that told her that maybe the application wasn't installed correctly (I have a screenshot but it's in hebrew).
What do I have to do to make the application work on windows7?

Categories