Questions tagged [coreclr]

CoreCLR is new .NET Core runtime. It is an execution engine for .NET apps, performing functions such as IL byte code loading, compilation to machine code and garbage collection.

Source repo: https://github.com/dotnet/coreclr

301 questions
23
votes
1 answer

IsGenericType & IsValueType missing from .Net Core?

I have this code in .Net 4.6.2 and now trying to convert into .Net core however I am getting error Error CS1061 'Type' does not contain a definition for 'IsGenericType' and no extension method 'IsGenericType' accepting a first argument of type…
LP13
  • 20,711
  • 38
  • 136
  • 286
22
votes
3 answers

ResponseCache attribute does not cache data on client side

In ASP.NET Core application I have a action method that returns some data. I wanted to cache this data on client side. So based on the documentation here i can use ResponseCache attribute on the action method. This attribute adds Cache-Control…
LP13
  • 20,711
  • 38
  • 136
  • 286
22
votes
2 answers

Unsafe code compilation error in .NET Core even after setting allowunsafe flag to true in project.json

I am using some unsafe code in my .NET Core app. For that, I had made this change in the project.json file: "compilationOptions": { "allowUnsafe": true, } However, I still get the error CS0227: Unsafe code may only appear if compiling with…
User1234
  • 1,341
  • 3
  • 17
  • 30
22
votes
6 answers

How to remove previous versions of .NET Core from Linux (CentOS 7.1)

I would like to install the current version Core 1.0. Currently the RC2 version is installed. The instruction on the official website are: Before you start, please remove any previous versions of .NET Core from your system. But I don't know how…
stevo
  • 1,734
  • 3
  • 18
  • 32
21
votes
2 answers

How to configure multiple ASPNETCORE_ENVIRONMENT on same machine?

I have ASP.NET core web application. I have configured the web application on our web server and set the ASPNETCORE_ENVIRONMENT variable to Development. I set this variable at machine level like shown in the picture below. Now on the same machine i…
LP13
  • 20,711
  • 38
  • 136
  • 286
20
votes
1 answer

HashAlgorithms in CoreCLR

I'm trying use this class in my coreclr project but I can't seem to find the correct package for SHA256Managed. I have tried using System.Security.Cryptography.Algorithms": "4.0.0-beta-23409" but it doesn't contain the implementation of…
Per
  • 1,031
  • 7
  • 11
18
votes
1 answer

How to register an instance to the ServiceCollection in ASP.NET Core 1.0 RC2

I'm migrating my web app from ASP.NET Core RC1 to RC2. In RC2 the IServiceCollection doesn't have the AddInstance method anymore. How do I get the Configuration registered? Here how it was done in RC1 public class Startup { public IConfiguration…
stevo
  • 1,734
  • 3
  • 18
  • 32
16
votes
2 answers

MemoryCache.Default not available in .NET Core?

I'm porting some code from .NET 4.6 til .NET Core and have run into some problems with MemoryCache. The 4.6 code is using MemoryCache.Default to instantiate the cache, but this doesn't seem to be available in .NET Core. Is there any equivalent to…
henningst
  • 1,476
  • 2
  • 16
  • 30
15
votes
1 answer

CLR vs Core CLR

I understand that CLR in its current state is bound to windows OS and provides various services by using Win32 APIs internally. Since .NET Core is platform independent, this basically implies the same IL code can run on different OS. Is CoreCLR OS…
rahulaga_dev
  • 2,985
  • 4
  • 21
  • 38
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…
13
votes
3 answers

Referencing Library in ASP.NET Core 1.0 (vNext)

I am learning ASP.NET Core 1.0 (vNext). With that in mind, I have a solution that is structured like this: MySolution src MyLibrary MyClass.cs project.json MyWebSite Startup.cs project.json I am successfully…
Some User
  • 3,779
  • 8
  • 39
  • 75
13
votes
3 answers

How to change default dnx version is Visual Studio Code?

I am not sure if it is possible but I want to change dnx version when dnx . run from Visual Studio Code. Even if my current dnx version is 1.0.0-beta5-11682 coreclr Visual Studio Code runs with 1.0.0-beta4 mono Is it possible to change default dnx…
Arda
  • 395
  • 4
  • 14
13
votes
2 answers

CoreCLR and project Mono relationship after Microsoft open-sourced the .NET

Could someone explain to me what is the current relationship between Mono and the open source/Linux portable .NET stack (CoreCLR, CoreFX, Roslyn, ASP.NET) recently made available by Microsoft? It's rather clear these projects overlap so I'm…
nightwatch
  • 1,236
  • 2
  • 17
  • 27
12
votes
1 answer

Typeconverter does not work in asp.net core

I have Amount stored in the database as decimal. I want to show that value on UI with thousand separator. I can add [DisplayFormat(DataFormatString = "{0:N2}", ApplyFormatInEditMode = true)] attribute on amount property and that would display number…
LP13
  • 20,711
  • 38
  • 136
  • 286
12
votes
1 answer

How to inject WCF service client in ASP.Net core?

I have WCF service that I need to access from ASP.NET Core. I have installed WCF Connected Preview and created proxy successfully. It created interface & client something like below …
LP13
  • 20,711
  • 38
  • 136
  • 286
1
2
3
20 21