C# application publish - errors on different systems - c#

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?

Related

Clickonce file association icon issues with Windows 10

I have create a very simple project and deployed it using Clickonce. The only problem i have is that the icon for the associated file extension i have setup is not working on windows 10.
I tried on 4 windows 10 computer and if i create a sample file "test.abcd" it shows an icon of blank sheet (the standard unrecognized icon).
I tried on 3 windows 7 and 4 windows server 2008 and all of them display my application icon on the sample file. I have ran the install as administrator on all computers. What is the extra step to do on windows 10 to make it work ? i have even tried to clean the shell icons on the windows 10 computers without success. They are all running with the UAC at the lowest setting and all account are local admin too.
I also tried remote desktop to a windows 10 computer to see if there is any difference and it doesn't work either.
Edit after countless tests and even recreated the project twice i figured out the problem is only on windows 10
here a sample (on left windows 7 on right windows 10) You clearly see that the file association image is not working. Both ARE associated because if i double click the file the application starts and load the file.
Edit adding how association work in clickonce
Edit I recently build 3 new computer with windows 10 and 2 Windows 7. The problem still exists. I tried putting a dozen large random progID and no matter the progId the icons are displayed on the 2 windows 7 computer but not on windows 10.

getactiveObject command fails for windows 8 and windows 10

I have the following Powershell code below that i've compiled into an executable (.exe) file and have packaged it into SCCM to push against several 100 users. I have setup the SCCM package to run as "Install as user" and not as an Administrator. The package successfully captures the data for users with Windows 7, but any user that has Windows 8/10 installed fails to capture the data I need.
I did a try/catch statement and get this error - "
Exception calling "GetActiveObject" with "1" argument(s): "Operation
unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))"
I'm trying to understand why the same exact code works perfectly on Windows 7 machines, but does not work on Windows 8/10. Is there a fix? I would like to avoid using "New-Object -ComObject 'Outlook.Application'" because i don't want to create a new Outlook process in the background (fear of corrupting user's running Outlook session). I need to run the Powershell code to capture the active running Outlook process. Please help. Thank you
$mail = [Runtime.Interopservices.Marshal]::GetActiveObject('Outlook.Application')
$name = $mail.Application.DefaultProfileName
output of $name is stored locally to a log text file.
Make sure Outlook and your app are running in the same security context - either both apps are running with elevated privileges ("Run As Administrator") or neither app is running as an admin.
I was experiencing similar symptoms. I don't know if this is your exact problem, but maybe my solution will help someone else who stumbles across this issue.
The following MS KB article mentions that Office applications do not register themselves in the ROT until the application loses focus (which is apparently "behavior by design"). If the application is not registered in the ROT, GetActiveObject will return the error you indicated.
In my case, the script was working reliably on Windows 7, but it only sometimes worked on Windows 8. For some reason, perhaps related to the versions of Office installed, different versions of Internet Explorer (which I used to launch the Office apps) or maybe changes to Windows itself, I experienced different default window focusing behavior on Windows 8. As soon as I manually clicked on the Office app in my Windows 8 tests, the script started working.
To solve the problem, I just inserted a call to focus the Office application window before making the GetActiveObject call, which made the operation completely reliable on Windows 8.

Compiled C# application 0xC0000142 error

I met a highly disturbing issue. I wrote a C# application in Visual Studio Community which uses a local .mdf database file.
My computer's operating system is Windows 10 Home, 64 bit. My problem is that I cannot run the compiled EXE file on certain computers. Previously I used it on a computer running 32-bit Windows 7 Professional, with no problems.
After upgrading it to Windows 10 Pro, 32 bit, the application starts, but it crashes when it comes to an SQL command:
"The application was unable to start correctly. 0xC0000142".
I reinstalled the Microsoft SQL Server 2014 Express Local database, performed a system cleaning but the problem persists. My setting in Visual Studio is 'Any CPU'. I tried to run the EXE in the debug folder and also the one in the release folder. On 64-bit Windows Home everything is just fine with either of the .exe files. On 32 bit Professional, on the other hand, 0xC0000142 error again.
I tried another computer with 64-bit Windows 10 Home and Microsoft SQL Server 2014 Express Local DB: the application runs without problem. I guess some DLL files cause the problem, but neither can I track the source of the problem nor fix it. Does anybody have any suggestions?

WPF c#.NET 4 With SQLite on XPe

it's the first time that i ask help here, but i really desperete.
I had developed a WPF Applicacation with VS2010 SP1 in c#.NET and SQLite database. It's really a stupit application with 5 windows. The main one, on startup opens few thread: one is needed to manage http connection on it, and 2 thread interacts with a hardware connected with a usb connector (i used a DLL written in C). The main window has 3 buttons and when i press one of them, a new window is displayed. Every single window has a close button that close the window. When i press a button a play a wav file stored in a folder (I used full path to play wav file).
The image for XP embbeded is made starting with tool PE and made with the right tool of microsoft.
The application is developed on a PC with XP SP3 with VS2010 SP1 on board. The application run on it is working perfectly: i can open and close window with any problem and stop.
On XP embedded, i installed .NET Framework 4 and the installer for using SQLite with framework4 (i did the same on my Pc).
If i run my application on XPe (Q7 ATOM E640T with 1 giga of RAM and 4 giga of internal HD SSD), after 8 time that i open and close a windows, the application stops to work and i got a out of memory exception. i monitored with task manager, and when i got the exception the system is using 1/3 of the all memory.
The connection with SQLite is opened at startup of the application and is still opened till the end of it.
With dependency walker I checked witch DLL are loaded on Pc and witch on XPe and i saw that sometime the dll were with different version, so i copied from the Pc the newst on XPe, but nothing went right.
I installed WindDBG on XPe, but it's not help me.
I read a lot of forums where WPF is "compatible" with XPe, so i did the application.
Any suggestion to resolve my problem?
Thanks

include .NET dll references with the project

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...

Categories