AvaloniaVS icon indicating copy to clipboard operation
AvaloniaVS copied to clipboard

Xaml designer not working when targeting net472

Open georgiuk opened this issue 5 years ago • 11 comments

Hello, I have a project (executable) that targets net472 . The designer does not work. The message on the designer surface is "No Executable". "Reference the library from an executable or wait for the solution to finish loading." On the Avalonia Diagnostics Output I get 17:59:17.481 [Information] 0 Stopping previewer process 17:59:28.020 [Error] No executable found

I use version 0.9.1 and running the app works without a problem.

georgiuk avatar Dec 21 '19 16:12 georgiuk

I saw in AvaloniaDesigner.xaml.cs there are some checks that permit only .NET Core assemblies. Is this a limitation for .NET framework assemblies?

georgiuk avatar Dec 21 '19 21:12 georgiuk

Transferred to AvaloniaVS repository.

Yeah, at the moment only netcore targets are supported. You might want to try dual targeting your application if possible.

However since https://github.com/AvaloniaUI/AvaloniaVS/pull/120 has been merged, maybe we can lift this restriction.

grokys avatar Dec 21 '19 21:12 grokys

Not possible to dual target. We migrate our code to Core but we are not there yet. Anyway I will try to design in a dummy project and transfer the xaml to the actual project.

georgiuk avatar Dec 21 '19 21:12 georgiuk

I'll take a look into lifting the restriction on net framework projects, will probably after xmas though.

grokys avatar Dec 21 '19 21:12 grokys

OK. Great.

georgiuk avatar Dec 22 '19 11:12 georgiuk

I'm having the same issue trying to target .NET Core 3.1, i'm using FSharp over CSharp, will that have anything to do with it?

bradder555 avatar Dec 31 '19 07:12 bradder555

@bradder555 I just did some research for another issue and found the reason why F# is not supported. SolutionsService.cs:71 takes only files with an extension .csproj. You would have to do some tests but in best case it could be fixed by checking for .csproj or .fsproj.

daniel-lerch avatar Jan 05 '21 15:01 daniel-lerch

@grokys

I'll take a look into lifting the restriction on net framework projects, will probably after xmas though.

xmas 2019 is over already... would you mind to take a look?

JeReT avatar Mar 10 '21 13:03 JeReT

I'm stuck at home during a pandemic with a 17-month old child whose nursery is closed while both I and her mum are supposed to be doing 2 full-time jobs, so unlikely to happen.

grokys avatar Mar 10 '21 14:03 grokys

Hi there! I think I'm having the same issue. Is there a way to workaround this or are there any plans to lift the restriction?

dfernandezramos avatar Mar 15 '22 16:03 dfernandezramos

Same error with .net 6 app, weird...

jjxtra avatar Apr 09 '22 16:04 jjxtra