0
votes

Easiest way to describe the problem is by providing steps to reproduce.

Using the release bits (VS 2015 Update 3 and .NET Core 1.0), create solution with two projects as follows:

  1. Create .NET Core class library.
  2. Change "netstandard1.6" to "netstandard1.4" in project.json.
  3. Create Full Framework console application.
  4. Change target framework in project properties to "4.6.1".

This versions both projects to the same .NET platform standard.

  1. From console app, add project reference to class library project.

  2. In the console app code, reference a class in the class library project, e.g.:

    static void Main(string[] args)
    {
        var x = new ClassLibrary1.Class1();
    }
    

Produces the following error message:

The type or namespace name 'ClassLibrary1' could not be found (are you missing a using directive or an assembly reference?)

1
In project.json did you set the "frameworks" to "net461"?leetibbett
@leetibbett: No, it targets "netstandard1.4", which should be compatible.gxclarke
I don't think that Core can reference Full assemblies. Its kind of in the name. Core is a subset of the Full framework...Aron
@Aron: I'm trying to do it the other way round. The Full assembly project reference the Core one.gxclarke
Seems you're running the latest versions but maybe some of the suggestions in this thread and this might helpkeyboardP

1 Answers

1
votes

looks like this is an issue with the xproj project reference. If you compile the code and reference the dll specifically it should work. This has been discussed at length here

From what I can tell, we are stuck waiting for the conversion of xproj to csproj, which should resolve the issue.