dnx

Can the dnx/dotnetcore package cache location be changed

家住魔仙堡 提交于 2019-12-10 19:31:30
问题 I have a machine where the C:\ drive is running out of space and I'd like to change the location where my DNX/DOTNET packages are installed to a location under my D:\ drive. Is the package cache location configurable? NOTE: I don't have the flexibility to change my profile location to a different drive. 回答1: Use the NUGET_PACKAGES environment variable and set it to a path you prefer. Specifically, open up System Properties, create a user environment variables called NUGET_PACKAGES , and set

ASP.NET v5 without DNX

元气小坏坏 提交于 2019-12-10 16:13:24
问题 I understand that DNX provides the ability to invoke the various new package management features of ASP.NET v5 apps. However, is it possible to "build" one of these apps (using DNX etc) and "precompile" them in such a way that they can be deployed to (using Octopus) and run on a unmodified IIS server using .NET framework 4.5? I had the option to target .NET 4.5 when creating the project, and while installing DNX on our build server is unlikely to be a problem, it's too soon to push it out to

Upgrading VS2015 to asp.net 5 beta7 I get Could not load file or assembly 'dnx.clr.managed' or one of its dependencies

一个人想着一个人 提交于 2019-12-10 15:57:28
问题 I have upgraded DNX using the instructions on https://github.com/aspnet/Home I also downloaded DotNetVersionManager-x64.msi for visual studio 2015 but when I create a new project and run the website I get the following error Could not load file or assembly 'dnx.clr.managed' or one of its dependencies. The system cannot find the file specified. When I try to run the website from dnx command line I get the following C:\code> dnx web stem.InvalidOperationException: No service for type 'Microsoft

Kestrel Running which framework?

大城市里の小女人 提交于 2019-12-10 14:59:45
问题 I have a new ASP.NET 5 project and setup the project.json as below; "frameworks": { "dnx451": { "dependencies": { "ExternalLibrary": "1.3.0" } }, "dnxcore50": {} } I'm running the project through Kestrel with the default command defined in project.json. "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5001" Everything works fine. The project runs and the dependency works well. The only thing I don't understand it who decides on which underlying framework to

How to force Visual Studio to use x64 DNX SDK architecture

ⅰ亾dé卋堺 提交于 2019-12-10 14:36:24
问题 I'm using 1.0.0-beta7 x64 but visual studios insists I'm using x86. When I delete all my runtimes except the one I'm targeting I get this: I can't find a reference to x86 anywhere in my project. When I hover over the Solution DNX SDK version here it shows the x86 version but I don't know where it's getting this from. Currently this isn't causing any problems I'm just trying to understand what's going on. 回答1: Right-click in your, web (not solution) project and select Properties. Click "Use

What is dotnet5.4 and net451 in class library?

夙愿已清 提交于 2019-12-10 13:53:57
问题 In aspnet 5 I created a project which came with dotnet5.4 and net451 . Since it's a class library I assume it does not need the runtime so uses net451 instead of dnx451 (my wild guess). But what about dotnet5.4 what exactly is that for ? 回答1: UPDATE: With this announcement, the monikers will probably change again. This answer is only scoped to the release of RC1. Any release further than RC2 won't apply here. Basically, dnxcore50 became dotnet5.4 and dnx451 became net451 . Those were

Entity Framework 7 Migration Scaffolding in Class Library with Configuration

泪湿孤枕 提交于 2019-12-10 12:36:30
问题 Trying to add migrations to an EF7 Model that lives in an ASP.NET 5 class library. When running dnx . ef migration add mymigration fails with different results depending on which project I run it on. If I run it in the folder of the main project, it cannot locate a DbContext , this makes sense because the DbContext is in the shared project and ef commands likely don't care about dependencies. If I run it in the folder of the shared project, it does not have access to the connection string

asp.net5/dnx Unable to resolve reference when published but can debug?

自古美人都是妖i 提交于 2019-12-10 11:46:18
问题 So this seems a bit odd, I have a dnx command line application that is a single solution referencing 4 other .net 4.5 classic (aka .csproj) projects. I can execute the code and debug into it without problems. However I can not run it once it is published. The app starts up and shows some output from a Console.Write and then tries to run some code that queries the db using Entity Framework v6.1.3. The error I get is "Could not load file or assembly 'EntityFramework, Version=6.0.0.0" which

Working with multiple environments during integration testing with ASP.NET Core

跟風遠走 提交于 2019-12-10 09:28:18
问题 Here's the launchSettings.json file for the test project: { "profiles": { "test": { "commandName": "test", "environmentVariables": { "Hosting:Environment": "Development" } } } } The test project has a dependency on the server project, and initializes the tests using the server project's Startup class directly like so: Server = new TestServer(TestServer.CreateBuilder().UseStartup<Startup>()); Client = Server.CreateClient(); Yet for some reason, when I enter the Startup.Configure method in the

How to run XUnit tests in the project.json and dotnet tfm world

耗尽温柔 提交于 2019-12-09 16:53:21
问题 Background: Recently I switched from the "old" world to the new project.json world, because new is always better ;) Currently 2 out of 3 projects can use the "dotnet" target framework moniker, the other one needs the full .NET framework (net46). I also switched my test projects to the new project.json world, but it I can´t run any tests. The build is green, but no tests are found. I read this documentation and included the xunit.runner.dnx, but the problem is that is is not a "dnx" project -