Error when trying to referance .net core Class library from Web app ASP.NET Core RC2
<p>So it sounds like a trivial task, I just want to use common code from my class library in both my web api and webapp but I am unable to reference the class library from my webapp projects, so I made a clean project to test it out.<br />
I have 3 projects:ClassLib1, ClassLib2, WebApp
I am able to reference ClassLib1 From ClassLib2 but I cannot referance either Class librarys from the webapp project
Here are my project.json's</p>
<p>ClassLib1</p>
<pre><code>{
  &quot;version&quot;: &quot;1.0.0-*&quot;,

  &quot;dependencies&quot;: {
    &quot;NETStandard.Library&quot;: &quot;1.5.0-rc2-24027&quot;
  },

  &quot;frameworks&quot;: {
    &quot;netstandard1.5&quot;: {
    }
  }
}
</code></pre>
<p>ClassLib2 is exactly the same as ClassLib1</p>
<p>Web App</p>
<pre><code>{
  &quot;dependencies&quot;: {
    &quot;Microsoft.NETCore.App&quot;: {
      &quot;version&quot;: &quot;1.0.0-rc2-3002702&quot;,
      &quot;type&quot;: &quot;platform&quot;
    },
    &quot;Microsoft.AspNetCore.Server.IISIntegration&quot;: &quot;1.0.0-rc2-final&quot;,
    &quot;Microsoft.AspNetCore.Server.Kestrel&quot;: &quot;1.0.0-rc2-final&quot;,
    &quot;ClassLib1&quot;: &quot;1.0.0-*&quot;
  },

  &quot;tools&quot;: {
    &quot;Microsoft.AspNetCore.Server.IISIntegration.Tools&quot;: {
      &quot;version&quot;: &quot;1.0.0-preview1-final&quot;,
      &quot;imports&quot;: &quot;portable-net45+win8+dnxcore50&quot;
    }
  },

  &quot;frameworks&quot;: {
    &quot;netcoreapp1.0&quot;: {
      &quot;imports&quot;: [
        &quot;dotnet5.6&quot;,
        &quot;portable-net45+win8&quot;
      ]
    }
  },

  &quot;buildOptions&quot;: {
    &quot;emitEntryPoint&quot;: true,
    &quot;preserveCompilationContext&quot;: true
  },

  &quot;runtimeOptions&quot;: {
    &quot;gcServer&quot;: true
  },

  &quot;publishOptions&quot;: {
    &quot;include&quot;: [
      &quot;wwwroot&quot;,
      &quot;web.config&quot;
    ]
  },

  &quot;scripts&quot;: {
    &quot;postpublish&quot;: [ &quot;dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%&quot; ]
  }
}
</code></pre>
<p>SS showing using ClassLib1 in ClassLib2 successfully</p>
<p><a href="https://i.stack.imgur.com/W9UeG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W9UeG.png" alt="enter image description here" /></a></p>
<p>SS showing error in webapp when trying to use ClassLib1</p>
<p><a href="https://i.stack.imgur.com/etb9L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/etb9L.png" alt="enter image description here" /></a></p>
<p>The error when moused over is `cannot resolve symbol 'ClassFromLib1'</p>
<p>Edit: I just noticed that if I change the web app to use <code>netstandard1.5</code> from <code>netcoreapp1.0</code> I can then referance code between the projects.
Should I do this? are there any downside by changing the framework in targeting?</p>