Skip to content
This repository was archived by the owner on Feb 13, 2019. It is now read-only.

Update Empty web application template for beta5 #196

Merged

Conversation

peterblazejewicz
Copy link
Member

This commit update template files for Empty web application:

  • new hosting.ini file added to project
  • the test for Empty web application is updated to check for hosting.ini
  • project file updated to beta5 structure
  • the readme.md is fully updated and based on VS generated readme html

This PR passes npm test, creates a project which OmniSharp in Atom compiles and locks. I've a problem with restoring it (as other projects) as I have to reconfigure my machine though.
The PR should be ready to test againts local installation of beta5.

Thanks!

@sayedihashimi
Copy link
Member

@peterblazejewicz when running dnx . kestrel I get the following error

Sayeds-MacBook-Pro:EmptyApplication sayedhashimi$ dnx . kestrel
System.InvalidOperationException: No service for type 'Microsoft.Framework.Runtime.IApplicationEnvironment' has been registered.
  at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService (IServiceProvider provider, System.Type serviceType) [0x00000] in <filename unknown>:0
  at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService[IApplicationEnvironment] (IServiceProvider provider) [0x00000] in <filename unknown>:0
  at Microsoft.AspNet.Hosting.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0

Are you getting the same error?

@peterblazejewicz
Copy link
Member Author

@sayedihashimi
I've different problems:
dnu build fails with 15 errors:
https://gist.github.com/peterblazejewicz/c111e5243a76cf560c4e
dnx . kestrel fails with different error:
https://gist.github.com/peterblazejewicz/145f95496fd8162cf422
I've updated dnvm to beta5:

dnvm
    ___  _  ___   ____  ___
   / _ \/ |/ / | / /  |/  /
  / // /    /| |/ / /|_/ / 
 /____/_/|_/ |___/_/  /_/  

.NET Version Manager - Version 1.0.0-beta5-10378
By Microsoft Open Technologies, Inc.

DNVM can be used to download versions of the .NET Execution Environment and manage which version you are using.
You can control the URL of the stable and unstable channel by setting the DNX_FEED and DNX_UNSTABLE_FEED variables.

Current feed settings:
Default Stable: https://www.nuget.org/api/v2
Default Unstable: https://www.myget.org/F/aspnetvnext/api/v2

@danroth27
Copy link

Please try out the candidate beta5 packages from https://www.myget.org/f/aspnetbeta5/api/v2.

For the Kestrel issue, why is WebListener showing up in the stack? Is your kestrel command setup correctly?

@sayedihashimi
Copy link
Member

I chatted with @danroth27 and @rustd they will investigate and get back to us. There is an issue with how kestrel is configured.

@peterblazejewicz peterblazejewicz force-pushed the update/empty-project branch 3 times, most recently from 6f85922 to 1a6e3f4 Compare June 20, 2015 18:34
@peterblazejewicz
Copy link
Member Author

The PR is update according to @rustd input (package, hosting, etc), rebased and squashed. The local tests are updated and pass:

aspnet - Empty Application
    Checking directories
      ✓ Application directory created
      ✓ wwwroot directory created
    Checking files
      ✓ emptyTest/hosting.ini created.
      ✓ emptyTest/project.json created.
      ✓ emptyTest/Startup.cs created.
      ✓ emptyTest/wwwroot/README.md created.

The restore passes:
https://gist.github.com/peterblazejewicz/0eeea6995ca98cc64253
While build and kestrel fail:
https://gist.github.com/peterblazejewicz/443160032dc4f4e941aa
https://gist.github.com/peterblazejewicz/642e7aded8eda68c2b64

This commit update template files for Empty web application:
- new hosting.ini file added to project
- the test for Empty web application is updated to check for hosting.ini
- project file updated to beta5 structure
- the readme.md is fully updated and based on VS generated readme html
@danroth27
Copy link

@BrennanConroy @glennc

@sayedihashimi sayedihashimi merged commit 863fa3f into OmniSharp:beta5 Jun 21, 2015
@sayedihashimi
Copy link
Member

Thanks @peterblazejewicz I've merged it.

I was able to build and run w/o errors. If you are still having errors try the following:

  • delete packages folder in ~/.dnx/packages
  • set dnvm to beta5
  • restore packages with dnu restore -f https://nuget.org/api/v2
  • build and run

Note: I am still unable to stop kestrel on Mac such that the port is released. The only way I found to close kestrel is with CTRL+Z and that keeps the port in use. See my previous comment #191 (comment)

@peterblazejewicz peterblazejewicz deleted the update/empty-project branch June 21, 2015 09:26
@BrennanConroy
Copy link

CTRL+Z will move the process to the background so it will continue to exist. @halter73 is working on Kestrel and knows about kestrel not exiting.

@sayedihashimi
Copy link
Member

So it will be fixed for beta5?

@sayedihashimi
Copy link
Member

Also is there an issue tracking this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants