Why? I have some unit tests that need to run off of some pre-defined static XML data and while the tests run fine so long as the file and assembly are in the same location as soon as the assembly is moved elsewhere they start to fail, “file not found” exceptions.
So if the file is embedded in the assembly I don’t need to worry about where it is located anymore.
The assumption, in the following, is that the file is XML that has been serialised from an existing List and is being reloaded back into the same, and that the file is in the current assembly. “_states” is a global variable.
So here are the basic steps for this:
In your Solution Explorer view right-click on the file, in this case “state.xml”, and view it’s Properties, make sure that the “Build Action” is set to “Embedded Resource”, optionally set the “Copy to Output Directory” to “Do not copy”.
Once this has done then the file can be loaded and copied into the required object using:
An important thing to remember is that the “Namespace” prefix to the file is the “Default namespace” as entered in the Application properties tab and not the namespace used in the referencing file.
You can reference the file, if it’s in a sub-folder by adding the folder just after the namespace, e.g.
mainMem.useNamedFile – stop the VM from creating a memory mapped file (on disk). MemTrimRate – Disable memory trimming. sched.mem.pshare.enable – Disables memory sharing across running VM’s. prefvmx.useRecommendedLockedMemSize – No idea, other than this WMWare KB article. prefvmx.minVmMemPct – Preallocate all RAM available to the VM at startup, reducing this value allows some swapping to occur.
It seems that this data can be configured on a global, for the current PC, basis. If the changes are applied to the c:\ProgramData\VMWare\VMWare Workstation\config.ini file.
And some additional settings can be added as well to further boost performance when the VM is in use.
priority.grabbed = "high"
priority.ungrabbed = "normal"
The grabbed setting can only be "high", or "normal".
The ungrabbed setting can have a value of "normal", "low", or "idle".
In my case this stopped notepad.exe from saving files smoothly, okay how many people use notepad still? The files did save but you had to click through a couple of Window’s dialogs saying that the file was running on the wrong version of Windows. Quite why the 64 bit of notepad was running this is beyond the level of investigation I put into this.
I tried to uninstall it using regsv32 but that also complained it was the wrong version. Right clicking on the file and examining the properties was of no help at all, so maybe it is corrupt? Looking at the ATL110.dll we see that that it has been signed by Microsoft, my version of ATL100.dll didn’t even offer up the tab! Should have taken a screen grab before I replaced it.
Trying to find similar issues, either via Google or Bing, offered up plenty of sites who would provide a copy – but without having any checksum to work with no way was I downloading them! Also no one seemed to provide any solution, maybe I can’t construct the correct query or I should have gone further into the results.
Next was to try and rollback the file, not an option as by the time I’d found the issue I’d helpfully cleared out, read reset, my system restore and windows backups so they were no use. Running the System File Checker (sfc.exe) showed that there were no problems with the Windows installation.
Okay so back to basics and try and figure it out, with vague recollection of my VC++ days (very vague and no fun) we find the DLL is part of the Active Template Library (the ATL in the file name) part of the C++ 2010 Redistributable package (the 100 in the file name).
First off I ran each installer in repair mode, no luck the error still persisted. The atl100.dll still wasn’t right. So I took the sledgehammer to it and deleted it. Then I ran each installer twice, first removing the package and then to re-install. I didn’t reboot in between removing and installing but it is probably advisable. Certainly once you have re-installed then a reboot would be good practice.
By design/default the indexing service isn’t enabled on Windows 2008, which is only a real issue if you use a server as a development platform. So to turn it on read the Microsoft support article KB954822. The service is now considered to a part of the Server Manager role.
This works on Windows 7, Windows Server 2012, but I’ve not tried on other platforms.
First off fire up a cmd prompt, with administrative privileges.
Then into this type the following: net user account_name *
This will prompt you for your new password, which will not be displayed, and then to verify it afterwards as well.