Kestrelhttpserver: Update readme.md to build KestrelHttpServer and point sample app to it

Created on 3 Dec 2016  路  13Comments  路  Source: aspnet/KestrelHttpServer

The document need to be updated to capture at least:

  1. How to build the KestrelHttpServer after this repo is cloned locally.
  2. How to point the sample LargeResponseApp/ SampleApp to the compiled binaries from the step 1.

Having this for Windows and Mac would be a nice start

All 13 comments

It does this by default if you just open up the project(s) in any editor, VS code, or VS. Did you have problems?

I tried on VS2017 from Windows 2012 server, the project does not build.
So, tried to build from the command line; but it throws error related to DMX.
Now, uninstalling VS2017...

On Mac and Ubuntu couldn't get the build via VS Code (does VSCode has a build menu option?). However, command line does work fine here; but when the sample applications is run, I suspect it is not using the KestrelHttpServer instance that I just compiled.

None of the asp.net core projects work with 2017. They are all still using project.json

If you run the sample, it's using the kestrel you just built, it's a project reference....

Cool, thank you. Can you please point me the code (project definition) part, I'm curious to know how this is done (or happens).

How what is done? Project references?

I can see the reference set here, but there is no path reference to say it to use the local instance of KestrelHttpServer.

So, it seems I'm looking at the wrong place :)

@suryagh you are looking for the global.json

With project.json projects are preferred over packages. Projects are either sibling folders of the same name or folders in the projects path declared in global.json https://github.com/aspnet/KestrelHttpServer/blob/dev/global.json#L3

I see. Will this work if I run the sample app like:

~/fork/KestrelHttpServer/samples/SampleApp$ dotnet run

Note: my current directory is .../samples/SampleApp

Does the global.json takes affect here?

The global.json is found based on directory hierarchy. So yes, the project system walks up the tree until it finds a global.json or nothing (from the current project, not the working directory).

@davidfowl is this the right command to run the tests?

/fork/KestrelHttpServer/test/Microsoft.AspNetCore.Server.KestrelTests$ dotnet run

Did this after the dotnet restore (on a Ubuntu box), but getting the following error:

Project Microsoft.AspNetCore.Server.Kestrel (.NETStandard,Version=v1.3) was previously compiled. Skipping compilation.
Project Microsoft.AspNetCore.Server.Kestrel.Https (.NETStandard,Version=v1.3) was previously compiled. Skipping compilation.
Project Microsoft.AspNetCore.Server.KestrelTests (.NETCoreApp,Version=v1.1) was previously compiled. Skipping compilation.
The specified framework 'Microsoft.NETCore.App', version '1.1.0' was not found.
  - Check application dependencies and target a framework version installed at:
      /usr/share/dotnet/shared/Microsoft.NETCore.App
  - The following versions are installed:
      1.0.0
  - Alternatively, install the framework version '1.1.0'.

I think you have to

sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177

for 1.1

(from https://www.microsoft.com/net/core#linuxubuntu )

Was this page helpful?
0 / 5 - 0 ratings