Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to build the library on Windows 7 #89

Open
lukaszgo1 opened this issue Feb 16, 2022 · 3 comments
Open

Impossible to build the library on Windows 7 #89

lukaszgo1 opened this issue Feb 16, 2022 · 3 comments

Comments

@lukaszgo1
Copy link

After cloning the repository, installing missing NuGet packages and executing: msbuild UIAutomation.sln /p:Configuration=Release,Platform=x86 I got:

Microsoft (R) Build Engine 16.11.2+f32259642 dla platformy .NET Framework
Copyright (C) Microsoft Corporation. Wszelkie prawa zastrzeżone.

Projekty w tym rozwiązaniu są kompilowane pojedynczo. Aby umożliwić kompilację r
ównoległą, dodaj przełącznik "-m".
Kompilacja rozpoczęła się 2022-02-16 20:52:06.
Projekt "c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAutomation\UIAutomatio
n.sln" w węźle 1 (domyślne elementy docelowe).
ValidateSolutionConfiguration:
  Tworzenie konfiguracji rozwiązania "Release|x86".
Projekt "c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAutomation\UIAutomatio
n.sln" (1) kompiluje "c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAutomatio
n\Microsoft.UI.UIAutomation\Microsoft.UI.UIAutomation.vcxproj" (2) w węźle 1 (d
omyślne elementy docelowe).
InitializeBuildStatus:
  Modyfikowanie "Release\Microsof.7D645239.tlog\unsuccessfulbuild".
Midl:
  C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\midl.exe /metadat
  a_dir "C:\Program Files (x86)\Windows Kits\10\References\10.0.22000.0\Windows
  .Foundation.FoundationContract\4.0.0.0" /winrt /W1 /nologo /char signed /env
  win32 /winmd "Release\Microsoft.UI.UIAutomation.winmd" /h "Microsoft.UI.UIAut
  omation_h.h" /tlb "Release\Microsoft.UI.UIAutomation.tlb" /target "NT60" /nom
  idl /struct_by_ref Microsoft.UI.UIAutomation.idl
  MIDLRT Processing .\Microsoft.UI.UIAutomation.idl
  Microsoft.UI.UIAutomation.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \winrt\Windows.Foundation.idl
  Windows.Foundation.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \winrt\inspectable.idl
  inspectable.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \shared\wtypes.idl
  wtypes.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \shared\wtypesbase.idl
  wtypesbase.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \shared\basetsd.h
  basetsd.h
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \shared\guiddef.h
  guiddef.h
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \um\unknwn.idl
  unknwn.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \winrt\hstring.idl
  hstring.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \winrt\AsyncInfo.idl
  AsyncInfo.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \winrt\EventToken.idl
  EventToken.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \winrt\windowscontracts.idl
  windowscontracts.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \winrt\IVectorChangedEventArgs.idl
  IVectorChangedEventArgs.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \um\oaidl.idl
  oaidl.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \um\objidl.idl
  objidl.idl
  MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
  \winrt\Windows.UI.UIAutomation.idl
  Windows.UI.UIAutomation.idl
.\Microsoft.UI.UIAutomation.idl(9): error MIDL2025: syntax error : expecting .
near "runtimeclass" [c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAutomation
\Microsoft.UI.UIAutomation\Microsoft.UI.UIAutomation.vcxproj]
.\Microsoft.UI.UIAutomation.idl(9): error MIDL2009: undefined symbol : unsealed
.AutomationRemoteObject [c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAutoma
tion\Microsoft.UI.UIAutomation\Microsoft.UI.UIAutomation.vcxproj]
.\Microsoft.UI.UIAutomation.idl(15): error MIDL2025: syntax error : expecting t
he keyword "interface" near "void" [c:\Users\Lukasz\Microsoft-UI-UIAutomation\s
rc\UIAutomation\Microsoft.UI.UIAutomation\Microsoft.UI.UIAutomation.vcxproj]
.\Microsoft.UI.UIAutomation.idl(15): error MIDL2026: cannot recover from earlie
r syntax errors; aborting compilation [c:\Users\Lukasz\Microsoft-UI-UIAutomatio
n\src\UIAutomation\Microsoft.UI.UIAutomation\Microsoft.UI.UIAutomation.vcxproj]
Kompilowanie projektu "c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAutomati
on\Microsoft.UI.UIAutomation\Microsoft.UI.UIAutomation.vcxproj" wykonane (domyś
lne elementy docelowe) - NIEPOWODZENIE.

Kompilowanie projektu "c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAutomati
on\UIAutomation.sln" wykonane (domyślne elementy docelowe) - NIEPOWODZENIE.


Kompilacja NIE POWIODŁA SIĘ.

"c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAutomation\UIAutomation.sln" (
domyślny element docelowy) (1)->
"c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAutomation\Microsoft.UI.UIAuto
mation\Microsoft.UI.UIAutomation.vcxproj" (domyślny element docelowy) (2)->
(element docelowy Midl) ->
  .\Microsoft.UI.UIAutomation.idl(9): error MIDL2025: syntax error : expecting
. near "runtimeclass" [c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAutomati
on\Microsoft.UI.UIAutomation\Microsoft.UI.UIAutomation.vcxproj]
  .\Microsoft.UI.UIAutomation.idl(9): error MIDL2009: undefined symbol : unseal
ed.AutomationRemoteObject [c:\Users\Lukasz\Microsoft-UI-UIAutomation\src\UIAuto
mation\Microsoft.UI.UIAutomation\Microsoft.UI.UIAutomation.vcxproj]
  .\Microsoft.UI.UIAutomation.idl(15): error MIDL2025: syntax error : expecting
 the keyword "interface" near "void" [c:\Users\Lukasz\Microsoft-UI-UIAutomation
\src\UIAutomation\Microsoft.UI.UIAutomation\Microsoft.UI.UIAutomation.vcxproj]
  .\Microsoft.UI.UIAutomation.idl(15): error MIDL2026: cannot recover from earl
ier syntax errors; aborting compilation [c:\Users\Lukasz\Microsoft-UI-UIAutomat
ion\src\UIAutomation\Microsoft.UI.UIAutomation\Microsoft.UI.UIAutomation.vcxpro
j]

    Ostrzeżenia: 0
    Liczba błędów: 4

Czas, który upłynął: 00:00:02.18

I do not really understand why the version of Windows in use affects the result of the midl compiler. If this is impossible to fix or it is not worth fixing given Windows 7 age I would appreciate a clear note in the readme as to what versions of Windows are supported when building.

@beweedon
Copy link
Contributor

Hmm. It looks like it's having trouble parsing MIDL 3 syntax. Since you're using the MIDL from the SDK, I'm not sure why the OS version would affect this. It's especially weird since the output specifies it's running MIDLRT, which definitely should support MIDL 3. Just to check, can you post the version printed from running midl /??

I've give this some more thought.

@lukaszgo1
Copy link
Author

Microsoft (R) 32b/64b MIDL Compiler Version 8.01.0626
Copyright (c) Microsoft Corporation. All rights reserved.

Thanks for looking into this @beweedon!

@beweedon
Copy link
Contributor

beweedon commented Mar 2, 2022

Just so you know this isn't being ignored:

I've been thinking about this and am genuinely not sure why this is happening on Windows 7. If possible I'd recommend building on Windows 10 instead. If this isn't possible I can see if I can get a hold of a Windows 7 test device and work on a fix, but I'm not sure when I'd have the time to do that.

I'll update the README in a bit pointing to this bug and talking about known issues building on Windows 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants