Archive

Posts Tagged ‘Fix’

Fix: Delphi error MSBuildToolsPath is not specified for the ToolsVersion …

This is my answer at:

http://stackoverflow.com/questions/32936544/delphi-10-seattle-trial-fails-to-compile-anything-gives-an-msbuild-error

for the issue of Delphi showing on build the error

MSBuildToolsPath is not specified for the ToolsVersion “12.0” defined at “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0”, or the value specified evaluated to the empty string

note that in my case it was also showing underlined unit names in the code editor at uses clause with “Cannot resolve unit name xx”


It is a known issue, documented here: https://community.embarcadero.com/article/technical-articles/16202-msbuildtoolspath-is-not-specified-for-the-toolsversion

This error is caused by incorrect values in the registry. On a 32 OS, run regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild. On a 64 bit OS, run regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild. First, backup this registry key by selecting File | Export. Next, look at the numbers below the ToolsVersions key. Delete any number not found at the MSBuild level. … There is anecdotal evidence to suggest this registry key imbalance is caused by uninstalling some versions of Visual Studio, but it has not been confirmed at this time.

Since I’ve been installing/uninstalling various Visual Studio versions (including previews), guess it has indeed been caused by that

Error “A default tools version “2.0” was specified, but its definition could not be found.” may appear then if you deleted the 2.0 key following the 1st article’s advice. Solution for that one is to edit each value under MSBuild key in the registry locations mentioned for x32 and x64 and change DefaultToolsVersion to 14.0 or other highest MSBuild tools version that is installed

Στιγμιότυπο οθόνης (504)

image

Note that on x64 machine you need to fix these two issues for both x32 and x64 registry locations, since the IDE is 32-bit process and if you fix x64 location only it will fail internally, underlining all Standard units at uses clause in your source code at uses clause and showing “Cannot resolve unit name xx”

Στιγμιότυπο οθόνης (506)

image

Also it may be useful to install this: https://www.microsoft.com/en-us/download/confirmation.aspx?id=48159

This may also be useful to know (copying from https://msdn.microsoft.com/en-us/library/bb383985.aspx):

Order of Precedence

The order of precedence, from highest to lowest, used to determine the ToolsVersion is: The ToolsVersion attribute on the MSBuild task used to build the project, if any.

The /toolsversion (or /tv) switch that’s used in the msbuild.exe command, if any.

If the environment variable MSBUILDTREATALLTOOLSVERSIONSASCURRENT is set, then use the current ToolsVersion.

If the environment variable MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT is set and the ToolsVersion defined in the project file is greater than the current ToolsVersion, use the current ToolsVersion.

If the environment variable MSBUILDLEGACYDEFAULTTOOLSVERSION is set, or if ToolsVersion is not set, then the following steps are used:

The ToolsVersion attribute of the Project element of the project file. If this attribute doesn’t exist, it is assumed to be the current version.

The default tools version in the MSBuild.exe.config file.

The default tools version in the registry. For more information, see Standard and Custom Toolset Configurations.

If the environment variable MSBUILDLEGACYDEFAULTTOOLSVERSION is not set, then the following steps are used:

If the environment variable MSBUILDDEFAULTTOOLSVERSION is set to a ToolsVersion that exists, use it.

If DefaultOverrideToolsVersion is set in MSBuild.exe.config, use it.

If DefaultOverrideToolsVersion is set in the registry, use it.

Otherwise, use the current ToolsVersion.

Categories: Posts Tags: , , , ,

Fix: Windows Phone update error 80072f8f

I was setting up a new Lumia phone (with Windows Phone 8.1) and neither phone update, nor the (Here) maps downloads were working. When trying Settings / Phone Update, it was showing error 80072f8f and was pointing to http://www.windowsphone.com/en-us/how-to/wp8/basics/solutions-to-update-issues to read more info. However that error code wasn’t listed there. Wonder if there is any page listing all the possible error codes. I find it silly if they have error codes that aren’t documented anywhere officially.

I looked it up on Google (sorry Bing!) and found http://www.techanges.com/fix-windows-phone-error-80072f8f/, which was saying this was related to time/date discrepancy between the phone and the windows update server. Obviously the maps also get their updates via the same system, although the maps update was showing the misleading message that it couldn’t connect to the maps library at that moment.

Although I had set correct timezone, it had wrong date/time, it was set to autoupdate date/time, but forgot that it had no SIM card in it yet. Obviously it doesn’t get these updates from a time server, but from the mobile phone connection provider. Hope Windows 10 phone fixes that and gets the date/time from time server like the one from NIST or from Microsoft that Windows uses on the desktop.

Fix: Keyboard shortcuts Ctrl-C, Ctrl-V, Ctrl-Z, Ctrl-A not working in Word

For some time now, I was getting very annoyed while copy-pasting content from other software into Microsoft Word 2010. I would press CTRL+C at some other software and then would press ALT+TAB to go into an open Word document and press CTRL+V to paste, but it would not. So I had to move my fingers far away to SHIFT+INSERT to paste.

Today had enough so after some Google search on it, found the best fix by Moshe Eschel at:

http://superuser.com/questions/215595/keyboard-shortcuts-such-as-ctrl-c-ctrl-v-and-ctrl-z-not-working-in-word-2010-on

To "restore" word to the way you remember, you need to go to, File->Options->Customize Ribbon On the bottom there is a label "Keyboard Shortcuts" and a button "Customize…" – click it

On the Categories box, scroll until you find "All Commands" and select it. Now, from the right box select the following Command: EditCopy Look at the "Current Keys" Box you will see "Ctrl+Insert" which is the NEW mapping now put your cursor in the "Press new shortcut key" and Press Ctrl+C, a button on the bottom named Assign will light up, and you click on it.

Do the same for all the shortcuts you like, such as EditPaste, EditUndo, EditRedo, EditCut, SelectAll etc.

Wonder why Microsoft didn’t add both the old and new shortcuts there, since it seems the dialog does support it. What a huge oversight, having Microsoft Word try to impose a shortcut from Macs (as it seems) to longtime Windows users (especially when other software the user works with use other set of shortcuts for copy-paste).

Moreover, the option to reassign the shortcut keys was very deeply hidden, hard for the average user to find it by themselves (couldn’t find it either and I don’t consider myself an average user).

Even more pathetic was the default shortcut key for Select All (usually Ctrl+A). It was Ctrl+5 and Ctrl+Clear (Numeric keyboard 5). What the heck Microsoft?

Categories: Posts Tags: , , , , , , ,

HowTo: Reinstall a new Windows 10 build after reverting to older build

At http://www.askvg.com/fix-windows-10-insider-preview-build-10240-not-appearing-on-windows-update/ it writes:

NOTE:

If you previously had a new Windows 10 build installed in your computer and then reverted back to an older build, you’ll lose access to the new build and it’ll no longer be offered as an upgrade option. Deleting the number for that build from the list at HKEY_LOCAL_MACHINE\SOFTWARE\
  Microsoft\WindowsSelfHost\Applicability\RecoveredFrom key in Registry Editor seems to restore the ability to upgrade. Thanks to our reader "thedicemaster" for this info…

This is useful to know and unfortunately it means that some users may get stuck to an older Windows 10 version. Unless Microsoft has it set like that so that they’ll get automatically the next Windows build (ship the one they were trying to install hoping it fixed the issue they were having). Of course this will work if Microsoft keeps on pushing new builds often, not if they end up updating the OS build once a year or more rare in the future as Windows 10 matures.

To open Registry Editor you can click the Search icon (next to the Windows Start menu icon) at the Windows 10 Taskbar and write RegEdit.exe, then it should offer you a result that says “Run command” that you can click to launch it.

Screenshot 2015-11-23 13.44.22

After that, expand the respective tree nodes (that is HKEY_LOCAL_MACHINE, then SOFTWARE, then Microsoft, then Windows, then WindowsSelfHost) from the side pane and right click and delete the “RecoveredFrom” node.

Then try Windows Update again from State menu / Settings / Update & Security and tell it again to check for updates. In case it still doesn’t offer the updates, wait for 1-2 days and try again.

Fix: VSIX installer error – SignatureDescription could not be created

This is my answer at:

http://stackoverflow.com/questions/31552082/vsix-installer-signaturedescription-could-not-be-created-for-the-signature-algo/

to the question on why some extensions fail to install at RC (Release Candidate) versions of Visual Studio 2015, showing error “SignatureDescription could not be created for the signature algorithm supplied”.

Not sure if Microsoft fixed this on purpose or by accident, but this is very useful for people who don’t have the time (and courage) to uninstall the RC version and reinstall the final one and all extensions they were using.

Speaking of reinstalling everything by hand, it would be nice if you could export an XML document containing a list of installed Visual Studio extensions and then be able to reimport it to install them all at an other Visual Studio installation (should also be able to edit that XML document to remove some if you wish, or at export see a checkbox list to deselect ones you don’t want exported in the resulting list).

To keep it short, the answer is:

Try installing http://go.microsoft.com/fwlink/?LinkID=619615 (found from http://blogs.msdn.com/b/somasegar/archive/2015/07/29/building-apps-for-windows-10-with-visual-studio-2015.aspx)

I used Custom installation option and selected everything. It upgraded Visual Studio 2015 Enterprise RC to Visual Studio 2015 Enterprise automatically and now those extensions that had started recently to not install, are installing fine. That way you’ll avoid the trouble of reinstalling everything.

Note that after installation finishes it shows a button to Launch Visual Studio, which will launch the Enterprise edition (or Professional in the case I guess one had Professional RC installed). However your Windows taskbar shortcuts for Visual Studio 2015 and Blend 2015 will be now broken and you have to fix them by right-clicking them and selecting Properties, then setting them to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe and C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\blend.exe respectively, assuming you use an 64-bit OS – else remove the “ (x86)” part – and had installed Visual Studio on C: disk. You may wish to also add those links to the Start menu, under the respective folder (named Visual Studio 2015) if you also miss them from there.

Fix: Cleanup after upgrading from Windows 10 technical preview

I recently replaced the internal hard disk of my old Lenovo S10-3t Tablet PC with an SSD and installed Windows 10 technical preview, but recently realized the hard disk had almost run out of space.

Trying to figure out why, I realized that upgrading from the Windows 10 technical preview version to the final Windows 10 version (this happened automatically via Windows Update), left back a “Windows.old” folder at the hard disk root taking up 3.14GB, as if I had upgraded from Windows 7 or Windows 8 via Microsoft’s free OS upgrade offer (that offer is valid for a year btw, so make sure you don’t miss it).

You’ll notice the Disk Cleanup tool (you can find it by pressing the search icon (magnifying glass) at the Windows taskbar and writing “cleanup”, temporary Windows installation files are also mentioned as taking up an extra 3.22 GB, but there is some double counting there, since I ended up with 5.30GB free after cleanup, from around 200MB I had left on the hard disk before I run Disk Cleanup (note that I already had run CCleaner, but I hadn’t selected the option there to cleanup files from previous Windows installation, since I didn’t expect to have any such).

image

Note, that Disk Cleanup will even warn you that you won’t be able to restore the machine back to the previous Windows version (aka the technical preview), but why should you care to do so anyway?

image

Update:

To make some extra disk space and since I use a fast SSD, I had set Windows to compress the hard disk contents (one can set this option by right clicking the disk and selecting Properties), so probably there is no double-counting by Disk Cleanup dialog, it just must be showing the uncompressed space those things it cleans take up. So it could indeed be 3.14GB + 3.22GB of useless space taken up by updating Windows technical preview to the official Windows 10 release via the normal automatic Windows Update process, which is quite a lot.

Microsoft should show some warning to the user about all this extra space taken up (right away after updating and offer to remind them in the future again if they opt to keep the files till they’re confident the latest version works OK) and offer them the choice of cleaning this up

Another interesting thing I notice is that although I had selected the option to compress the drive and it had applied respective attribute to all files (showing a progress dialog), it didn’t remember that setting (not sure if I had set it before the upgrade), so probably it wasn’t compressing newer files.

image

Categories: Posts Tags: , , , , ,

Fix: Enable Silverlight & other NPAPI plugins at Chrome web browser

Below I’m elaborating a bit more my related tweet:

 

Showing below the easiest of the suggested solutions that I found in this page

 

At Chrome’s address bar you type:

chrome://flags/#enable-npapi

and press the ENTER key on the keyboard

image

Then you should see a page Chrome generates to change some of its internal settings. When NPAPI is disabled the respective entry should appear in grey background like below.

image

Press Enable at the setting “Enable NPAPI Mac, Windows”

After enabling NPAPI the page should look like this (with the respective setting in white background):

image

After enabling the NPAPI option, close the Chrome webbrowser and reopen it.

 

You can then test if Silverlight is working by visiting for example

http://studio.clipflair.net (ClipFlair Studio Foreign language learning application) or http://zoomicon.com/amnesiaofwho (Amnesia of Who memory game)

 

Btw, Chrome also is available as a Windows 8 app, in which mode it probably doesn’t support plugins at all, so if you’re running it on Windows 8 and see it always full screen inside a scrolling container, use the Chrome menu from the top-right of its window and select the option there to switch to the desktop version of Chrome instead (should say "Relaunch Chrome in desktop mode")

%d bloggers like this: