You can probably wing it without the MSI, but it may be painful

- the compiler is very slow if it is not NGENed. To NGEN it, it needs to be in the GAC

- don't forget Microsoft.FSharp.targets and FSharp.Build.dll next to it. That plus the compiler assemblies may be enough.

By on 5/19/2010 10:42 AM ()

On a fully-enabled F# box (VS2010 w/latest bits), I don't seem to be able to use MSBuild for .FsProj files:

[exec] myProj.fsproj : Solution file warning MSB4122: Scanning project dependencies for project "myProj.fsproj" failed. The imported project "C:\Program Files (x86)\MSBuild\FSharp\1.0\Microsoft.FSharp.Targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. myProj.fsproj

There is no FSharp dir under MSBuild in :

C:\Program Files (x86)\MSBuild\FSharp\1.0\Microsoft.FSharp.Targets

How is it supposted to get there?

thanks

By on 5/26/2010 10:43 AM ()

It's not - your .fsproj file is in error. Older .fsproj might use that location, but newer ones should have

<Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="!Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition=" Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />

which will load the second path on any machine with .NET/MSBuild 4.0, and that path is the correct one for the F# that ships in VS2010.

The fix is to update your .fsproj file with the correct Import. (The first import is just to make things likely to work for back-compat/old VS2008 behavior.)

By on 5/26/2010 10:54 AM ()

I checked the external build box, which has VSExpress and the latest F# re-dist installed.

It installed under \Program Files\FSharp-2.0.0.0, and seemed neither to create a VS100COMNTOOLS nor place anything under VS90COMNTOOLS (like an FSharp dir) that msbuild can find.

What's the proper way to get msbuild to work in this configuration?

thanks

By on 5/27/2010 10:21 AM ()

Thanks - my .fsproj was already exactly as you described.
The probkem was the following in the ant script:

<arg value="""${env.VS90COMNTOOLS}vsvars32.bat"&&msbuild D:/src/Research/.NET/Libs/UnitNLP/UnitNLP.sln /t:Rebuild /p:Configuration=Release"" />

Changing this to VS100COMNTOOLS worked on my box. (Though I'm getting gobs of indentation errors I don't get in the IDE.)

Now, as I need the build to work in 2008 & 2010 (both Visual Studio commercial versions and VSExpress+F#-.msi-redist), versions, will I need to attempt both VS90COMNTOOLS and VS100COMNTOOLS?

I guess what I really want is VSLATESTCOMNTOOLS...

thanks

By on 5/27/2010 10:06 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper