Closed alan0428a closed 7 months ago
Try deleting all of your bin
/obj
directories, it seems that an unsigned copy of some dll is still there
Try deleting all of your
bin
/obj
directories, it seems that an unsigned copy of some dll is still there
I've deleted the folders, but the issue still exists.
It seems to me that the problem is here
\bin\Debug\netcoreapp3.1\AvaloniaApplication.dll
Then it is related to this issue https://github.com/AvaloniaUI/AvaloniaVS/issues/190
As far as I remember, when we specify the platform, this name is added to the path in the form of a folder. One temporary solution is to specify in PropertyGroup csproj
<AppendPlatformToOutputPath>false</AppendPlatformToOutputPath>
or like
<OutputPath>bin\$(Configuration\$(TargetFramework)\$(MSBuildProjectName)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
It seems to me that the problem is here
\bin\Debug\netcoreapp3.1\AvaloniaApplication.dll
Then it is related to this issue AvaloniaUI/AvaloniaVS#190
As far as I remember, when we specify the platform, this name is added to the path in the form of a folder. One temporary solution is to specify in PropertyGroup csproj
<AppendPlatformToOutputPath>false</AppendPlatformToOutputPath>
or like
<OutputPath>bin\$(Configuration\$(TargetFramework)\$(MSBuildProjectName)</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
Well, my original build output path doesn't append the platform. And I also follow your steps, but it doesn't work.
Same situation here, worked for about 2 days, have no solution.
Found some clue after 2 days work. The avalonia dll Avalonia.DesignerSupport.dll we got from nuget is targeted for AnyCpu, according to my test, only x86 targeted application can load my x86 assembly(myapp.dll) using Assembly.LoadFile(), when previewer routine Avalonia.DesignerSupport.dll try to load the dll, System.IO.FileLoadException raised.
Is there any solution to this issue? I am having also this issue regarding an x86 app.
There are no current plans to support this scenario. Not to mention "Target" and "PlatformTarget" properties by itself are deprecated and should not be used for .net core apps. For any modern app Runtime Identifier should be used.
Hello team,
I've created the "Avalonia MVVM Application" template project from visual studio. And I've updated Avalonia packages to v0.10.0-rc1. Then I set the project platform target to x86. The designer renders correctly for about 1 ~ 2 seconds then shows "Process Exited" without properly render.
If I switch platform target back to Any CPU, then everything works fine. Is this a bug?
Steps to reproduce the behavior:
Visual Studio Version: Microsoft Visual Studio Professional 2019 Version 16.8.3 OS: Windows 10 Enterprise Runtime: netcoreapp3.1
Below are the error output from Avalonia Diagnostics