SHIM_NOVERSION_FOUND error while trying to run screensaver from preview - c#

I have an not trivial task to do. I need to run website as a screensaver in windows 8. So I used next approach to achieve it:
http://www.codeproject.com/Articles/31376/Making-a-C-screensaver
The solution is working well when I run from the Visual studio or run a compiled .exe or .scr directly. But when I try to set the resulting .scr as a screensaver and try to push preview button in windows 8(on the same machine where the same .scr is running well) I get the error - "SHIM_NOVERSION_FOUND".
I found that this error can appear when required version of .NET framework is not installed, but it's not my case cause when I run directly that '.scr' it's working.
Thanks for any advance!

Problem has been solved, I've just put screensaver.scr to c:/temp folder and all started working, probably I didn't have some kind of rights to access screensaver from c:/windows/system32

Related

Windows Form app won't run at startup but will run manually

I'm attempting to run an app on startup on a Dell laptop running Windows 10 Enterprise. It is written in C# using Visual Studio. The app is meant to run with administrator privileges. If I manually start the app, it works just fine. When I attempt to run it automatically using local group policy editor, it gives me the following error on login: "This application could not be started."
I looked up that error and wound up at the following link: https://support.microsoft.com/en-us/help/2715633/shim-errors-for-the-net-framework-version-and-platform-support. It said: "The app is not configured in a way that makes it possible to determine the appropriate version of the .NET Framework runtime. The corresponding shim code is SHIM_NOVERSION_FOUND."
I used information found here: https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed to determine which .NET frameworks were installed on the target device. There were a few, including version 4.0.
I added a config file to my project using instructions from the following link: https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-configure-an-app-to-support-net-framework-4-or-4-5.
When I rebuild the project and try to run it on the target machine, I get the same error as before.
NOTE: The target computer is under a group policy which may or may not be affecting the app. We don't know.
My ultimate solution for this problem was to build an installer for the program instead of just copying the release version over to the laptops manually

Windows firewall blocking C# application in debug mode

So until recently i have been testing my program which uses async sockets to send and receive data without problems but today suddenly it stoped working. After a lot of wasted time testing stuff and figuring out why the old version with practicly identical source code(copyed whole project folder) worked. Finnaly i figured out that windows firewall decided, for whatever reason, to block the exe again. If i go to the project folder and run is as admin it works fine (after accepting the firewall warning), but when i run it from within VS2010 in debug mode i get no warning and stuff just doesnt work.
So how do i allow the application when its running in debug mode through the firewall?
You say it works if you run the exe as an administrator, so what happens if you run Visual Studio as an administrator?
I fixed it with renaming the project folder in Projects/ and it worked again without any need to allow the program through the firewall again

ClickOnce windows application will not start

I have created a windows application using c# VS express 2012. The app works great in the VS environment. I have published the application using VS(ClickOnce) to the Desktop as an offline application, which does not check for updates. The app is not signed and security is disabled. The application seems to install fine when I run the setup.exe file. However, when I try to run the program from the start menu nothing happens. In the task manager, a process for the application appears for a few seconds then just goes away. The app window doesn't show and there aren't any indications of an error. If I navigate directly to the .exe of the app (%userprofile%\appdata\local\apps\2.0\%random id%......) and run it that way, it starts up and appears to function as designed. I've done some research and found that certain drivers and software (if installed) will cause this behavior (i.e. Kensington Mouse driver and Provencia software(?)). I've checked and I do not have either of these installed. Any help with this will be much appreciated.
Thanks in advance.

C# application doesn't run on another computer

I complied my C# windows forms application on Visual Studio 2008 with configuration "Release". When I try to run it on another computer, no windows are shown at all. Complied on Windows 7, another computer has windows xp installed.
What can it be?
Added:
I didn't create any installer. Another machine has .net framework 3.0, not 3.5 installed, but simple hello world application works just fine. I tried to copy the program to another folder on my computer - no changes.
Create a setup program instead of simply copying the files. This will help determine if you are missing anything such as .net fw 3.5.
You said:
Another machine has .net framework
3.0, not 3.5 installed
If you configured your project to run with .NET 3.5 then you MUST install it on the other machine.
Double check on the .NET version, if you built a release against .NET 3.5, and the other machine does not have .NET 3.5, that must be installed I'm afraid, not alone that, don't forget the Service Pack 1 as well. Have a look at this SO thread here to determine the .NET version that is installed, run it on the computer that 'appears to be broken' to see what version...
There are a lot of possibilities, from permission problems to difference in installed framework versions. Consider adding a deployment project, at least then all your dependencies will be taken care of, removing a large set of possible issues.
Edit: We won't really be able to help without more details though.
I agree with everyone. There are a lot of things that could go wrong. Here is my take on this issue. Are you spawning any threads when application starts up? If so, make sure you child threads are not failing and if you're doing any exception handling, keep in mind that you will not be able to catch exceptions in child threads from the main thread as they don't bubble up and will essentially be swallowed. Just a heads up.
Try running your program from a command prompt. Sometimes a message will be dumped to the console. I'm going to guess that it has to do with the .net version though.
Simply add another form in your solution explorer and copy your source code from previous form to the new form and also from form designer to new form designer.
Start your program and afterwards take a look in windows Event log. You will find an error entry in windows protocols application. There are maybe two entries. It tells you the reason.
Run your app in a console, prefixing with dotnet:
dotnet yourapp.exe
it gave me more logs to deal with.

XBAP Application, can these work in Google Chrome?

I'm developing a .NET 3.5 XBAP application that runs perfectly fine in FF3 and IE6/7 etc. I'm just wondering if its possible to get these to run under other browsers, specifically (as its in the limelight at the moment) Google Chrome.
XBAP applications do work in google chrome, however you have to set your environments PATH variable to the directory where xpcom.dll is located.
for example SET PATH=PATH;"C:\Program Files\Mozilla Firefox"
At the moment, XBAPs do not work in Google Chrome. I've gotten it to run once, somehow, but every time there after I've received an error that the browser cannot locate xpcom.dll. Apparently this error occurs for more than just XBAP applications. From what I've read users will have to wait for a fix seeing as Chrome is still in beta.
Update:
Looks like it's not going to be fixed: http://code.google.com/p/chromium/issues/detail?id=4051
First thing required here is to make the .Net framework 3.5 installed, once its done check whether the application is working in Mozilla Firefox, because it uses the plugin of Mozilla, if there is some issue in Mozilla, execute the aspnet_regiis.exe -iru from Visual Studio command prompt with administrative priviledge, then set Path variable to C:\Program Files\Mozilla Firefox and add the following DLLs to the location C:\Users\[Username]\AppData\Local\Google\Chrome\Application
mozalloc.dll
mozcpp19.dll
mozcrt19.dll
mozjs.dll
mozsqlite3.dll
nspr4.dll
nss3.dll
nssutil3.dll
plc4.dll
plds4.dll
smime3.dll
ssl3.dll
test.txt
xpcom.dll
xul.dll
and restart the browser, and check the application, if it still shows the plugin crashed, try re-installing the framework first and then Mozilla, also for Windows 7, mozilla requires to put the NPWPF.dll to the location C:\Program Files (x86)\Mozilla Firefox\plugins.
After this whole lot of hell, the application may still not debug, then publish the XBAP application and check with file and keep your finger crossed as it may work this time, this is how I made my application work in my system and checked for 5 more systems, so hope it resolve your problem too.
Here is another alternative solution that still requires Firefox to be installed, but you copy DLLs instead of modifying the PATH:
http://adrianbega.blogspot.com/2009/04/execute-xbap-in-google-chrome.html

Categories

Resources