FlaUI / FlaUInspect

Inspect tool to inspect UIs from an automation perspective
MIT License
410 stars 97 forks source link

Can't build FlaUInspect #7

Closed embronne closed 6 years ago

embronne commented 6 years ago

Hi,

Sorry if I'm missing something obvious, but I can't build FlaUInspect.

The errors are:

Severity Code Description Project File Line Suppression State
Error CS1003 Syntax error, ',' expected FlaUInspect E:\projects\Misc\FlaUInspect\src\FlaUInspect\ViewModels\ElementViewModel.cs 77 Active
Error CS0206 A property or indexer may not be passed as an out or ref parameter FlaUInspect E:\projects\Misc\FlaUInspect\src\FlaUInspect\ViewModels\ElementViewModel.cs 77 Active
Error CS0103 The name 'value' does not exist in the current context FlaUInspect E:\projects\Misc\FlaUInspect\src\FlaUInspect\ViewModels\ElementViewModel.cs 77 Active
Error CS0103 The name 'value' does not exist in the current context FlaUInspect E:\projects\Misc\FlaUInspect\src\FlaUInspect\ViewModels\ElementViewModel.cs 77 Active

The offending line of code is:

public ControlType ControlType => AutomationElement.Properties.ControlType.TryGetValue(out ControlType value) ? value : ControlType.Custom;

Specifically, it's about out ControlType value.

I haven't been programming in C# for some time, so I'm not up-to-date with the syntax, and am only superficially familiar with the =>-notation. So again, sorry if I'm missing something obvious.

Can you help?

Thanks, regards, Miel.

MossFrog commented 6 years ago

I seem to have the same issue, did you find a solution?

Roemer commented 6 years ago

Are you using Visual Studio 2017?

embronne commented 6 years ago

No, 2015.

Roemer commented 6 years ago

You need VS 2017 to build it.

embronne commented 6 years ago

OK, that works.