Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 20250 [details]
Download attached project(or create your own F# project and add embedded resource)
1) inside terminal navigate to fsharpFailsToEmbedResources.sln file
2) run `msbuild`
3) run `xbuild /t:Rebuild`
4) compare parameters passed to fcs.exe, msbuild is missing `--resource:obj/x86/Debug/FSharpBinding.addin.xml`
Command `monodis --presources fsharpFailsToEmbedResources/bin/Debug/fsharpFailsToEmbedResources.exe` can be used to verify that output .exe doesn't have resource inside.
Suggested a workaround to David, so changing from `blocker` to `normal`. I have a fix that needs some work and testing.
Without applying a workaround it is not possible to run new F# projects that use Xamarin.Forms currently because the .xaml files are not added as embedded resources in the compiled assemblies. Switching to xbuild is OK.
Looking at the compiler parameters, whilst the .xaml files are identified as EmbeddedResources, the parameters passed to Fsc do not include any --resource parameters.
No --resource parameters.
This was tested with VSMac and using the Xamarin.Forms 2.3.4 NuGet package.
The workaround is to change EmbeddedResource to AdditionalEmbeddedResource in the .fsproj.
Fixed for command line: https://github.com/mono/msbuild/commit/31480424881941ea21d6551e5e332c7467855999
PR to enable use of the msbuild fix: https://github.com/xamarin/bockbuild/pull/76 .