Tuesday 31 August 2010

Project : error PRJ0003 : Error spawning 'resgen.exe'.

Project : error PRJ0003 : Error spawning 'resgen.exe'.

Kept getting this in vs2008. Searched for resgen.exe and it existed in the windows SDK directory.

So simply go to Tools/Options/ProjectsAndSolutions/VC++ Directories and append "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin" or whatever to the Executable files list. Sorted!

Saturday 28 August 2010

System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.

System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.

Argh! Been trying to install a service for about 2 hours. I followed the wizard in vs2008 to create a new service, added a call to start a thread of my code, hit compile, removed unicode and set to clr, hit compile again, and woo an EXE. Opened a command prompt, typed in "myservice.exe -Install" and oh dear.. failure. Seems I had to right click some crazy stuff and "Add Installer".. Sure I didnt have to do that part last time I made a service. Odd. So did it anyway, and tried again.
Still no luck! Tried creating an ASPNET admin user on my machine.. nope..
Some progress was made when switching properties from Local Service to Local System.. but the big breakthrough came when I closed my command prompt and opened another one as administrator.
Still not convinced by all this admin crud in Win7. Not sure it's an advance on XP in that regard. Ho hum, it looks like I've got a service to play with at last :)

Monday 23 August 2010

The application has failed to start because its side-by-side configuration is incorrect.

Argh!
I recent spent a very frustrating day trying to get a program that was built with vs2005 running on a pc without visual studio installed. Any pc with visual studio installed had no problem running the simple exe, but without, this error always appeared:
"The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail."
Straight away I meddled with "Multi-threaded / Multi-threaded DLL", but going totally static wasn't possible as some external librarys were being used that insisted on DLL action. So forget the static, and play nice.. Installed vs2005 runtime on the target machine, and vs2005 runtime SP1. Still no luck. I was compiling in XP, and vista was on the target machine. Maybe an issue there? The vista machine probably wasn't up to date with windows updates too.
Anyway, six frustrating hours later, I opened up the project in vs2008 instead, converted it, and soon managed to get it to compile. This worked!
So it looks like I'll be using vs2008 for all my pc projects now.