Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

project.json net40 client #2546

Closed
JamesNK opened this issue Aug 23, 2015 · 11 comments
Closed

project.json net40 client #2546

JamesNK opened this issue Aug 23, 2015 · 11 comments
Assignees
Milestone

Comments

@JamesNK
Copy link
Member

JamesNK commented Aug 23, 2015

Should project.json support .NET 4.0 Client Framework?

With .NETFramework,Version=v4.0,Profile=Client I get an error from dnu build:

System.ArgumentException: preprocessorSymbols

Microsoft .NET Development Utility CLR-x86-1.0.0-beta8-15120

@JamesNK
Copy link
Member Author

JamesNK commented Aug 23, 2015

Should also test .NETFramework,Version=v3.5,Profile=Client

@analogrelay
Copy link
Contributor

Regardless of support it shouldn't be throwing an ArgumentException :). But yes, in theory project.json should already support Client framework so this would be a bug.

@glennc glennc added the bug label Aug 24, 2015
@glennc glennc modified the milestones: 1.0.0-RC1, 1.0.0-beta8 Aug 24, 2015
analogrelay added a commit that referenced this issue Sep 16, 2015
analogrelay added a commit that referenced this issue Sep 17, 2015
analogrelay added a commit that referenced this issue Sep 17, 2015
analogrelay added a commit that referenced this issue Sep 17, 2015
This reverts commit 4bfa875.
@LorenDorez
Copy link

I am still having issues with it picking up net40-client. Im using a nuget Package for CsvHelper by John Close and Project.json keeps referencing the net20 and not the net40-client

@davidfowl
Copy link
Member

@LorenDorez can you provide more info

@LorenDorez
Copy link

I am working on a new MVC6 Project and when i add the nuget package "CsvHelper":

If i look at the porject.lock.json file it appears DNX is referencing the net20 assemblies for CsvHelper rather than the net40-client one. If i manually edit the project.lock.json file the things work but only until the project.lock.json needs to rebuild

Below is an example of the project.lock.json file for CsvHelper

 "CsvHelper/2.13.2": {
    "type": "package",
    "compile": {
      "lib/net20/CsvHelper.dll": {}
    },
    "runtime": {
      "lib/net20/CsvHelper.dll": {}
    }

  "CsvHelper/2.13.2": {
  "type": "package",
  "sha512":      "Onpo2LIa3vRTCdsgotgMj9+8VzcCwv0vLPpLf72qbJKsHJFnvW+TkgB5hfcO0l3eqG34U+yDpwgs1WHLTKp3HA==",
  "files": [
    "CsvHelper.2.13.2.nupkg",
    "CsvHelper.2.13.2.nupkg.sha512",
    "CsvHelper.nuspec",
    "lib/net20/CsvHelper.dll",
    "lib/net20/CsvHelper.pdb",
    "lib/net20/CsvHelper.xml",
    "lib/net35-client/CsvHelper.dll",
    "lib/net35-client/CsvHelper.pdb",
    "lib/net35-client/CsvHelper.xml",
    "lib/net40-client/CsvHelper.dll",
    "lib/net40-client/CsvHelper.pdb",
    "lib/net40-client/CsvHelper.xml",
    "lib/portable-net40+sl5+win8+wpa+wp8/CsvHelper.dll",
    "lib/portable-net40+sl5+win8+wpa+wp8/CsvHelper.pdb",
    "lib/portable-net40+sl5+win8+wpa+wp8/CsvHelper.xml"
  ]
},

@LorenDorez
Copy link

@davidfowl Any update?

@cda-1
Copy link

cda-1 commented Dec 5, 2015

@davidfowl I have a little more info that might help.

My asp.net 5 rc1 project.json has:

  "frameworks": {
    "dnx451": { }
  }

If I copy the "C:\Users[your username].dnx\packages\CsvHelper\2.13.5\lib\net40-client" folder to
"C:\Users[your username].dnx\packages\CsvHelper\2.13.5\lib\dnx451"

...then the project.lock.json file is generated correctly. It's a dirty hack and I am wondering what the root of the problem is.

I guess maybe it goes into the package folder looking for a folder than matches the framework I declared? Because if I copy the files I want into a folder called "dnx451" then these lines

"compile": {
      "lib/net20/CsvHelper.dll": {}
    },
    "runtime": {
      "lib/net20/CsvHelper.dll": {}
    }

change to

"compile": {
      "lib/dnx451/CsvHelper.dll": {}
    },
    "runtime": {
      "lib/dnx451/CsvHelper.dll": {}
    }

and everything works!

@kspearrin
Copy link

Having the same problem with the CsvHelper library.

@kspearrin
Copy link

Any update on how to fix this?

@cda-1
Copy link

cda-1 commented Jan 15, 2016

This issue is closed and labeled as "done". We probably need to open a new one to get it looked at.

@neutmute
Copy link

neutmute commented Feb 3, 2016

Same issue, CsvHelper, rc1-final. project.lock.json below

  "CsvHelper/2.13.5": {
        "type": "package",
        "compile": {
          "lib/net20/CsvHelper.dll": {}
        },
        "runtime": {
          "lib/net20/CsvHelper.dll": {}
        }

Workaround

I worked around this by hacking the CsvHelper package to remove everything except the net40 libs and publishing it on myget

Feed: https://www.myget.org/F/csvhelperdnx/api/v2
Package name: CsvHelper-dnx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants