fsprojects / FsXaml

F# Tools for working with XAML Projects
http://fsprojects.github.io/FsXaml/
MIT License
172 stars 48 forks source link

Getting error: Unable to load XAML data. Verify that all .xaml files are compiled as "Resource" #71

Closed keshavgadia closed 7 years ago

keshavgadia commented 7 years ago

Description

Trying to create Window type using FsXaml.Wpf v 3.1.6 using the XAML<"views\MyXaml.xaml"> syntax.

The Xaml file is in a directory called views within the project and has been made a "Resource" with Copy to Output Directory set to Do not copy. I get the error Unable to load XAML data. Verify that all .xaml files are compiled as "Resource".

Repro steps

  1. Create Xaml file MyXaml.xaml within a folder called views.
  2. Set the Build Action to Resource. Copy to Output Directory to Do not copy
  3. Create a type type myWindow =XAML<"views\MyXaml.xaml">

Expected behavior

The type to be created successfully.

Actual behavior

Exception as mentioned above.

Known workarounds

Use __SOURCE_DIRECTORY__ in the dev environment and use XamlFileLocation but this fails with the executable.

keshavgadia commented 7 years ago

Please ignore this one. This has now been addressed. Best regards Keshav

FoggyFinder commented 7 years ago

May I ask what was the problem?