I am currently building a website with ASP.NET 5 (currently using Beta 7). My current solution has 3 projects in it: 1 web and 2 libraries [both of these are the new Class Library (Package)] All projects are set to produce outputs on build, and the target build framework is 1.0.0-beta7/ .NET Framework/ x86.
I have two specific issues.
- When I add the 2 library references to the web project, I can run locally just fine. When I publish to Azure Websites (using Visual studio Publish) I get a 500 internal server error. I can get around this by doing 1 of two things.
- Publishing the libraries to my company's private Nuget Repository, and adding the references via nuget. This is less than ideal because they really aren't redistributable components, and I don't want my team to have to publish a new build with every change they make.
- Moving the references in project.json from the main "dependencies" key into the "dnx451" specific dependencies key. This works better, I'm just confused on what the actual difference is.
- I am currently working on a third library which has a dependency on a Nuget package that was written by another team. This was written before ASP.NET 5, and utilizes the full .NET 4.5 framework. This works locally, but again causes 500 errors in Azure Websites.
This is my web project.json (names changed to protect the innocent)
{"webroot": "wwwroot","version": "0.0.1-*","dependencies": {
/**
* initially the project references showed up here. which caused the issue
**/"angular-dynamic-locale.TypeScript.DefinitelyTyped": "0.0.1","angularjs.TypeScript.DefinitelyTyped": "4.0.1","angular-translate.TypeScript.DefinitelyTyped": "0.9.5","angular-ui-bootstrap.TypeScript.DefinitelyTyped": "0.1.0", "jquery.TypeScript.DefinitelyTyped": "2.2.6","Microsoft.ApplicationInsights.AspNet": "1.0.0-beta7","Microsoft.AspNet.Diagnostics": "1.0.0-beta7","Microsoft.AspNet.Identity": "3.0.0-beta7","Microsoft.AspNet.Mvc": "6.0.0-beta7","Microsoft.AspNet.Mvc.Core": "6.0.0-beta7","Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta7","Microsoft.AspNet.Server.IIS": "1.0.0-beta7","Microsoft.AspNet.Server.WebListener": "1.0.0-beta7","Microsoft.AspNet.StaticFiles": "1.0.0-beta7","Microsoft.AspNet.Tooling.Razor": "1.0.0-beta7","Microsoft.Framework.Configuration": "1.0.0-beta7","Microsoft.Framework.Configuration.Json": "1.0.0-beta7","Microsoft.Framework.Logging": "1.0.0-beta7","Microsoft.Framework.Logging.Console": "1.0.0-beta7" },"commands": {"web": "Microsoft.AspNet.Hosting --config hosting.ini" },"frameworks": {"dnx451": {"dependencies": {"project1": "1.0.0-*","project2": "1.0.0-*","project3": "1.0.0-*" } } },"exclude": ["wwwroot","node_modules","bower_components" ],"publishExclude": ["node_modules","bower_components","**.xproj","**.user","**.vspscc" ],"scripts": {"prepack": "gulp js-pub" } }
sln global.json:
{"projects": [ "src", "test", "../project1/src", "../project2/src", "../project3/src" ],"sdk": {"version": "1.0.0-beta7" } }