Open llfab opened 2 months ago
Debugging the VS extension shows that when DirectML is referenced the project is not detected as valid executable project:
because the .IsExecutable is false:
This is not the case if DirectML is not referenced.
Double checking the same project with the Rider extension works both in Debug and Release, hence, with DirectML referenced and not referenced.
This works.
Not sure if you really need to check if the project IsExecutable()...
Added a sample app here: https://github.com/llfab/Samples/tree/main/FailedPreviewer
Works in Debug because DirectML nuget package is only referenced in Release.
The root cause problem is that the Properties list is empty for the exe project:
Therefore, the project is not detected as the executable project
Filed an issue here: https://github.com/microsoft/onnxruntime/issues/20574
Describe the bug
When I have integrated a reference to DirectML using![image](https://github.com/AvaloniaUI/AvaloniaVS/assets/31031996/a759c850-f4c0-4254-9040-22bd7f033d06)
<PackageReference Include="Microsoft.ML.OnnxRuntime.DirectML" Version="1.17.3" Condition="'$(Configuration)' != 'Debug'" />
the previewer fails with "No executable found".The Log is as follows:![image](https://github.com/AvaloniaUI/AvaloniaVS/assets/31031996/f2d3128a-eb62-41f8-8dc9-eef7f02dd8ba)
When I switch to Debug (where DirectML is deactivated), close the last xaml document and re-open the xaml document, the previewer works with the following output:![image](https://github.com/AvaloniaUI/AvaloniaVS/assets/31031996/9b185b86-6233-415d-bc0f-a66a186ad738)
This may be due to DirectML being Windows only. Potentially, that changes the Runtime Identifier or TargetPlatformIdentifier under the hood causing the previewer execution detection to fail.
To Reproduce
As above integrate DirectML, rebuild and re-open xaml file
AvaloniaVS plugin version
11.5
Avalonia version
11.0.10
Visual Studio version
17.9.6
Relevant log output
Additional context
No response