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

Nancy generator is outdated #67

Closed
joaomoreno opened this issue Feb 18, 2015 · 16 comments
Closed

Nancy generator is outdated #67

joaomoreno opened this issue Feb 18, 2015 · 16 comments

Comments

@joaomoreno
Copy link

I used this generator to scaffold a Nancy application. I ended up with something that could be run (k kestrel) but not built (kpm restore; kpm build). It couldn't find the Nancy namespace when building.

I looked at @jchannon's generator-nancy and tried it out. It produced a seemingly healthier scaffold which I can both run and build successfully.

Why not incorporating generator-nancy into this project?

@jchannon
Copy link
Member

Pretty sure the dependencies are exactly the same so would be interested to
know what the diffs are

On 18 February 2015 at 10:03, João Moreno [email protected] wrote:

I used this generator to scaffold a Nancy application. I ended up with
something that could be run (k kestrel) but not built (kpm restore; kpm
build). It couldn't find the Nancy namespace when building.

I looked at @jchannon https://github.com/jchannon's generator-nancy
https://github.com/jchannon/generator-nancy and tried it out. It
produced a seemingly healthier scaffold which I can both run and build
successfully.

Reply to this email directly or view it on GitHub
#67.

@joaomoreno
Copy link
Author

It seems to only be in the project.json:

diff aspnet-nancy/project.json nancy-nancy/project.json
3,5c3,5
<         "Kestrel": "1.0.0-alpha4",
<         "Microsoft.AspNet.Owin": "1.0.0-alpha4",
<         "Nancy": "1.0.0"
---
>         "Kestrel": "1.0.0-*",
>         "Microsoft.AspNet.Owin": "1.0.0-alpha2",
>         "Nancy": "0.23.2"
11,12c11,13
<         "aspnet50": {},
<         "aspnetcore50": {}
---
>         "aspnet50": {
>             "System.Runtime": ""
>         }

@jchannon
Copy link
Member

hmm, baffled,

@joaomoreno
Copy link
Author

I take it back. Both templates have something broken. I cannot run the template generated by generator-nancy.

➜  NancyApp git:(master) k kestrel
System.InvalidOperationException: No service for type 'Microsoft.Framework.Runtime.IServiceManifest' 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[IServiceManifest] (IServiceProvider provider) [0x00000] in <filename unknown>:0
  at Microsoft.AspNet.Hosting.HostingServices.Import (IServiceProvider fallbackProvider) [0x00000] in <filename unknown>:0
  at Microsoft.AspNet.Hosting.HostingServices.Create (IServiceProvider fallbackServices, IConfiguration configuration) [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

In summary: I cannot build the one generated by generator-aspnet and cannot run the one generated by generator-nancy.

@jchannon
Copy link
Member

what version of kre do you have?

On 18 February 2015 at 10:32, João Moreno [email protected] wrote:

I take it back. Both templates have something broken. I cannot run the
template generated by generator-nancy
https://github.com/jchannon/generator-nancy.

➜ NancyApp git:(master) k kestrel
System.InvalidOperationException: No service for type 'Microsoft.Framework.Runtime.IServiceManifest' has been registered.
at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService (IServiceProvider provider, System.Type serviceType) [0x00000] in :0
at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService[IServiceManifest](IServiceProvider provider) [0x00000] in :0
at Microsoft.AspNet.Hosting.HostingServices.Import (IServiceProvider fallbackProvider) [0x00000] in :0
at Microsoft.AspNet.Hosting.HostingServices.Create (IServiceProvider fallbackServices, IConfiguration configuration) [0x00000] in :0
at Microsoft.AspNet.Hosting.Program.Main (System.String[] args) [0x00000] in :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 :0


Reply to this email directly or view it on GitHub
#67 (comment)
.

@joaomoreno
Copy link
Author

➜  NancyApp  kvm list

Active Version              Runtime Location             Alias
------ -------              ------- --------             -----
  *    1.0.0-beta2          mono    ~/.k/runtimes        default
       1.0.0-beta3-11030    mono    ~/.k/runtimes

@jchannon
Copy link
Member

same as me

On 18 February 2015 at 10:38, João Moreno [email protected] wrote:

➜ NancyApp kvm list

Active Version Runtime Location Alias


  • 1.0.0-beta2 mono ~/.k/runtimes default
    1.0.0-beta3-11030 mono ~/.k/runtimes


Reply to this email directly or view it on GitHub
#67 (comment)
.

@joaomoreno
Copy link
Author

You don't see any difference when generating from both templates?

@jchannon
Copy link
Member

Ah I get a failure on kpm build with aspnet generator. Hmmm

On 18 February 2015 at 11:04, João Moreno [email protected] wrote:

You don't see any difference when generating from both templates?

Reply to this email directly or view it on GitHub
#67 (comment)
.

@sayedihashimi
Copy link
Member

I think there may be an issue with the Nancy generator in aspnet. I was thinking to update all templates to work with beta3 once it gets released.

@peterblazejewicz
Copy link
Member

x-ref: #60
x-ref: #59 specifically: #59 (comment)

@larsw
Copy link
Contributor

larsw commented Feb 24, 2015

#69 should now solve this.

@spboyer
Copy link
Contributor

spboyer commented Feb 27, 2015

Nancy templates updated and publish in v 0.0.31, tested and built with beta3

@peterblazejewicz
Copy link
Member

👏 does work. It builds, thanks!

@sayedihashimi
Copy link
Member

Thanks everyone, closing now since its released

@joaomoreno
Copy link
Author

Verified that I can run (k kestrel) and build (kpm build) the new release.

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

No branches or pull requests

6 participants