Open aholeton opened 1 year ago
AnyCPU too. It happened suddenly, I was work on AnyCPU a day ago, and today suddenly the designer only tried to read the dll under x64.
Edit: Weird, it disappear..
Similar issue here, but for me it's a FileLoadException, as if it's loading two different platforms between the Desktop and main app, but everything is x86 only in my project. It worked for like 30 minutes on day one, and has never worked since.
08:40:57.280 [Information] 0 Starting previewer process for '"C:\junk\Code\MegaMan\Engine\Engine.Avalonia.Desktop\bin\x86\Debug\net6.0\Engine.Avalonia.Desktop.dll"'
08:40:57.280 [Debug] 0 > dotnet.exe "exec --runtimeconfig \"C:\junk\Code\MegaMan\Engine\Engine.Avalonia.Desktop\bin\x86\Debug\net6.0\Engine.Avalonia.Desktop.runtimeconfig.json\" --depsfile \"C:\junk\Code\MegaMan\Engine\Engine.Avalonia.Desktop\bin\x86\Debug\net6.0\Engine.Avalonia.Desktop.deps.json\" \"C:\Users\Tesserex\.nuget\packages\avalonia\11.0.5\buildTransitive\\..\tools\netcoreapp2.0\designer\Avalonia.Designer.HostApp.dll\" --transport tcp-bson://127.0.0.1:50688/ \"C:\junk\Code\MegaMan\Engine\Engine.Avalonia.Desktop\bin\x86\Debug\net6.0\Engine.Avalonia.Desktop.dll\""
08:40:57.289 [Information] 40452 Started previewer process for '"C:\junk\Code\MegaMan\Engine\Engine.Avalonia.Desktop\bin\x86\Debug\net6.0\Engine.Avalonia.Desktop.dll"'. Waiting for connection to be initialized.
08:40:57.420 [Verbose] 40452 Started PreviewerProcess.ConnectionInitializedAsync()
08:40:57.421 [Information] 40452 Connection initialized
08:40:57.422 [Debug] 40452 => Sending ClientSupportedPixelFormatsMessage { Formats: [Bgra8888, Rgba8888] }
08:40:57.423 [Debug] 40452 => Sending ClientRenderInfoMessage { DpiX: 96, DpiY: 96 }
08:40:57.424 [Verbose] 40452 Finished PreviewerProcess.ConnectionInitializedAsync()
08:40:57.425 [Verbose] 40452 Finished PreviewerProcess.StartAsync()
08:40:57.426 [Debug] 40452 => Sending UpdateXamlMessage { Xaml: "<UserControl xmlns=\"https://git…", AssemblyPath: "C:\junk\Code\MegaMan\Engine\Eng…", XamlFileProjectPath: null }
08:40:57.427 [Verbose] Finished AvaloniaDesigner.StartProcessAsync()
08:40:57.449 [Error] 40452 <= "Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'Engine.Avalonia.Desktop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."
08:40:57.451 [Error] 40452 <= " at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)"
08:40:57.452 [Error] 40452 <= " at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)"
08:40:57.453 [Error] 40452 <= " at System.Reflection.Assembly.LoadFile(String path)"
08:40:57.454 [Error] 40452 <= " at Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.Main(String[] cmdline)"
08:40:57.455 [Error] 40452 <= " at Avalonia.Designer.HostApp.Program.Main(String[] args)"
08:40:59.684 [Information] Process exited
Previewer is using system-installed dotnet executable from system PATH. Make sure that your app can be started via dotnet exec bin/Debug/net6.0/YourApp.dll
Not planned currently. It will take a long time to add support and we don't see many people asking for it.
Side note: I don't think there is any reason to use PlatformTarget or Platforms properties when building .NET Core apps. It was useful in .NET Framework but not anymore. Please use runtime identifiers instead https://github.com/dotnet/sdk/issues/1553
Side note: I don't think there is any reason to use PlatformTarget or Platforms properties when building .NET Core apps. It was useful in .NET Framework but not anymore. Please use runtime identifiers instead dotnet/sdk#1553
I am not sure if it's true - in my case, my desktop project didn't build/start until I add the "Platforms" property (I had the "RuntimeIdentifiers" property set).
Describe the bug
When the application is built as an x86 application, the designer throws an error and the preview displays a "Process Exited" error message. Changing the application to a x64 application and rebuilding it, will cause the designer to correctly render the view.
To Reproduce
<PlatformTarget>x86</PlatformTarget>
to the csproj fileAvaloniaVS plugin version
11.1
Avalonia version
11.0
Visual Studio version
17.7
Relevant log output
Additional context
No response