Coder Social home page Coder Social logo

Comments (23)

mmanela avatar mmanela commented on September 18, 2024 2

Good news, I got it working in my branch https://github.com/mmanela/diffplex/tree/dotnetcore

from diffplex.

mmanela avatar mmanela commented on September 18, 2024 1

Just published a new package that targets netstandard 1.4

from diffplex.

mmanela avatar mmanela commented on September 18, 2024

What is needed to support DNX?

from diffplex.

giggio avatar giggio commented on September 18, 2024

You would need to migrate from a .csproj/package.config project file structure to a .xproj/project.json file structure. With it, you don't need the nuspec files anymore, as project.json already does all that work. It is a considerable change, so you might want to check that more carefully.
To be fair, current 4.0 should already work with dnx. So, a better title would be "support dnx with .NET core". I will update that.

from diffplex.

mmanela avatar mmanela commented on September 18, 2024

If I am already a "portable" library does that not mean I work on core? Do I need the DNX project structure to target core?

from diffplex.

giggio avatar giggio commented on September 18, 2024

No, a PCL will not work with .NET Core. You have to specifically target it.
If you use VS 2015 and try creating a Console Application (Package) you will see dnxcore as a runtime. You will see that you will not be able to add a reference to diffplex.

from diffplex.

mmanela avatar mmanela commented on September 18, 2024

It doesn't seem to list dnxcore here:

image

What do I need to do?

from diffplex.

giggio avatar giggio commented on September 18, 2024

You are creating the incorrect project type. The dnx projects are still under the Web node, on the project creation tool. Look for the Console Application (Package) project on VS 2015.

from diffplex.

mmanela avatar mmanela commented on September 18, 2024

Ok, I can take a look at that.

from diffplex.

giggio avatar giggio commented on September 18, 2024

This is what will happen if you try to target dnxcore:

diffplex

Here is the project.json file contents:

{
  "version": "1.0.0-*",
  "description": "ConsoleApp2 Console Application",
  "authors": [ "giggio" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",

  "dependencies": {
      "diffplex": "1.2.1"
  },

  "commands": {
    "ConsoleApp2": "ConsoleApp2"
  },

  "frameworks": {
    "dnx451": { },
    "dnxcore50": {
      "dependencies": {
        "Microsoft.CSharp": "4.0.1-beta-23409",
        "System.Collections": "4.0.11-beta-23409",
        "System.Console": "4.0.0-beta-23409",
        "System.Linq": "4.0.1-beta-23409",
        "System.Threading": "4.0.11-beta-23409"
      }
    }
  }
}

If you remove dnxcore50 it compiles and runs just fine.

from diffplex.

mmanela avatar mmanela commented on September 18, 2024

If I build diffplex for .net core can someone use it from .net 4.5 ?

from diffplex.

giggio avatar giggio commented on September 18, 2024

Hm... That is a good question. I would say that probably not, at this moment.
If you checkout this document: https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/standard-platform.md
You will see how these things will work together.
If you decide to target the new netstandard, everything would just work. But that is not done yet.

from diffplex.

nguyenm100 avatar nguyenm100 commented on September 18, 2024

I believe the above link references changes for rc2 (currently things are at rc1 with rc2 slated for 2/2016). In RC1, I believe you want to mark your (shared) assemblies as "donet5.4" (this changes to netstandard in RC2) to be completely neutral (and anyone can use it) and mark your app dnxcore50 to use dnx instead of (windows).net 4.6

The naming is horribly confusing :-(

from diffplex.

giggio avatar giggio commented on September 18, 2024

Yes, the new .NET Standard will allow you to support .NET Core and .NET 4.5.

from diffplex.

russcam avatar russcam commented on September 18, 2024

I have a working DNX build targeting dotnet and dnx451 - once I've run the tests, I'll submit a PR 👍

from diffplex.

Daniel15 avatar Daniel15 commented on September 18, 2024

Any updates here?

from diffplex.

russcam avatar russcam commented on September 18, 2024

@Daniel15 I got sidetracked on other things; I'll update the DNX version I have to use the new tooling and update the PR

from diffplex.

giggio avatar giggio commented on September 18, 2024

I updated the description, we don't need DNX support anymore, we need .NET Standard Support. :)

from diffplex.

giggio avatar giggio commented on September 18, 2024

@russcam when are you planning on updating this PR?

from diffplex.

mmanela avatar mmanela commented on September 18, 2024

I took a stab at changing diffplex into a netstandard dll but I am hitting issues. Would love someone who has more experience with this to help. I pushed my changes here: https://github.com/mmanela/diffplex/tree/dotnetcore

I attempted to convert DiffPlex, DiffPlex.ConsoleRunner, Facts.DiffPlex and Perf.DiffPlex to netstandard. I omitted the other two project for now to keep it simple. However, I am getting errors like:

image

@russcam @giggio @AArnott Could any of you help?

from diffplex.

russcam avatar russcam commented on September 18, 2024

I got around to updating the PR #14 that I had for updating to DNX and have ported it over to using .NET Core 1.0 in #17. Additionally, I have added a Build project that uses FAKE to build the solution and run unit tests. Because FAKE is pulled in through nuget, it means a nuget restore needs to be done before the build.bat build script can run.

If interested, I can port nuget over to using paket and check in only the paket,bootstrapper.exe into the repository.

from diffplex.

mmanela avatar mmanela commented on September 18, 2024

@russcam With 2017 RC they no longer use the json files and its now using a simple version of project xml. In my branch (https://github.com/mmanela/diffplex/tree/dotnetcore) it looked pretty simple although I hit that odd dependency issue. I think we should move to this since this is where its going to be with the new release of VS.

from diffplex.

russcam avatar russcam commented on September 18, 2024

@mmanela, ok. I'll need to install VS 2017 RC and take a look

from diffplex.

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.