fsprojects / Chessie

Railway-oriented programming for .NET
http://fsprojects.github.io/Chessie/
The Unlicense
188 stars 43 forks source link

Netcore with dotnetcli #43

Closed enricosada closed 8 years ago

enricosada commented 8 years ago

from: https://plus.google.com/events/c6tik5o4aofom0s2numam7nc57c

I updated nunit to version 3. nunit projects now are executable in project.json (fsproj are not changed) with nunit runner, you just need to run it (xplat works!)

the dotnet build expect the paket-files/test/forki/FsUnit/FsUnit.fs already downloaded

enricosada commented 8 years ago

added DotnetCliBuild and DotnetCliRunTests targets these target run if dotnet cli is installed (check with dotnet --version)

I dont know how to modify the nuget package, because it's generated by paket.templates file.

if you run:

dotnet restore
cd src/Chessie
dotnet pack --configuration Release

you can see the nuget package generated with the right nuspec (with both net46 and dnxcore50)

enricosada commented 8 years ago

Ok now package contains the dnxcore assemblies too

But i dont know how to specify dependencies by framework /cc @forki for help

i tried in paket.dependencies

nuget FSharp.Core redirects:force, framework: net45
nuget Microsoft.FSharp.Core.netcore = 1.0.0-alpha-151221 framework: dnxcore50
nuget NETStandard.Library = 1.0.0-rc2-23811 framework: dnxcore50

but nuspec is the same

forki commented 8 years ago

That is not supported yet. On Mar 22, 2016 8:10 PM, "Enrico Sada" notifications@github.com wrote:

Ok now package contains the dnxcore assemblies too

But i dont know how to specify dependencies by framework /cc @forki https://github.com/forki for help

i tried in paket.dependencies

nuget FSharp.Core redirects:force, framework: net45 nuget Microsoft.FSharp.Core.netcore = 1.0.0-alpha-151221 framework: dnxcore50 nuget NETStandard.Library = 1.0.0-rc2-23811 framework: dnxcore50

but nuspec is the same

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/fsprojects/Chessie/pull/43#issuecomment-199968843

enricosada commented 8 years ago

thx @forki, i'll add a workaround so, good old search/replace

enricosada commented 8 years ago

ok added a workaround, the target AddNetcoreToNupkg update the nupkg generated from paket adding dnxcore50 framework, files and dependancies /cc @mexx @forki

the deps use group element

    <dependencies>
      <group targetFramework=".NETFramework4.0">
        <dependency id="FSharp.Core" version="" />
      </group>
      <group targetFramework="DNXCore5.0">
        <dependency id="Microsoft.FSharp.Core.netcore" version="[1.0.0-alpha-151221, )" />
        <dependency id="NETStandard.Library" version="[1.0.0-rc2-23811, )" />
      </group>
    </dependencies>
enricosada commented 8 years ago

wait before merge, i want to extract the hack about nuspec as gist (thx @forki for the idea)

enricosada commented 8 years ago

Ok a bit late :smile: Changed fw from dnxcore50 to netstandard1.5 (that's the latest fashion) .net cli version: 1.0.0-beta-002071

removed the custom code with dotnet-mergenupkg to add .net cli deps (assemblies + nuspec deps) to the already built .nupkg

enricosada commented 8 years ago

@mexx i need to do something? rebase/etc?

mexx commented 8 years ago

@enricosada I'm actually not involved in the development, redirecting your question to @forki.

forki commented 8 years ago

@enricosada think it's ready to merge and release?

sergey-tihon commented 8 years ago

Would be awesome to have such integration on Travis CI build matrix level and be able to write something like this:

language: csharp

os:
  - linux
  - osx

mono:
  - latest
  - 4.2.2

dotnet-core:
  - latest
  - 1.0.0-beta-002071

Does it make sense? Could we request\implement it on Travis?