3

I'm running a solution with project built using .NET 4.5 and now in that same solution I'm adding a ASP Core 1.0 API project that will need to add some of the other projects as reference.

At the moment, I've tried the "Add reference" functionality and wrapping the referenced project on the "project.json" file and the result is still the same. On the github page I've looked on the issues to see if there's something similar but nothing so far.

Is it possible to do this? In a solution with 10 .NET 4.5 other projects (class libraries), add a MVC 6 API project and use the old 4.5 projects as reference in the new on?

6
  • 1
    I'm referencing 4.5 projects in my current ASP.NET Core project without issues, so it's definitely possible. Are you getting any errors? Commented Apr 13, 2016 at 10:54
  • yes, when adding the references I'm getting the following message "The dependency XXXXX >= 1.0.0.* could not be resolved". Any idea? My project.json has a net45 area inside frameworks with wrappedproject and bin subelements configured, pointing to the dll to be referenced. Commented Apr 13, 2016 at 12:37
  • Which version of .NET 4.5 are the libraries? You might be running into this issue: github.com/aspnet/Tooling/issues/45 Seems there's an issue referencing 4.5.1 specifically. Commented Apr 13, 2016 at 12:48
  • I'm using NET 4.5 Class Library project (not 4.5.1, nor 4.5.2) Commented Apr 13, 2016 at 13:03
  • 1
    Could you edit your post to include how your project.json looks like, omitting anything sensitive? Commented Apr 13, 2016 at 13:06

1 Answer 1

1

Using command line from inside the folder of the .net core api solution:

dnu wrap full_path_to_an_assembly[**\**.dll] -f framework_version [net45] 

Inside Visual Studio, "Add Reference" -> select your .NET 4.5 Project and it works.

No need to add wrappedprojects section to project.json.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.