Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How on Earth do I reference a class library in my ASP.NET Core project?

$
0
0

Hi all,

I'm having trouble getting my head around how project.json works, and the limitations. My setup is:

  • Xamarin Client
  • Model.dll (.NET 4.5.2)
  • ASP Core Web API 

I'd like to reference my Model.dll so that I can use the same classes when sending JSON data between the Xamarin Client and the ASP Core Web API. 

My project.json for reference (with my comments):

{"dependencies": {"Microsoft.NETCore.App": {"version": "1.0.0","type": "platform"
    },"Microsoft.AspNetCore.Mvc": "1.0.0","Microsoft.AspNetCore.Server.IISIntegration": "1.0.0","Microsoft.AspNetCore.Server.Kestrel": "1.0.0","Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0","Microsoft.Extensions.Configuration.FileExtensions": "1.0.0","Microsoft.Extensions.Configuration.Json": "1.0.0","Microsoft.Extensions.Logging": "1.0.0","Microsoft.Extensions.Logging.Console": "1.0.0","Microsoft.Extensions.Logging.Debug": "1.0.0","Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0" <-- Do I reference my Model.dll in this area?
  },"tools": {"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
  },"frameworks": {"netcoreapp1.0": {"imports": ["dotnet5.6","portable-net45+win8" <-- Should I add net462 here?
      ]
    }                         <-- Or do I create a new framework?
  },"buildOptions": {"emitEntryPoint": true,"preserveCompilationContext": true
  },"runtimeOptions": {"configProperties": {"System.GC.Server": true
    }
  },"publishOptions": {"include": ["wwwroot","Views","Areas/**/Views","appsettings.json","web.config","hosting.json"
    ]
  },"scripts": {"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }

}

Thank you in advance. If there's any documentation (I can't seem to find any) then I'd love to be pointed in the right direction.

Cheers.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>