Skip to content

Packet Pack for Silverlight projects outputs to lib\net40 instead of lib\sl40 #751

Closed

Description

@cjbhaines

When using Packet Pack for a Silverlight 4.0 project using the following template:

type project
id TestProject
description
Silverlight models for TestProject

Then the resulting nupkg has the binaries in lib\net40 instead of lib\sl40

Activity

  1. forki commented on Apr 7, 2015

    @forki
    Member

    @mavnn how do we want to deal with this?
    On Apr 7, 2015 14:30, "Chris Haines" [email protected] wrote:

    When using Packet Pack for a Silverlight 4.0 project using the following
    template:

    type project
    id TestProject
    description
    Silverlight models for TestProject

    Then the resulting nupkg has the binaries in lib\net40 instead of lib\sl40

    —
    Reply to this email directly or view it on GitHub
    #751.

  2. mavnn commented on Apr 7, 2015

    @mavnn
    Contributor

    We use Project.GetTargetFramework at the moment (see below). Is this a bug in GetTargetFramework, or does packaging need to provide it's own logic? I'm not clear if sl40 or net40 is the "correct" general response here.

    https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/PackageMetaData.fs#L138

  3. cjbhaines commented on Apr 7, 2015

    @cjbhaines
    ContributorAuthor

    That's for the quick response! If you package using the official NuGet client it will place the files in "sl40". If you put the output of packet pack for a Silverlight project on a NuGet feed and try and install it to another Silverlight project it will fail with the following error messages because there is no "sl40" folder:

    Install-Package : Could not install package 'TestProject 1.0.070.9617'. You are trying to install this package into a project that targets 'Silverlight,Version=v4.0',
    but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

  4. forki commented on Apr 7, 2015

    @forki
    Member

    @cjbhaines could you please post you fsproj /csproj file? I want to add an unittest.

  5. cjbhaines commented on Apr 7, 2015

    @cjbhaines
    ContributorAuthor

    I sneakly renamed an actual production project to TestProject which I obviously can't publish. I have created a full example from scratch. Checkout the examples in the output folder.

    https://onedrive.live.com/redir?resid=bb18e69b948ef2cb!9897&authkey=!AKTa3mOwLNgO-ZU&ithint=file%2czip

  6. forki commented on Apr 7, 2015

    @forki
    Member

    could you please try 0.38.5?

  7. cjbhaines commented on Apr 7, 2015

    @cjbhaines
    ContributorAuthor

    That's done the trick. Thanks a lot guys!

  8. added a commit that references this issue on Jun 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions