FAQ Database Discussion Community


DNX Core 5.0 library to target any platform. No System.Random class. Workarounds or options?

visual-studio-2015,dnx,.net-core
I am trying out the Visual Studio 2015 RC project template for creating a class library that can target any platform says Visual Studio. A new project has 2 references: DNX 4.5.1 and DNX Core 5.0. It appears that System.Random is not available in DNX Core 5.0. (The same is...

Is there anyway making ADO.NET work on .NET Core?

ado.net,odp.net,.net-core
I need ODP.NET (Oracle Data Providers for .NET) on .NET Core but can't find anyway to make it work. When I reference OracleConnection or OracleCommand classes, the project needs System.Data assembly which I can't find in .NET Core. So isn't there any solution to use ADO.NET on .NET Core?...

System.Environment in .NET Core

c#,.net,.net-core
Does anybody knows how to get information about current environment and platform in .NET Core? Currently there are no Environment class in Core library. ...

What are my options for sharing code between DNX / ASP.NET 5 projects (project.json / xproj) and other C# projects (csproj) within a single solution?

.net,asp.net-5,dnx,.net-core
Scenario I'm experimenting with Visual Studio 2015 RC, specifically looking at switching to the new ASP.NET 5 framework, project structure and the new DNX that runs ASP.NET 5 applications. My employer has many existing solutions targeting .NET Framework 4.5.2. In our existing Visual Studio solutions we might have the following...

Microsoft Band and WPF

.net,wpf,dll,microsoft-band,.net-core
I have downloaded the sample code for Band SDK for Windows. Then I added a new WPF project and grabbed the latest SDK through Nuget (Version 1.3.10518.1). Now under packages\Microsoft.Band.1.3.10518\lib, the following folders are contained: netcore451 portable-net45+win+wpa81 portable-win81+wpa81 wpa81 Now as I need .NET 4.5 support I have referenced the...

Class library that can be shared between .NET Framework and .NET Core

asp.net,.net,asp.net-5,.net-core
I have a big class library written in .NET 4.0 but when I reference it in a Store App that uses .NET Core, it shows an error. And further, Microsoft just released .NET Core for the next version of .NET. I want to know what type of project will be...

How to use WebClient with .NetCore?

c#,.net,.net-core
Is there any way to use a WebClient in a .NET Core application? If I build the application I get the following error: Severity Code Description Project File Line Error CS0246 The type or namespace name 'WebClient' could not be found (are you missing a using directive or an assembly...

Is there anyway to use Entity Framework in .NET Core?

c#,asp.net,entity-framework,.net-core
I've just changed to the new ASP.NET 5 platform. I use visual studio code as my default IDE, and DNX for execution. .NET Core is now by default but I need to switch to .NET Framework always I want to reference the System.Data.Entity namespace or the TodoContext class. Is there...

NLog with DNX Core 5.0

dnx,.net-core
I am attempting to implement NLog logging using ASP.Net 5 and MVC 6. Be default, both DNX 451 and DNX Core 50 are included in the project template. I am attempting to implement NLog Logging by following the example here. However, in the sample app, there is the following line...

dnu restore fails on mac

asp.net-5,vscode,.net-core
I download visual studio code for mac today. I tried to create a simple asp.net 5 web application following these instructions https://code.visualstudio.com/Docs/ASPnet5 When I open my web application folder in visual studio, it says I need to run a restore command. I ran the dnu restore command just like the...

.NET 4.5.1 versus .NET Core 5

c#,.net,.net-core
We want to use the "vNext" technology in our next project. For me it looks like we can only use the framework version 4.5.1 when we rely on libraries like Serilog or mongoDB that have dependencies on older Framework Versions. Is this really true or is there a way to...

Run ASP.NET 5 (MVC 6) using .NET Core on IIS

asp.net,iis,asp.net-5,.net-core
I have just created a quick ASP.NET 5 MVC 6 app on Visual Studio.NET 2015 RC and would like it to run on my IIS web server on Windows 7. Normally, when I create a website on IIS, I need to choose an Application Pool, either v2.0 or v4.0 Integrated....

Can I use roslyn and the new .net project format to create classes on build?

c#,.net,asp.net-5,roslyn,.net-core
I have a project using the new .net project format (dnx and project.json, currently using dnvm with mono-1.0.0-beta4, eventually want to use coreclr once they get dnu restore working on *NIX). One of the common problems that I have with .net/C# is the desire to create code at compile time....

How should I reference HttpClient for dnx451 and dnxcore50?

c#,.net,asp.net-5,dotnet-httpclient,.net-core
How should I reference HttpClient using a project.json file? I want both frameworks to work: dnx451 and dnxcore50. Here is my current attempt at the project.json file. (I've removed the irrelevant parts.) { "dependencies": { "Microsoft.Net.Http": "2.2.29", "Microsoft.Net.Http.Headers": "1.0.0-beta4", "System.Net.Http": "4.0.0-beta-22816" }, "frameworks": { "dnx451": { "frameworkAssemblies": { "System.Net.Http": "4.0.0.0"...

Mscorlib not referenced in Asp.Net 5 Class Library

c#,asp.net-5,visual-studio-2015,.net-core
I am trying to port a library to ASP.NET CORE but am struggleing to get Visual Studio referencing all important parts. I noticed that the mscorlib is only added to the references under ASP.NET 5.0 but not under ASP.NET CORE. Under both frameworks i am not getting base types like...