Giter Site home page Giter Site logo

Comments (8)

7sharp9 avatar 7sharp9 commented on July 19, 2024

Perhaps default to v3. An additional template could be created for v2, I.e an empty F#2 project.

On 21 Nov 2012, at 10:07, Ben Winkel [email protected] wrote:

The templates create projects referencing the F# 2.0 targets file at
$(MSBuildExtensionsPath32)\Microsoft F#\v4.0\Microsoft.FSharp.targets

The reasons for this are explained in FSahrpBinding.addin.xml.orig. However, this means new projects created using MonoDevelop on Windows can't use F# 3.0 features unless you either open with VS 2012 (which does an upgrade to F# 3.0) or manually change the targets reference to

$(MSBuildExtensionsPath32)\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
which is the F# 3.0 targets file.

On Linux and Mac it doesn't matter since even if you use the F# 2.0 targets file you still get F# 3.0 if F# 3.0 is installed.

We should consider switching to assume F# 3.0 in the templates once we can safely assume all users of the binding have F# 3.0 installed.

p.s. unfortunately it seems difficult to make templates which are neutral


Reply to this email directly or view it on GitHub.

from zarchive-fsharpbinding.

funnelweb avatar funnelweb commented on July 19, 2024

Would like to but not sure how to make templates that use different targets files. The target file is set at line 44 of

https://github.com/fsharp/fsharpbinding/blob/master/monodevelop/MonoDevelop.FSharpBinding/FSharpBinding.addin.xml.orig

This seems to be a global setting for the language binding.

from zarchive-fsharpbinding.

7sharp9 avatar 7sharp9 commented on July 19, 2024

I think we would need to add a new parameter to allow multiple targets. Finding the way to go about this in the MonoDevelop docs is not so easy. Adding parameters under /MonoDevelop/ProjectModel/SerializableClasses. Etc

On 21 Nov 2012, at 10:57, Ben Winkel [email protected] wrote:

Would like to but not sure how to make templates that use different targets files. The target file is set at line 44 of

https://github.com/fsharp/fsharpbinding/blob/master/monodevelop/MonoDevelop.FSharpBinding/FSharpBinding.addin.xml.orig

This seems to be a global setting for the language binding.


Reply to this email directly or view it on GitHub.

from zarchive-fsharpbinding.

7sharp9 avatar 7sharp9 commented on July 19, 2024

@dsyme Any ideas what we can do with this one?

from zarchive-fsharpbinding.

 avatar commented on July 19, 2024

I think we can now safely assume F# 3.0 on all target machines.

So subject to careful testing on both Linux, Mac and Windows, I think it would make sense to move the templates to use the same textual .targets formulation in the .fsproj files as used in VS2013 preview - this is the formulation that will round trip for both VS2012 and VS2013.

However I haven't got that formulation to hand (I don't have VS2013 preview on this machine). I'll ask a Visual F# team member to send it along if no one else jumps in first.

We should also adjust the Xamarin Studio templates and check that opening the generated .fsproj files in both VS2012 and VS2013 doesn't give a "one time project upgrade" (i.e. opening doesn't cause any textual revision of the project files). I think this then gives the full project-file portability between VS2012, VS2013, MonoDevelop 4.0 and Xamarin Studio that we need.

from zarchive-fsharpbinding.

v2m avatar v2m commented on July 19, 2024

These are snippets from the bits shipped with VS2013 Preview.
.fsproj (instead of just importing .targets file from SDK it imports one located in $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp):

  <Choose>
    <When Condition="'$(VisualStudioVersion)' == '11.0'">
      <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </When>
    <Otherwise>
      <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </Otherwise>
  </Choose>
  <Import Project="$(FSharpTargetsPath)" />

Microsoft.FSharp.Targets (located in $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp imports .targets file from SDK to decouple project file from particular SDK location and avoid upgrading project files for the next VS version)

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets" />

</Project>

from zarchive-fsharpbinding.

7sharp9 avatar 7sharp9 commented on July 19, 2024

Im not sure on the status of this one, what with the previous issues in XS etc...

from zarchive-fsharpbinding.

 avatar commented on July 19, 2024

This was fixed a while back. Templates now conditionally point to F# 3.1 SDK if it is available

from zarchive-fsharpbinding.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.