xbuild和F#(vs2010)项目 [英] xbuild and F# (vs2010) project

查看:103
本文介绍了xbuild和F#(vs2010)项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VS 2010混合语言解决方案,主要是C#,但包含用F#编写的Windows服务.我已经在并行环境中使用xbuild构建了此建筑物,但是自从 badgerports 我一直无法正常工作.

I have a VS 2010 mixed-language solution that's primarily C#, but contains a windows service written in F#. I've had this building with xbuild in the in a parallel environment, but since upgrading to the packaged version of mono 2.10.5 from badgerports I've been unable to get it working.

我通常遇到的错误是:

/home/alex/git/Solution/FSProject/FSProject.fsproj:错误:在项目中找不到名为"Build"的目标.

/home/alex/git/Solution/FSProject/FSProject.fsproj: error : Target named 'Build' not found in the project.

让我感到困惑的是,查看项目文件时,似乎并没有定义任何目标.我距离MSBuild专家还很远,但这对我来说有点奇怪.话虽如此,它以前确实起作用.

What puzzles me is that looking at the project file, it doesn't appear that ANY targets are defined. I'm far from an expert on MSBuild, but this seems a bit strange to me. That being said, it did work previously.

有人遇到过类似问题(并希望找到解决方案)吗?如果可能的话,我希望能够使用xbuild和Visual Studio来构建解决方案.

Has anyone run into (and hopefully found the solution for) similar issues? If possible I'd like to be able to build the solution with xbuild and from Visual Studio.

环境是薄荷11(不确定是否基于ubuntu特立独行的还是natty的),运行来自badgerports的mono 2.10.5. fsharp已从最新来源安装为默认前缀.

Environment is mint 11 (not sure if this is based on ubuntu maverick or natty) running mono 2.10.5 from badgerports. fsharp was installed from latest source to the default prefix.

修改

多亏了Brian的指针,我得以走得更近(我确实必须对路径进行硬编码,xbuild似乎无法解决诸如"$(MSBuildExtensionsPath32).. \ FSharp \ 1.0 \ Microsoft之类的问题. FSharp.Targets"). FSC实际上正在被调用,尽管它抱怨无法解决对FSharp.Core的引用.

I've been able to get a little closer thanks to Brian's pointer (I did have to hard-code a path, xbuild seems to have trouble resolving things like "$(MSBuildExtensionsPath32)..\FSharp\1.0\Microsoft.FSharp.Targets"). FSC is actually getting called now, though it's complaining that it's unable to resolve the reference to FSharp.Core.

我找到了此页面 F#和XBuild(Debian)有助于实现这一目标.

I found this page F# and XBuild (Debian) helpful in getting this far.

推荐答案

如果使用此选项,则不再需要黑客攻击:

There's no need for hackery anymore if you use this:

  • Mono 3.0.0 or newer. (My change was merged here.)
  • FSharp tag 3.0.26 (or newer) on github (My change was merged here.).

这篇关于xbuild和F#(vs2010)项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆