F# 和 MSBuild 工具 (silverlight)
我们正在尝试在 100% F# Silverlight 应用程序中使用静态资源。嵌入到引用控件的 XAML 中,一切正常。但一旦我把它们拿出来,我就不知所措了。 C# 应用程序将构建操作设置为: MSBuild:MarkupCompilePass1
两个问题
1) VS 2010 在 f# silverlight 项目中是否支持此工具? 2)如果没有,那么有没有办法从命令行运行它,然后将资源静态链接到项目?
谢谢
We are trying to use Static Resources within a 100% F# Silverlight application. Embeded within the XAML of the referencing control, everything works. But once I pull them out I am a loss. C# applications set the build action as: MSBuild:MarkupCompilePass1
Two questions
1) does VS 2010 support this tool yet in f# silverlight projects?
2) If not, then is there way to run it from a command line and then link the resource to the project staticaly?
Thx
T
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
能否在F#项目中的VS中手动设置Build Action以匹配C# Build Action?我还没有尝试过,但似乎它有很大的工作机会。
更一般地说,如果您使 .fsproj 文件看起来像 .csproj 文件,我希望它可能会工作,尽管从 VS 中执行此操作可能并不容易(可能需要手动编辑项目文件)。我很想听听结果。
Can you set the Build Action manually in VS in the F# project to match the C# Build Action? I haven't tried it, but seems like it has a decent chance of working maybe.
More generally, if you make the .fsproj file look like the .csproj file, I expect it will probably work, though it may not be easy to do this from within VS (may need to edit project file manually perhaps). I'd be interested to hear the results.
不支持 MSBuild:CompilePass1 或 2,也许我们可以期望在下一个版本中提供支持。到目前为止,唯一的方法是将其嵌入为“资源”并使用 Application.LoadComponent 动态构建 baml。我写了一些博客文章 WRT 到 WPF,这也应该适用于成熟的 F# Silverlight 应用程序,
http://fadsworld.wordpress.com/2011/04/13/f-in-the-enterprise-i/
http://fadsworld.wordpress.com/2011/04/13/f-in -the-enterprise-ii-2/
如果您需要任何帮助,请告诉我。
——法赫德
There is no support for MSBuild:CompilePass1 or 2, May be we can expect that in the next version. As of now the only way is to embed it as a "Resource" and use Application.LoadComponent to dynamically build the baml. I did some blog posts WRT to WPF, this should work as-is for full fledged F# Silverlight apps too,
http://fadsworld.wordpress.com/2011/04/13/f-in-the-enterprise-i/
http://fadsworld.wordpress.com/2011/04/13/f-in-the-enterprise-ii-2/
If you need any help, do let me know.
-Fahad