lxn / walk

A Windows GUI toolkit for the Go Programming Language
Other
6.78k stars 885 forks source link

Example from README.md doesn't work on Windows 10 #773

Open bapi23 opened 3 years ago

bapi23 commented 3 years ago

I was trying to build my old lxn application and looks like now I can't even build the simplest example from the README.md I'm receiving such an error on windows 10 while trying to run it from the visual code terminal:


Program 'storage_manager.exe' failed to run at line:1 char:1
+ .\storage_manager.exe
+ ~~~~~~~~~~~~~~~~~~~~~.
At line:1 char:1
+ .\storage_manager.exe
+ ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

Should I change somehow manifest file? I didn't change one from the example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="SomeFunkyNameHere" type="win32"/>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
        </dependentAssembly>
    </dependency>
    <application xmlns="urn:schemas-microsoft-com:asm.v3">
        <windowsSettings>
            <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
            <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True</dpiAware>
        </windowsSettings>
    </application>
</assembly>

While trying to run it from explorator I'm getting "This app can't run on your PC" error

bapi23 commented 3 years ago

If someone has a similar issue - it was related to the old 32-bit version of go which I installed a long time ago. Some of the cache files were still there. You need to remove every folder mentioned in go env and reinstall 64 bit go version.