You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
* Fix for #2595, ported from fsharp/fsharp.* Fix .targets to work with xbuild and msbuildFix Microsoft.FSharp.targets with a workaround so resources are includedcorrectly when building with either msbuild or xbuild.
Copy file name to clipboardExpand all lines: src/fsharp/FSharp.Build/Microsoft.FSharp.targets
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,25 @@ this file.
197
197
Text="The property<Win32ResourceFile> has been renamed to<Win32Resource>. Update your project file to ensure that the correct value is passed via the --win32res option to the F# compiler."
198
198
/>
199
199
200
+
<!-- Workaround for differences between how msbuild and xbuild handle embedded resources.
201
+
If we just naively include the additional items needed for mono, that leads to issues
202
+
on msbuild/Windows due to double-including resources.
203
+
Here, we use the $(UsingXBuild) property to conditionally set another property containing the
204
+
correct list of resources based on the build system being used.
205
+
This could be a bit simpler, but xbuild doesn't seem to support msbuild 4.0 'item functions'