Open dam5s opened 4 years ago
The plan was to update this after .net core 3 RTM is released. I'm open to a PR in a branch in the meantime, however.
Awesome thanks!
By the way, this error message is the MS XAML compiler bug. It is going to throw error that F# is not supported, but on the way to do so this error occurs.
looking at the network for this project, I found this branch which appears to add .NET Core 3 support. The branch is listed as testing, so I don't know how complete it is. Assuming it isn't yet complete, it appears to at least be a good starting point.
https://github.com/amazingant/FsXaml/tree/net-core-3-testing
Came here looking for something else and noticed @TheJayMann had linked my test branch. It's been ages since I touched that branch, so I'm not sure how well I had it working -- but I did have a separate repository that successfully runs a ported .NET Framework 4.5 application.
@ReedCopsey: I can pass along my working code if you want to dig around at it, but due to typical corporate restrictions, I'm not able to share my changes in a PR.
I'd definitely be curious to see what you did - though I'm happy to poke around your repo, as well. Right now, I don't have the bandwidth to do this port (even though I do want to make it happen at some point), but am hoping I can work on it "soonish"
Stripped out all of my compiled binaries and left out the sample application I mentioned (internal application from work), and put what was left here: https://github.com/amazingant/FsXamlAgain
What's the current progress on this? @dam5s
I took the project files and other changes from @amazingant 's repo that he linked above, applied them in a branch on my fork, and worked with it to get as far as I could.
Here is the progress I was able to make:
I need guidance on how to fix the demo apps or possibly the library to get this working.
Also, I noticed that the FAKE build script is very out-of-date. I was unable to use it and resorted to using paket, the dotnet SDK, and VS (and for building the demo projects, manually copying the library DLLs to the bin folder).
@mattstermiller You need to replace the use of System.Windows.Interactivity
with Microsoft.Xaml.Behaviors.Wpf.
See https://devblogs.microsoft.com/dotnet/open-sourcing-xaml-behaviors-for-wpf for details.
Thank you, @BillHally! That resolves the issue with upgrading the Blend project and now I've got all 3 library projects targeting netcoreapp3.0 and net45.
I still need help with the demo projects.
Hallo,
Is there any progress on this, or any plan to finish the upgrade to .Net Core? We would like to upgrade our project to .Net Core, but FsXaml seems to be a blockage at this moment.
request to support latest version, the fsproj file like this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<UseWindowsForms>False</UseWindowsForms>
</PropertyGroup>
<ItemGroup>
<Resource Include="FirstMetroWindow.xaml" />
<Resource Include="App.xaml" />
<Compile Include="FirstMetroWindow.fs" />
<Compile Include="App.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FsXaml.Wpf" Version="3.1.6" />
<PackageReference Include="MahApps.Metro" Version="2.4.9" />
<PackageReference Include="System.Reactive" Version="5.0.0" />
</ItemGroup>
</Project>
Description
I would like to use FsXaml with .NET Core 3 .NET Core 3 brings support for WPF, but it doesn't seem to work with FsXaml
Repro steps
Please provide the steps required to reproduce the problem
Using the latest preview for .NET Core 3 -
project.fsproj
Add a XAML file to the project.
Build the project.
Expected behavior
Project builds and I can start using the Type provider for the XAML file in my code.
Actual behavior
Build outputs an error as follows
Known workarounds
None that I know of. I'm using a C# project with my XAML files instead.
Related information