dnx

Entity Framwork 7 reverse engineer from existing db “code first”

寵の児 提交于 2019-12-04 16:59:57
I can't figure out how to pass the connection string parameter in the latest version of dnx... trying dnx ef dbcontext scaffold -connection='sql connection string' but it doesn't recognize the -connection parameter .. how are you supposed to pass arguments into the thing? Have you tried: dnx ef dbcontext scaffold "sql connection string" EntityFramework.MicrosoftSqlServer 来源: https://stackoverflow.com/questions/32377984/entity-framwork-7-reverse-engineer-from-existing-db-code-first

Using custom property types in Azure Tables with ASP.NET 5 DNX Core

孤街醉人 提交于 2019-12-04 16:05:43
Azure Table Storage does not support many property types (List<>, TimeSpan, etc). There are solutions like Lucifure Stash and Lokad.Cloud, but they are not compiling for DNX Core 5.0. Is there a way to add support for custom property types in Azure Tables with DNX Core? One solution is to use reflection to iterate through all the “custom” properties of the entity and serialize them to JSON strings. We can override TableEntity’s ReadEntity and WriteEntity methods to hook de-/serialization: using System; using System.Linq; using System.Reflection; using System.Collections.Generic; using

Unable to use System.Net.Utilities with DNX 4.5.1

旧时模样 提交于 2019-12-04 15:54:42
first post and complete C#, DNX, ASP.net noob so please be nice. I'm having trouble building my ASP.net 5.0 project using DNX 4.5.1. My project.json file contains the following: { "version": "1.0.0-*", "compilationOptions": { "emitEntryPoint": true }, "tooling": { "defaultNamespace": "PingTest1" }, "dependencies": { "Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final", "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", "Microsoft.AspNet.Mvc": "6.0.0-rc1-final", "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final", "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", "Microsoft.AspNet

dotnet restore keeps using local project instead of nuget package

这一生的挚爱 提交于 2019-12-04 14:32:17
问题 I have a .NET-core project in Visual Studio 2015. In it, I used a Nuget package, but after finding a bug in the package, I checked out its source code and included the library project into my solution to debug the issue. After successfully resolving the problem I sent the fix upstream, it was accepted and a new Nuget package version was released. So I went, removed the library project from my solution and intended to update the package to the fixed version to continue working on my project.

Make local TFS build agent to use v14 msbuild tools

喜夏-厌秋 提交于 2019-12-04 11:36:18
I've got a couple of ASP.NET vNext applications and I want my CI server to also be able to build them. Both my local machine and the CI server are running VS2015 RC. Then we've got VS Online and a local build controller - which is the server mentioned. However, I cannot get builds going since it seems to be looking for v12 tooling - which does not include anything DNX. So - building the solution gives: The Dnx Runtime package needs to be installed. See output window for more details It is installed - since it came with VS2015 RC, AFAIK. So I thought the build template isn't using v14 tooling.

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

a 夏天 提交于 2019-12-04 09:02:47
问题 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 project.json: "dependencies": { "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4", "Microsoft.AspNet.Mvc": "6.0.0-beta4" }, "commands": { "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000" } When I

Cannot Run DNX Console Applications

☆樱花仙子☆ 提交于 2019-12-04 05:37:06
I am having trouble running a simple console test app using the dnx command line. I know this is an evolving technology at the moment but I would like to get this going for my own sanity. Here is the program: using System; public class Program { public void Main(string[] args) { Console.WriteLine("Foo"); Console.ReadLine(); } } This is the DNVM List Active Version Runtime Architecture Location Alias ------ ------- ------- ------------ -------- ----- * 1.0.0-beta4 clr x64 C:\Users\Tim\.dnx\runtimes 1.0.0-beta4 clr x86 C:\Users\Tim\.dnx\runtimes 1.0.0-beta4 coreclr x64 C:\Users\Tim\.dnx\runtimes

Image as resource in Asp.Net 5 class library

一个人想着一个人 提交于 2019-12-04 03:39:51
问题 In .net 4.5 i was able to add a resource file to my project, add images as bitmaps to this resource file and access them by Properties.Resources.ImageName. How do i compile images in 4.6 dnx? Thanks in advance! 回答1: You can specify the files that will be compiled into the assembly under the "resources" section in project.json, like so: "resources": [ "path/to/yourfile.png" ], After which, assuming your project's name is YourProject, the file can be accessed via: const string path =

Visual Studio 2015 Test Explorer does not see XUnit dnx traits

别来无恙 提交于 2019-12-04 03:04:09
问题 The Visual Studio 2015 Test Explorer does not recognize my test traits. When I add this to a test in a DNX project: [Trait("Category", "Test")] the test still shows up in the Test Explorer under the No Traits group (when grouping tests by Traits). 回答1: Looks like this is already logged as an issue: VS 2015 Bugs - Traits and Project Grouping in Test Explorer #485 来源: https://stackoverflow.com/questions/32258618/visual-studio-2015-test-explorer-does-not-see-xunit-dnx-traits

ASP.NET 5 behind nginx

徘徊边缘 提交于 2019-12-04 02:23:57
I have a ASP.NET 5 MVC6 application behind a Nginx server that acts as a reverse proxy. Its configuration is : server { listen 80; server_name example.com; location / { proxy_pass http://localhost:5000; client_max_body_size 50M; proxy_set_header Host $host; } } It was working very well on Linux until the ASP.NET 5 RC1. Since then, and on Windows before that, the requests to MVC 6 controllers would fail: I see the response but the browser continues to load as if the response was not complete (static files are served correctly). A direct request to http://localhost:5000/api/xxx responds and