0

I am working with .Net Core 1.0 (running under the .Net Framework 4.6.1, non-portable).

I need to include some DLLs that are from a locally-built GitHub project. When I build those projects, and then attempt to "Add Reference" to the resulting DLLs, I get a message saying I can't add them to a Core project directly.

After more research, I found a lot of information regarding "private" NuGet packages. However, those seem overly complex / overly engineered.

Is there any way I can do the following:

Without having to go through the headache of creating a private NuGet repository, can I just "add reference" to the built assemblies that are sitting in the bin folder of the NuGet projects I pulled?

I really don't want to have to build a local-only NuGet package. Mostly because I've already wasted too much time on this issue, and because I read this entire concept is about to be scrapped and turned into something else (sounds familiar by now)... such as the Roslyn-based build system on GitHub.

My current state:

  • Visual Studio Professional 2015
  • .Net Core 1.0.1
  • .Net Core 1.0.1 Tooling Preview 2
3
  • .NET Core 1.0 and .NET Framework 4.x are mutually exclusive. You're mixing ASP.NET Core with .NET Core. .NET Core is the portable runtime, ASP.NET Core is a webstack which works on both .NET Core and .NET Framework 4.x Commented Oct 21, 2016 at 0:37
  • You're correct, I'm typing fast ... long day (plus, way too many overlapping product names and frameworks!). I meant ASP.Net Core under 4.6.1 not .Net Core. That's why I mentioned "non-portable" :) Commented Oct 21, 2016 at 0:45
  • @Tseng Regarding above, I am getting ".NET Core projects only support referencing .NET framework assemblies in this release". My project, however, was created as a full framework ASP.Net Core project (frameworks in project.json is net461) Commented Oct 21, 2016 at 0:47

1 Answer 1

1

No, as for now you have to create a nuget package before and restore it via Nuget. You can use a simple folder as NuGet source, so if you put your compiled NuGet package in C:\packages, you can add this as a source to NuGet (while in the NuGet UI, click the settings Icon and add the folder as new source).

This may change with the next release of ASP.NET Core (1.1), as the .NET/ASP.NET Core team is working to move from *.xproj to *.csproj files.

One of the reasons why you need to use nuget is because it can contain multiple targets and project.json allows you to target multiple platforms (i.e. net452 and netcoreapp1.0).

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.