Questions tagged [dnx]

As an obsolete concept, the .NET Execution Environment contains the code required to bootstrap and run an application. This includes things like the compilation system, SDK tools, and the native CLR hosts.

Note that DNX is no longer an active term used in .NET Core ecosystem, and you should migrate to .NET Core CLI.

The .NET Execution Environment contains the code required to bootstrap and run an application. This includes things like the compilation system, SDK tools, and the native CLR hosts.

Goals

  • Create a new development experience that enables a quick development workflow (change code and run)
  • Have the ability to create a cached version of your application's dependencies ("compilation")
  • Expose metadata about the runtime for others to query

Principles

  • NuGet all the things
  • There is no such thing as "design time" (blur the lines between compilation and loading)
  • Dependencies are always described as what not where (there's no such thing as a project/nuget/assembly reference)
706 questions
18
votes
1 answer

DNX: The current runtime target framework is not compatible with project

I am getting the following run-time error: [InvalidOperationException: The current runtime target framework is not compatible with 'TestDeployProject'. Current runtime Target Framework: 'DNX,Version=v4.5 (dnx45)' Type: CLR Architecture: x86 …
Dave New
  • 38,496
  • 59
  • 215
  • 394
17
votes
1 answer

AsyncLocal Value updated to null on ThreadContextChanged

I'm trying to understand how AsyncLocal should work in .Net 4.6. I'm putting some data into AsyncLocal...but when the ThreadContext changes it is getting set to null. The whole reason I'm using AsyncLocal is to try to preserve/cache this value…
swannee
  • 3,346
  • 2
  • 24
  • 40
17
votes
2 answers

ASP.NET 5, DNX & Kestrel: Not hitting breakpoints

Breakpoints are not being hit when debugging our DNX projects referenced in a ASP.NET 5 API project hosted with Kestrel (all in the same solution and in the src folder). Debugging with IIS Express works fine. What troubleshooting steps can be taken…
Dave New
  • 38,496
  • 59
  • 215
  • 394
17
votes
2 answers

Getting interface implementations in referenced assemblies with Roslyn

I'd like to bypass some classical assembly scanning techniques in a framework I am developing. So, say I've defined the following contract: public interface IModule { } This exists in say Contracts.dll. Now, if I want to discover all…
Matthew Abbott
  • 60,571
  • 9
  • 104
  • 129
17
votes
2 answers

How can I do an Entity Framework Core project and add a Migration in Visual Studio 2015 from nuget prompt?

In Visual Studio 2015, I created an ASP.net Core project (formerly called ASP.NET 5). The template for the project creates an MS SQL localdb for persistence, along with entity framework, and some authentication tables. After I figured out how to…
Warren P
  • 65,725
  • 40
  • 181
  • 316
17
votes
4 answers

MVC 6 install as a Windows Service (ASP.NET Core 1.0.0)

UPDATE - 26th July 2016 I have added the solution to this in ASP.NET Core 1.0.0 in the answers below. I have created a simple MVC 6 app and have included the Microsoft.AspNet.WebListener library so I can host outside of IIS. From…
JDTLH9
  • 1,765
  • 1
  • 23
  • 34
16
votes
1 answer

How do you reference the executing assembly in DNX Core 5.0 (ASP.NET 5)?

I am porting some code from .NET 3.5 - 4.5. Inside of my assembly, I have some code that reads the resource from the currently executing assembly. However, GetExecutingAssembly() isn't a method on the Assembly type in DNX core 5.0. var xsdStream =…
NightOwl888
  • 55,572
  • 24
  • 139
  • 212
16
votes
2 answers

NoWarn not working in DNX

In my test project, I've got private fields that are not assigned to in the code, but are assigned with reflection. When compiling I get warnings like: Warning CS0649 Field 'CLASSNAME.FIELDNAME' is never assigned to, and will always have its…
Allrameest
  • 4,364
  • 2
  • 34
  • 50
15
votes
3 answers

DNX beta8-15530 : Could not load file or assembly 'Microsoft.DNX.PackageManager'

I have run this command in Package Manager Console to upgrade the dnx. "dnvm upgrade -u default" Once It's get update, I can see(C:\Users\Chandrasekar.dnx\runtimes) the new runtime version as mention below "dnx-clr-win-x86.1.0.0-beta8-15530" I…
14
votes
1 answer

VS 2015: Profiling tools disabled in Performance Wizard

I want to sample the performance of our application, but the various tools (such as CPU Usage and Application Timeline) are not available when trying to start a new profiling session with the Performance Wizard: I am using Visual Studio 2015…
Dave New
  • 38,496
  • 59
  • 215
  • 394
14
votes
1 answer

Visual Studio Code: Failed to launch external program dotnet

Visual Studio Code 1.0.0 Mac OS X 10.11.4 DNX is installed and I can run .NET Core application from terminal. Getting the following error when try to run .NET Core project. Output window: Failed to launch external program dotnet . spawn dotnet…
Alexey
  • 732
  • 7
  • 18
14
votes
5 answers

xUnit.net v2 not discovering .NET Core Tests in Visual Studio 2015

I am really frustrated with this issue. I have already tried changing the version numbers but no tests are showing in the test explorer. In the test output window I can see this output Starting Microsoft.Framework.TestHost…
Sul Aga
  • 6,142
  • 5
  • 25
  • 37
14
votes
5 answers

How to setup a TeamCity build for a ASP.NET 5 project

I'm trying to setup a CI server for a website that I'm developing, but I can't find any info regarding how to do it with the new ASP.NET 5.
edua_glz
  • 1,177
  • 2
  • 12
  • 23
13
votes
3 answers

ValidateAntiForgeryToken in Ajax request with AspNet Core MVC

I have been trying to recreate an Ajax version of the ValidateAntiForgeryToken - there are many blog posts on how to do this for previous versions of MVC, but with the latest MVC 6, none of the code is relevant. The core principle that I am going…
drovani
  • 928
  • 1
  • 17
  • 37
13
votes
2 answers

How to create instance of a class and inject services?

New aspnet has in-build dependency injection: Startup class instance receives services, controllers, view components do. Is there any way for me to create object of my class and pass services using aspnet functionality? Something…
FLCL
  • 2,445
  • 2
  • 24
  • 45
1 2
3
47 48