dnx

dnx kestrel “System.EntryPointNotFoundException: uv_loop_size”

三世轮回 提交于 2019-12-22 05:30:21
问题 I'm trying to run an unmodified Web Api application created by yo aspnet. I'm getting this error: System.EntryPointNotFoundException: uv_loop_size at (wrapper managed-to-native) Microsoft.AspNet.Server.Kestrel.Networking.Libuv+NativeDarwinMonoMethods:uv_loop_size () at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.loop_size () <0x42615b8 + 0x00014> in <filename unknown>:0 at Microsoft.AspNet.Server.Kestrel.Networking.UvLoopHandle.Init (Microsoft.AspNet.Server.Kestrel.Networking.Libuv uv)

How to consistently get application base path for ASP.NET 5 DNX project on both production and development environment?

那年仲夏 提交于 2019-12-22 03:40:54
问题 I have deployed a ASP.NET MVC 6 website to Azure from Git. Details of the deployment can be found in this blog post but basically I use DNU to publish it and then kudu to push it to an Azure website. Using IHostingEnvironment I get the ApplicationBasePath. The problem is that the paths I get back are very different on localhost and on Azure. Azure: "D:\home\site\approot\src\src" Localhost: "C:\Users\deebo\Source\mysite\site\src" I want to use the base path to get the full path to a folder

How to consistently get application base path for ASP.NET 5 DNX project on both production and development environment?

给你一囗甜甜゛ 提交于 2019-12-22 03:40:04
问题 I have deployed a ASP.NET MVC 6 website to Azure from Git. Details of the deployment can be found in this blog post but basically I use DNU to publish it and then kudu to push it to an Azure website. Using IHostingEnvironment I get the ApplicationBasePath. The problem is that the paths I get back are very different on localhost and on Azure. Azure: "D:\home\site\approot\src\src" Localhost: "C:\Users\deebo\Source\mysite\site\src" I want to use the base path to get the full path to a folder

VS 2015: Profiling tools disabled in Performance Wizard

a 夏天 提交于 2019-12-22 03:22:37
问题 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 Professional. The application is using ASP.NET 5 RC1 and is running from Kestrel (not IIS). Why could this be happening? 回答1: As a workaround, you can use the "Diagnostic Tools" panel when debugging, it has a CPU profiler built in. 来源: https:/

Unable to use System.Net.Utilities with DNX 4.5.1

…衆ロ難τιáo~ 提交于 2019-12-21 23:07:15
问题 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

Cannot Run DNX Console Applications

こ雲淡風輕ζ 提交于 2019-12-21 12:41:16
问题 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

ASP.NET 5 behind nginx

删除回忆录丶 提交于 2019-12-21 07:56:25
问题 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

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

隐身守侯 提交于 2019-12-21 07:06:28
问题 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 = Assembly.GetExecutingAssembly().GetManifestResourceStream(xsdPath); What is the equivalent of Assembly.GetExecutingAssembly() in DNX core 5.0? Or if I need a namespace to get that method back (an extension method perhaps?), what is the namespace?

.NET Core: How to use csproj-based projects alongside project.json?

旧街凉风 提交于 2019-12-21 04:41:11
问题 Is there a (preferably convenient) way to setup a C# project such that it uses both the project.json-based format introduced with .NET Core, and a traditional csproj project file? If so, how? I'm curious because it appears this is what they do in the CoreFX repo, instead of using the xproj-based format that is generated by Visual Studio. 回答1: Aha! It looks like I found the answer by myself in Visual Studio. Instead of creating a Class Library (Package) project (which may be tempting because

Getting interface implementations in referenced assemblies with Roslyn

倾然丶 夕夏残阳落幕 提交于 2019-12-20 10:36:11
问题 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 implementations of this interface, we would probably do something similar to the following: public IEnumerable<IModule> DiscoverModules() { var contractType = typeof(IModule); var assemblies = AppDomain.Current.GetAssemblies() // Bad but will do var types =