Troubleshooting common issues with XAML Spy. Contact us when your issue is not listed.
Issues with the XAML Spy installer.
Installer error 2885
The installer exits with error 2885. This error indicates you are trying to install XAML Spy on an unsupported operating system. You need Windows Vista, 7 or 8. If you are installing XAML Spy on a Windows Server, you need to have at least Windows Server 2008 R2.
Older operating systems (including Windows XP) are not supported.
Unable to start the XamlSpyService
The XAML Spy installer fails with a message that it is unable to start the XamlSpyService. Additional details about the error can be found in the Event Viewer application log. There are various reasons why the service may fail to start. Check the options below.
Error: incorrect file permissions
The XamlSpyService logs on as the NETWORK SERVICE account, and it is most likely this account does not have the appropiate file access permissions. Be aware that service permission issues are unrelated to the current interactive user. Please verify NETWORK SERVICE has the following file permissions:
- Read access to C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
- Read access to C:\Program Files (x86)\First Floor Software\XAML Spy
- Read/write/modify access to C:\ProgramData\First Floor Software\XAML Spy. When the folder doesn’t exist, you can create it manually and assign the permissions to the NETWORK SERVICE account.
Error: The requested address is not valid in its context
The Event Viewer displays a socket error with message The requested address is not valid in its context. The XAML Spy Services tries to bind to an IP address that is not valid for your machine. This is most likely caused by an invalid XAML Spy configuration file from a previous installation. You’ll need to manually remove the config file and re-try the installer. The XamlSpy.config file is located at C:\ProgramData\First Floor Software\XAML Spy, that is ProgramData, not Program Files(!).
Please contact us if above doesn’t resolve the issue. If possible include the error details found in the Event Viewer application log.
XAML Spy Setup Wizard ended prematurely
The reasons for this error may vary. To see the actual error you’ll need to run the setup using msiexec and with logging enabled. Follow the steps below:
Open a command prompt and navigate to the folder containing the XamlSpy.msi.
Run the installer like so:
msiexec /i [msi file] /L*V [log file]
([msi file] is the XamlSpy.msi and [log file] is the name of the log file to create)
Open the log file in a text editor and search for errors.
Possible causes of premature setup exits.
ExecFirewallExceptions: Error 0x800706d9. The Windows Firewall service is disabled, the setup is unable to set a firewall exception.
Resolution: either start the Windows Firewall service, or select the option in the XAML Spy setup wizard to skip configuring the firewall.
Troubleshooting connectivity issues.
The service does not seem to be running
This error occurs when launching XAML Spy and the XAML Spy service is not running. Either this happens because the XAML Spy service has been stopped, or has not started yet. The XAML Spy service is configured to run when the OS is starting, but does so in a delayed manner to ensure the OS is booted as fast as possible. It may take a couple of minutes after the OS has booted, for delayed started services to actually start.
Resolution: either wait for the XAML Spy service to start when you just rebooted your machine or manually start the service by navigating to the XAML Spy service settings (settings > xaml spy service) and selecting the restart service button.
An attempt was made to access a socket in a way forbidden by its access permissions
The firewall is actively blocking the connection when connecting to a remote address that is not localhost.
Resolution: check whether the firewall allows inbound connections that match the XAML Spy service settings. For more information about configuring the firewall, see the remote debugging guide.
You are trying to connect to a remote machine that does not exist.
Resolution: verify the XAML Spy service settings (settings > xaml spy service) and use the correct XAML Spy service remote address and port.
You are trying to connect a Windows Phone 8 app to localhost.
Resolution: Windows Phone 8 apps running in a Windows Phone 8 emulator must connect to a public (that is a non-localhost) address. Remote debugging needs to be enabled, and you need to connect to a public remote address.
You are trying to connect a sandboxed Silverlight app to a port outside the range of 4502-4534.
Resolution: connect to a port inside the 4502-4534 range.
You are trying to connect a sandboxed Silverlight app to a port inside the range of 4502-4534, but the required policy server is not running.
Resolution: make sure the XAML Spy policy server is up and running, check the XAML Spy service settings (settings > xaml spy service). You’ll need to restart your Silverlight app to connect.
No connection could be made because the target machine actively refused it
This error indicates that XAML Spy found a host at the remote address, but is unable to connect to the remote port.
You are trying to connect to the wrong machine
Resolution: verify whether your remote address is correct in the XAML Spy service settings (settings > xaml spy service).
The XAML Spy service is not listening on the specified remote address and/or port.
Resolution: verify whether your remote address and port settings are correct in the XAML Spy service settings (settings > xaml spy service)
Already connected, or busy connecting
An attempt to connect to the XAML Spy service is already in progress. This message occurs when you manually select the reconnect button. When connecting to the XAML Spy service takes a long time, this usually indicates that the connection attempt will eventually time out.
Resolution: check the suggestions at The connected party did not properly respond after a period of time.
The connected party did not properly respond after a period of time
It may take at least 10 seconds up to a couple of minutes for this time out error to occur. The underlying network is unable to reach the remote host and a timeout error (socket error 10060) occurs.
A Windows Store app displays exception from HRESULT: 0x8007274C. The Store app is not allowed to connect to the local network loopback, a requirement for XAML Spy.
Resolution 1: open the Windows Store app project properties, navigate to Debug (or the active configuration) and make sure the option Allow local network loopback is checked.
Resolution 2: if Allow local network loopback is checked and XAML Spy still doesn’t connect, you might be dealing with an issue that requires you to reset the loopback connectivity for all apps. See this blogpost for more details.
A Windows Phone app running in a Windows Phone 8 emulator is restricted from accessing the local machine. This may be due to network restrictions, enforced by IPSec. The emulator is not joined to the domain, and is not allowed to connect to the trusted, domain-joined local machine.
Resolution: Do not use the Windows Phone 8 emulators, run your app in one of the Windows Phone 8.1 emulators. WP81 emulator no longer register their own IP address and do not require remote debugging (learn more).
The IP address of your machine does not match the configured IP address of XAML Spy.
Resolution: Manually remove the XAML Spy config to reset the XAML Spy configuration. The XamlSpy.config file is located at C:\ProgramData\First Floor Software\XAML Spy, that is ProgramData, not Program Files(!).
See also the suggestions at An attempt was made to access a socket in a way forbidden by its access permissions.
A socket operation encountered a dead network
This error occurs when running a Windows Phone app in a Windows Phone 7.x emulator where you try to connect to localhost (127.0.0.1).
Resolution: ensure the XAML Spy service is listening on a public facing IP address and change the connection settings so that the app connects to this address.
Connecting to remote host requires capability privateNetworkClientServer
You are trying to connect a Windows Store app to a public facing IP address, which requires the capability privateNetworkClientServer.
Resolution: enable the capability privateNetworkClientServer for your app. Open Package.appxmanifest in Visual Studio, select the Capabilities tab and check the option Private Networks (Client & Server).
This error does not occur when connecting Windows Store apps to localhost.
Either no or an invalid password has been provided. A valid password is required in order to connect to the XAML Spy service. You can lookup the password in the XAML Spy service settings (settings > xaml spy service).
Visual Studio related issues.
Environment variable ‘XamlSpyInstallPath’ not set
Selecting the context menu option Enable XAML Spy for your project, shows the following warning message in the XAML Spy Power Tools output pane: WARNING: environment variable ‘XamlSpyInstallPath’ not set. Is XAML Spy installed?
The XamlSpyInstallPath environment variable is not set, which causes the XAML Spy targets import condition to evaluate to false. XAML Spy will be not enabled. This warning occurs when XAML Spy is not installed (properly), or an older version of XAML Spy is installed.
Resolution: make sure you have installed XAML Spy 1.2 or higher.
Windows Store unit tests fail when XAML Spy enabled
With XAML Spy integration enabled for a Windows Store app, running unit tests in the Visual Studio Test Explorer will fail. In Visual Studio 2012 the following error occurs: Failed to activate Windows Store app unit test executor. Error: The remote procedure call failed. In Visual Studio 2013 a System.AccessViolationException (Attempted to read or write protected memory) is thrown.
The Windows Store unit test runner doesn’t correctly handle custom types in XAML. XAML Spy does insert a number of custom attached dependency properties to all XAML resources. A related issue is reported on StackOverflow.
Resolution: disable XAML Spy integration before running Windows Store unit tests.
WPF build error ‘Cannot resolve dependency to XamlSpy.WPF4’
When building a WPF project the following build error occurs:
error MC1000: Unknown build error, ‘Cannot resolve dependency to assembly ‘XamlSpy.WPF4, Version=184.108.40.206, Culture=neutral, PublicKeyToken=2d21ec3cd074c59a’ because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.'
The build error occurs when XAML Spy is enabled for a class library, but not for the main app project referencing this class library project.
Resolution: enable XAML Spy for the main app project as well.
A Windows Store app suddenly disappears from XAML Spy
The Windows 8 operation system suspends Windows Store apps automatically when they are no longer visible and active. A suspended app loses its connection with XAML Spy.
Resolution: either debug your app with Visual Studio or keep your app visible (on a 2nd monitor) to prevent suspension.
Windows Store WebView control does not respond
The WebView control in Windows Store 8.1 apps no longer responds to mouse moves and clicks when XAML Spy is enabled for the app. The overlay popup that XAML Spy creates to render visual cues, prevents the WebView control from receiving mouse events.
Workaround: you can toggle the visibility of all XAML Spy visual cues by pressing CTRL-Shift-X. This closes the overlay popup and enables mouse interaction with the WebView control. Press CTRL-Shift-X again to show the popup.