New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property Definitions: Placed before FSharp Targets #1585

Closed
ascjones opened this Issue Apr 8, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@ascjones
Contributor

ascjones commented Apr 8, 2016

Description

After paket install, Websharper targets are moved up above FSharp target import which they depend on, since this commit: 8a9ba04

Guess we need something similar to this fix for CSharp targets: de12ae8

Repro steps

Import FSharp targets like so:

 <!-- F# targets -->
  <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)" />
  1. run paket install

Expected behavior

Expect the Websharper targets to show up after the FSharp Targets import

Actual behavior

WebSharper Targets show up before the FSharp Targets import

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Apr 8, 2016

Member

which nuget package is that?

Member

forki commented Apr 8, 2016

which nuget package is that?

@ascjones

This comment has been minimized.

Show comment
Hide comment
@ascjones

ascjones Apr 8, 2016

Contributor

https://www.nuget.org/packages/WebSharper/3.6.11.234

I'm just guessing that it depends on FSharp targets, but anyway it works when the targets import it is below them.

Contributor

ascjones commented Apr 8, 2016

https://www.nuget.org/packages/WebSharper/3.6.11.234

I'm just guessing that it depends on FSharp targets, but anyway it works when the targets import it is below them.

@ascjones

This comment has been minimized.

Show comment
Hide comment
@ascjones

ascjones Apr 8, 2016

Contributor

Yep just confirmed, the WebSharper target import needs to appear after FSharp targets import in order to run, like so:

  <Import Project="$(FSharpTargetsPath)" />
  <Choose>
    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.5.1'">
      <PropertyGroup>
        <__paket__WebSharper_targets>WebSharper</__paket__WebSharper_targets>
      </PropertyGroup>
    </When>
  </Choose>
Contributor

ascjones commented Apr 8, 2016

Yep just confirmed, the WebSharper target import needs to appear after FSharp targets import in order to run, like so:

  <Import Project="$(FSharpTargetsPath)" />
  <Choose>
    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.5.1'">
      <PropertyGroup>
        <__paket__WebSharper_targets>WebSharper</__paket__WebSharper_targets>
      </PropertyGroup>
    </When>
  </Choose>

@forki forki added the bug label Apr 8, 2016

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Apr 8, 2016

Member

fix is under way

Member

forki commented Apr 8, 2016

fix is under way

@forki forki closed this in 776c1c7 Apr 8, 2016

@ascjones

This comment has been minimized.

Show comment
Hide comment
@ascjones

ascjones Apr 8, 2016

Contributor

Fantastic thanks!

Contributor

ascjones commented Apr 8, 2016

Fantastic thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment