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

Nancy Generator creates a broken project for ASP.NET vNext #553

Closed
shawty opened this issue Jan 10, 2016 · 20 comments
Closed

Nancy Generator creates a broken project for ASP.NET vNext #553

shawty opened this issue Jan 10, 2016 · 20 comments

Comments

@shawty
Copy link

shawty commented Jan 10, 2016

Hi all,

Just dipping my toes into ASP.NET 5 using MsCode, by following this tutorial:

http://www.codeproject.com/Tips/1067038/Getting-Up-and-Running-with-ASP-NET-using-VS-Code

Being the massive NancyFX nut that I am, I decided to try a Nancy project, but I cant seem to get it to work.

I have all the various req's, npm, node, git and I've set up the dnx/vnext command line environment.

C:\Users\shawty\aspnet5demo\NancyTest>dnvm list

Active Version           Runtime Architecture OperatingSystem Alias
------ -------           ------- ------------ --------------- -----
  *    1.0.0-rc1-update1 clr     x86          win             default
       1.0.0-rc1-update1 coreclr x64          win

C:\Users\shawty\aspnet5demo\NancyTest>

A dnu restore command pulled down all the required dependencies, and a dnu build, produced the following:

C:\Users\shawty\aspnet5demo\NancyTest>dnu build
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16231


Building NancyTest for DNX,Version=v4.5.1
  Using Project dependency NancyTest 1.0.0
    Source: C:\Users\shawty\aspnet5demo\NancyTest\project.json

  Using Package dependency Microsoft.AspNet.FileProviders.Abstractions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.FileProviders.Abstractions\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.FileProviders.Abstractions.dll

  Using Package dependency Microsoft.AspNet.FileProviders.Physical 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.FileProviders.Physical\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.FileProviders.Physical.dll

  Using Package dependency Microsoft.AspNet.Hosting 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.Hosting\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.Hosting.dll

  Using Package dependency Microsoft.AspNet.Hosting.Abstractions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.Hosting.Abstractions\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.Hosting.Abstractions.dll

  Using Package dependency Microsoft.AspNet.Hosting.Server.Abstractions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.Hosting.Server.Abstractions\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.Hosting.Server.Abstractions.dll

  Using Package dependency Microsoft.AspNet.Http 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.Http\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.Http.dll

  Using Package dependency Microsoft.AspNet.Http.Abstractions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.Http.Abstractions\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.Http.Abstractions.dll

  Using Package dependency Microsoft.AspNet.Http.Extensions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.Http.Extensions\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.Http.Extensions.dll

  Using Package dependency Microsoft.AspNet.Http.Features 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.Http.Features\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.Http.Features.dll

  Using Package dependency Microsoft.AspNet.Owin 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.Owin\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.Owin.dll

  Using Package dependency Microsoft.AspNet.Server.Kestrel 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.Server.Kestrel\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.Server.Kestrel.dll

  Using Package dependency Microsoft.AspNet.WebUtilities 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.AspNet.WebUtilities\1.0.0-beta8
    File: lib\dnx451\Microsoft.AspNet.WebUtilities.dll

  Using Package dependency Microsoft.Dnx.Compilation.Abstractions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Dnx.Compilation.Abstractions\1.0.0-beta8
    File: lib\dnx451\Microsoft.Dnx.Compilation.Abstractions.dll

  Using Package dependency Microsoft.Dnx.Runtime.Abstractions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Dnx.Runtime.Abstractions\1.0.0-beta8
    File: lib\dnx451\Microsoft.Dnx.Runtime.Abstractions.dll

  Using Package dependency Microsoft.Framework.Configuration 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.Configuration\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.Configuration.dll

  Using Package dependency Microsoft.Framework.Configuration.Abstractions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.Configuration.Abstractions\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.Configuration.Abstractions.dll

  Using Package dependency Microsoft.Framework.Configuration.CommandLine 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.Configuration.CommandLine\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.Configuration.CommandLine.dll

  Using Package dependency Microsoft.Framework.Configuration.EnvironmentVariables 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.Configuration.EnvironmentVariables\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.Configuration.EnvironmentVariables.dll

  Using Package dependency Microsoft.Framework.Configuration.FileExtensions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.Configuration.FileExtensions\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.Configuration.FileExtensions.dll

  Using Package dependency Microsoft.Framework.Configuration.Json 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.Configuration.Json\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.Configuration.Json.dll

  Using Package dependency Microsoft.Framework.DependencyInjection 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.DependencyInjection\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.DependencyInjection.dll

  Using Package dependency Microsoft.Framework.DependencyInjection.Abstractions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.DependencyInjection.Abstractions\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.DependencyInjection.Abstractions.dll

  Using Package dependency Microsoft.Framework.Logging 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.Logging\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.Logging.dll

  Using Package dependency Microsoft.Framework.Logging.Abstractions 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.Logging.Abstractions\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.Logging.Abstractions.dll

  Using Package dependency Microsoft.Framework.Primitives 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.Primitives\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.Primitives.dll

  Using Package dependency Microsoft.Framework.WebEncoders.Core 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Framework.WebEncoders.Core\1.0.0-beta8
    File: lib\dnx451\Microsoft.Framework.WebEncoders.Core.dll

  Using Package dependency Microsoft.Net.Http.Headers 1.0.0-beta8
    Source: C:\Users\shawty\.dnx\packages\Microsoft.Net.Http.Headers\1.0.0-beta8
    File: lib\dnx451\Microsoft.Net.Http.Headers.dll

  Using Package dependency Nancy 1.3.0
    Source: C:\Users\shawty\.dnx\packages\Nancy\1.3.0
    File: lib\net40\Nancy.dll

  Using Package dependency Nancy.Owin 1.4.1
    Source: C:\Users\shawty\.dnx\packages\Nancy.Owin\1.4.1
    File: lib\net40\Nancy.Owin.dll

  Using Package dependency Newtonsoft.Json 6.0.6
    Source: C:\Users\shawty\.dnx\packages\Newtonsoft.Json\6.0.6
    File: lib\net45\Newtonsoft.Json.dll

  Using Package dependency OWIN 1.0.0
    Source: C:\Users\shawty\.dnx\packages\OWIN\1.0.0
    File: lib\net40\Owin.dll

  Using Package dependency System.Diagnostics.Tracing.Telemetry 4.0.0-beta-23409
    Source: C:\Users\shawty\.dnx\packages\System.Diagnostics.Tracing.Telemetry\4.0.0-beta-23409
    File: lib\dotnet\System.Diagnostics.Tracing.Telemetry.dll

  Using Package dependency System.Globalization 4.0.0
    Source: C:\Users\shawty\.dnx\packages\System.Globalization\4.0.0

  Using Package dependency System.Numerics.Vectors 4.1.1-beta-23409
    Source: C:\Users\shawty\.dnx\packages\System.Numerics.Vectors\4.1.1-beta-23409
    File: ref\dotnet\System.Numerics.Vectors.dll

  Using Package dependency System.Resources.ResourceManager 4.0.0
    Source: C:\Users\shawty\.dnx\packages\System.Resources.ResourceManager\4.0.0

  Using Package dependency System.Runtime 4.0.0
    Source: C:\Users\shawty\.dnx\packages\System.Runtime\4.0.0

  Using Package dependency System.Runtime.Extensions 4.0.0
    Source: C:\Users\shawty\.dnx\packages\System.Runtime.Extensions\4.0.0

  Using Package dependency System.Threading 4.0.0
    Source: C:\Users\shawty\.dnx\packages\System.Threading\4.0.0

  Using Assembly dependency fx/mscorlib 4.0.0
    Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll

  Using Assembly dependency fx/System 4.0.0
    Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.dll

  Using Assembly dependency fx/System.Core 4.0.0
    Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll

  Using Assembly dependency fx/Microsoft.CSharp 4.0.0
    Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Microsoft.CSharp.dll

  Using Assembly dependency fx/System.Runtime 4.0.10
    Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\System.Runtime.dll

  Using Assembly dependency fx/System.Collections.Concurrent 4.0.0
    Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\System.Collections.Concurrent.dll


Build succeeded.
    0 Warning(s)
    0 Error(s)

Time elapsed 00:00:02.3994429
Total build time elapsed: 00:00:02.4303250
Total projects built: 1

As far as I can see, everything works fine, but when I attempt to run the app I consistantly get

C:\Users\shawty\aspnet5demo\NancyTest>dnx web
System.InvalidOperationException: No service for type 'Microsoft.Dnx.Runtime.IApplicationEnvironment' has been registered.
   at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.AspNet.Hosting.Program.Main(String[] args)
   at Microsoft.AspNet.Server.Kestrel.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
   at Microsoft.Dnx.ApplicationHost.Program.<>c__DisplayClass3_0.<ExecuteMain>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

I've no idea what's happening here (Partly due to the fact I'm still just experimenting with vNext, and i'm not using vs2015 to do it either, I'm doing it all at the CLI.

all the other project types work fine, and i've tried this on a couple of different machines, with the same outcome.

The machines are all Win7 x64 SP1 based builds.

Cheers
Shawty

@peterblazejewicz
Copy link
Member

The Nancy was not updated to RC1:
https://github.com/OmniSharp/generator-aspnet/pulls?q=is%3Apr+is%3Aclosed+label%3Arc1
(there was no PR from owners of NancyFX template).
Let's fix this.

peterblazejewicz added a commit to peterblazejewicz/generator-aspnet that referenced this issue Jan 10, 2016
This commit updates Nancy template to support RC1.
- project dependencies update to RC1
- Nancy package update to latest version
- support new hosting model from RC1
- small white-space fixes
@peterblazejewicz
Copy link
Member

@shawty
#554 waits for review (I'm not Nancy user)
Thanks!

@shawty
Copy link
Author

shawty commented Jan 10, 2016

@peterblazejewicz no problem. Tks :-) Will keep periodically checking for updates.

jchannon added a commit that referenced this issue Jan 14, 2016
⬆️ Update Nancy template to RC1. Fixes #553
@shawty
Copy link
Author

shawty commented Jan 16, 2016

Awesome, thanks Jonathan, I'll test and feedback.

@shawty
Copy link
Author

shawty commented Jan 16, 2016

Has this commit made it to the NuGet package yet, or will I need to grab this from GitHub?

@jchannon
Copy link
Member

Not sure. Pinging @sayedihashimi as I think he does releases?

@peterblazejewicz
Copy link
Member

Correct (but he has his arm injured recently, uhm):
https://twitter.com/sayedihashimi/status/688111539971166208

@peterblazejewicz
Copy link
Member

@shawty, all
Just FYI: one could git-clone current master, step into clone directory and then: npm link. This will link current master as your current yo apnet generator. We do this during development.

@shawty
Copy link
Author

shawty commented Jan 16, 2016

@peterblazejewicz ok, I'll try that. Tks.

@shawty
Copy link
Author

shawty commented Jan 16, 2016

@sayedihashimi oh dang.... yea that Hurts, I was laid up for about 4 weeks with the very same thing middle of last yer, and it's damn painful too. Get better soon.

@ghachey
Copy link

ghachey commented Jan 19, 2016

Hi. I'm new to everything related to .NET, mono, ASP.NET and just trying out all the generator-aspnet generators. The Nancy one fails to run as indicated by @shawty.

My environment on Mac OS X:

$ dnvm list

Active Version              Runtime Architecture OperatingSystem Alias
------ -------              ------- ------------ --------------- -----
       1.0.0-rc1-update1    coreclr x64          darwin          
  *    1.0.0-rc1-update1    mono                 linux/osx       default

The dnu restore and dnu build steps worked without errors but the dnx web fails with same error as reported in this issue. I see the mentioned required updated to RC1 mentioned by @peterblazejewicz and looking at the diff it seems I have the latest as my project.json

{
    "tooling": {
      "defaultNamespace": "NancyApplication"
    },
    "dependencies": {
        "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
        "Microsoft.AspNet.Owin": "1.0.0-beta8",
        "Nancy": "1.3.0"
    },
    "commands": {
        "web": "Microsoft.AspNet.Server.Kestrel"
    },
    "frameworks": {
        "dnx451": {}
    }
}

Is this still an issue or just me being a newbie?

@peterblazejewicz
Copy link
Member

@ghachey
No, it won't work with beta8 - due to changes. When updated to RC1-final - it will work with RC1-update1 (which is minor fixing release in RC1).
I'll make a sample project for you and post elsewhere so you could download it.

Let's poke @sayedihashimi for release (TBD)

@peterblazejewicz
Copy link
Member

@ghachey
Here you are:
https://github.com/peterblazejewicz/generator-aspnet-nancy-fx
Hit download with Zip. Tested with RC1 release.

@shawty
Copy link
Author

shawty commented Jan 19, 2016

Sorry all, away working not had chance to test this yet.

@peterblazejewicz thanks, I'll check the zip as soon as I get chance.

Shawty

@ghachey
Copy link

ghachey commented Jan 20, 2016

Thanks for this @peterblazejewicz . I tried replacing the generated files with yours and still getting the following error:

$ dnx web
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 () <0x4cd6f68 + 0x00014> in <filename unknown>:0 
  at Microsoft.AspNet.Server.Kestrel.Networking.UvLoopHandle.Init (Microsoft.AspNet.Server.Kestrel.Networking.Libuv uv) <0x4cd6ed8 + 0x0002b> in <filename unknown>:0 
  at Microsoft.AspNet.Server.Kestrel.KestrelThread.ThreadStart (System.Object parameter) <0x4cd6b48 + 0x0005f> in <filename unknown>:0

restore and build work fine.

@ghachey
Copy link

ghachey commented Jan 20, 2016

After a bit more playing it's probably worth mentioning the following observations. For the other generators (Web Application, Web API Application, etc.) I get the dnx web error above also but only if I have the mono executing environment active. It works with the coreclr environment. So it would seem, at least in my specific case, that maybe mono is the one that can't find libuv.

If I try to build the default NancyApplication with the coreclr executing environment it fails with the following (looking at NancyFx/Nancy#1959 I think Nancy may not yet support coreclr?!):

  Unable to resolve dependency fx/mscorlib 

  Unable to resolve dependency fx/System 

  Unable to resolve dependency fx/System.Core 

  Unable to resolve dependency fx/Microsoft.CSharp 

  Unable to resolve dependency fx/System.Runtime 

  Unable to resolve dependency fx/System.Collections.Concurrent 

/Users/ghachey/Development/dotNET/NancyApplication/project.json(0,0): error NU1001: The dependency fx/mscorlib  could not be resolved.
/Users/ghachey/Development/dotNET/NancyApplication/project.json(0,0): error NU1001: The dependency fx/System  could not be resolved.
/Users/ghachey/Development/dotNET/NancyApplication/project.json(0,0): error NU1001: The dependency fx/System.Core  could not be resolved.
/Users/ghachey/Development/dotNET/NancyApplication/project.json(0,0): error NU1001: The dependency fx/Microsoft.CSharp  could not be resolved.
/Users/ghachey/Development/dotNET/NancyApplication/project.json(0,0): error NU1001: The dependency fx/System.Runtime  could not be resolved.
/Users/ghachey/Development/dotNET/NancyApplication/project.json(0,0): error NU1001: The dependency fx/System.Collections.Concurrent  could not be resolved.
ApplyProjectInfo.cs(1,29): DNX,Version=v4.5.1 error CS0234: The type or namespace name 'AssemblyFileVersionAttribute' does not exist in the namespace 'System.Reflection' (are you missing an assembly reference?)
ApplyProjectInfo.cs(2,29): DNX,Version=v4.5.1 error CS0234: The type or namespace name 'AssemblyVersionAttribute' does not exist in the namespace 'System.Reflection' (are you missing an assembly reference?)
ApplyProjectInfo.cs(3,29): DNX,Version=v4.5.1 error CS0234: The type or namespace name 'AssemblyInformationalVersionAttribute' does not exist in the namespace 'System.Reflection' (are you missing an assembly reference?)
ApplyProjectInfo.cs(1,58): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.String' is not defined or imported
ApplyProjectInfo.cs(2,54): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.String' is not defined or imported
ApplyProjectInfo.cs(3,67): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.String' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(6,18): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.Object' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/HomeModule.cs(5,31): DNX,Version=v4.5.1 error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(8,31): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.Object' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(8,16): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.Void' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(14,33): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.String' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(14,23): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.Void' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/HomeModule.cs(7,9): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.Void' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/HomeModule.cs(7,16): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.Void' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/HomeModule.cs(9,17): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.String' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(10,13): DNX,Version=v4.5.1 error CS0012: The type 'Action<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(14,51): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.Object' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(14,95): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.Object' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(14,91): DNX,Version=v4.5.1 error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(14,91): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.Object' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(14,51): DNX,Version=v4.5.1 error CS0518: Predefined type 'System.Void' is not defined or imported
/Users/ghachey/Development/dotNET/NancyApplication/Startup.cs(6,18): DNX,Version=v4.5.1 error CS1729: 'object' does not contain a constructor that takes 0 arguments
warning CS8021: No value for RuntimeMetadataVersion found. No assembly containing System.Object was found nor was a value for RuntimeMetadataVersion specified through options.

Build failed.
    1 Warning(s)
    28 Error(s)

So I am stuck using mono but mono does not seem to detect libuv?! This is where I am at currently.

@ghachey
Copy link

ghachey commented Jan 20, 2016

Some more observation. I got it to work on Linux without problems.

@jchannon
Copy link
Member

Nancy does not support CoreCLR yet. Hence the net451 moniker in the
template project.json

On 20 January 2016 at 08:15, ghachey [email protected] wrote:

Some more observation. I got it to work on Linux without problems.


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

@peterblazejewicz
Copy link
Member

@jchannon Thanks!
all: related discussion on Nancy: NancyFx/Nancy/issues/1959

@peterblazejewicz
Copy link
Member

@shawty
The NancyFx update is now live on npm:

npm install -g generator-aspnet

Thanks!

peterblazejewicz added a commit to peterblazejewicz/generator-aspnet that referenced this issue May 9, 2016
peterblazejewicz added a commit to peterblazejewicz/generator-aspnet that referenced this issue May 14, 2016
peterblazejewicz added a commit that referenced this issue May 14, 2016
* Bring changes from aspnet/Templates#530 (#651)

* Remove comment from Main method in web templates (#645)

See aspnet/Templates/4521a05

* Address feedback for Startup.cs (#646)

See aspnet/Templates@53f174b

* Move Microsoft.NETCore.App to top of dependencies section (#647)

See aspnet/Templates@1a8c062

* Remove unneeded depenedencies from project.json (#648)

See aspnet/Templates@49173ba

* Move server gc section for full framework to app.config (#649)

See aspnet/Templates@289ac238

* 🐛 Remove a comma breaking config (#650)

* Bring changes from aspnet/Templates@37d8e90 (#652)

* ⬆️ Update web template to RC2

This commit brings file content changes
to web template (starter web with individual
authorization (in aspnet/Templates convention)
including:
- namespace changes
- project structure changes
- RC2 related structure additions
- assets changes
- client side deps updates
- test coverage update/rewrite
- client side assets updates
- SQLite EF updates

The template now restores, builds and
runs fine.
There are some small fixes remaining for
this tempalte to be done but they will
be part of separte review PR

* Add missing login partial import in web template (#655)

🐛 missing login partial import

* Fix SQLite connection string (#656)

The RC2 uses new convention for Configuration
access of connection strings. This commit
adopts that convention to construct and later
read SQLite configuration

* 🐛 Fix C#6 interpolation SQLite connection string (#658)

* 🐛 Fix $year$ variable artifact (#657)

* 🎨 Update Semantic UI option for web template to RC2 (#659)

👯

* 🐛 Fix invalid namespace in web template (#661)

Semantic UI version shipped with hardcoded namespace.
This commit fixes this

* Small fixes in Semantic UI version (#662)

- remove unused imports
- whitespace unification between versions

* 🔒 Always use HTTPS for MS url shortener (#663)

/cc @sayedihashimi

* Fix sections in starter web template (#664)

- section ordering

The sections are now sorted the same way as in
aspnet/Templates

* Add missing package declaration (#665)

* Small whitespace fix (#666)

* Fix whitespace to match aspnet/Templates version (#668)

* Add dnxcore50 import to console/lib project.json (#667)

See: aspnet/Templates#542

* Fix content layout of empty web app project.json (#669)

- sections layout
- scripts section content update

Thanks!

* Rename build options in configuration (#671)

See aspnet/Templates#536

* Fix missing package entry (#672)

* Revert "Rename build options in configuration (#671)" (#674)

This reverts commit 917740f.
The builds are failing under .NET Command Line Tools (1.0.0-rc2-002485)
starting from this commit.
The commit was found using git bisect tool:

917740f is the first bad commit
commit 917740f
Author: Peter Blazejewicz <[email protected]>
Date:   Fri May 6 22:19:05 2016 +0200

    Rename build options in configuration (#671)

    See aspnet/Templates#536

:040000 040000 1dcdfa62565e51d87aafd32b5b279df6b87570b0
db3df7d2f0358c095ab053c4d3be0f8c1749c8db M      templates

Thanks!

* Bring changes from aspnet/Templates#530 (#651) (#675)

* Remove comment from Main method in web templates (#645)

See aspnet/Templates/4521a05

* Address feedback for Startup.cs (#646)

See aspnet/Templates@53f174b

* Move Microsoft.NETCore.App to top of dependencies section (#647)

See aspnet/Templates@1a8c062

* Remove unneeded depenedencies from project.json (#648)

See aspnet/Templates@49173ba

* Move server gc section for full framework to app.config (#649)

See aspnet/Templates@289ac238

* 🐛 Remove a comma breaking config (#650)

* 📝 Update CLI animation in README.md. Closes #604 (#676)

- animation change
- framework name update in alt

Thanks!

* 📝 Update README.md. Closes #603 (#670)

- no code samples
- links to docs.asp.net instead of code samples

Thanks!

* Remove UseDefaultHostingConfiguration() from templates (#677)

Bring changes from aspnet/Templates@c749a4f
See also: aspnet/Announcements#174

Thanks!

* Remove duplicate section keys from configs (#678)

Duplicated sections removal
Thanks!

* Update/client side deps for RC2 (#681)

* ⬆️ Bump jQuery version

See aspnet/Templates#549

* ⬆️ Bump jQuery.Validation plugin

See aspnet/Templates#549

* React to project.json schema changes and tooling package renames (#679)

This bring some changes from aspnet/Templates@aa31cb9

Thanks!

* Output name field in Bower config in lowercase. Closes #680 (#682)

The name field meta key should be lower case
otherwise Bower renders a warning to users:
bower invalid-meta The "name" is recommended
to be lowercase, can contain digits, dots, dashes

The changes include:
- actual changes in bower.json templates
- test coverage

Thanks!

* Update/npm dependencies for RC2 (#683)

* ⬆️ Bump Gulp NPM dependency

After this change the version installed is 3.9.1:
npm install
...
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]

Thanks!

* ⬆️ Bump up gulp-concat NPM version

npm install
└── [email protected]

Thanks!

* ⬆️ Bump gulp-uglify NPM version

npm install
...
└─┬ [email protected]

Thanks!

* ⬆️ Bump rimraf NPM version

npm install
...
└─┬ [email protected]
  └── [email protected]

Thanks!

* ⬆️ Bump Grunt NPM version

npm install
...
└─┬ [email protected]
  ├── [email protected]
  ├─┬ [email protected]

Thanks!

* Fix/launch settings (#684)

* 🐛 The launch settings use template variables

This commti fixes problems when launchSettings.json
has not been updated to evaluate project name used
in settings

Thanks!

* Fix missing launch settings

Make sure that changes from aspnet/Templates#521
are incorporated

* 🐛 Remove orphaned <text> tag. Fixes #553 (#687)

See aspnet/Templates#553 and aspnet/Templates#554

Thanks!

* Remove code for EF migration from Startup (#688)

This is follow up to aspnet/Templates#562

Thanks!

* Update Class Library template for RC2. Closes ##689 (#695)

Latest bits run on 1.0.0-rc2-002485

* Update Console application template. Closes #690 (#696)

This updates Console application template to RC2.
Tested on donet 1.0.0-rc2-002485

* Update Empty Web project template for RC2. Closes #691 (#697)

Tested and run using dotnet 1.0.0-preview1-002700

* Move mkdirp to regular dependencies (#699)

The mkdirp is technicaly runtime dependency for client
side installation - not development.
Is used by subgenerator and will be used by project
templates to create empty directories like wwwroot

Thanks!

* Update/web api app. Closes #692 (#700)

* 🎨 Store README.md in project root

The aspnet/Templates creates empty wwwroot web root
directory. This commits brings the same behavior
to generator. The readme is created in project root
while web root folder is created empty

Thanks!

* ⬆️ Update web api template for RC2

Udpated with recent changes from aspnet/Templates.
Tested and run on 1.0.0-preview1-002700

Thanks!

* Update NuGet unstable feeds to point to recent RC2 (#708)

* Update Console application template for RC2. Closes #706 (#709)

Most recent bits for final RC2
Tested with 1.0.0-preview1-002702

* Update Class Library project. Closes #705 (#710)

Update with most recent final RC2 bits
Thanks!

* Update WebAPI application for RC2. Closes #703 (#711)

The final bits of RC2
Tested with 1.0.0-preview1-002702

* Update Empty web application for RC2. Closes #704 (#712)

* Update Empty web application for RC2. Closes #704

Update with final bits for RC2

Tested with 1.0.0-preview1-002702

* 🎨 Store README.md project root

This moves README.md to the project root outside
of template webroot directory:
- implementation
- test coverage

This unifies template with aspnet/Templates structure

Thanks!

* ⬆️ Update web application template to aspnet. Closes #694 [WIP] (#702)

:arrow_up: Update web application template to aspnet. Closes #694

* ⬆️ Update starter web template for RC2. Closes #693 [WIP] (#701)

:arrow_up: Update starter web template for RC2. Closes #693
peterblazejewicz added a commit to peterblazejewicz/generator-aspnet that referenced this issue May 16, 2016
peterblazejewicz added a commit that referenced this issue May 16, 2016
* Bring changes from aspnet/Templates#530 (#651)

* Remove comment from Main method in web templates (#645)

See aspnet/Templates/4521a05

* Address feedback for Startup.cs (#646)

See aspnet/Templates@53f174b

* Move Microsoft.NETCore.App to top of dependencies section (#647)

See aspnet/Templates@1a8c062

* Remove unneeded depenedencies from project.json (#648)

See aspnet/Templates@49173ba

* Move server gc section for full framework to app.config (#649)

See aspnet/Templates@289ac238

* 🐛 Remove a comma breaking config (#650)

* Fixed small formatting issue in RC2 info (#717)

Thanks to @horsdal!

* Bring changes from aspnet/Templates@37d8e90 (#652)

* ⬆️ Update web template to RC2

This commit brings file content changes
to web template (starter web with individual
authorization (in aspnet/Templates convention)
including:
- namespace changes
- project structure changes
- RC2 related structure additions
- assets changes
- client side deps updates
- test coverage update/rewrite
- client side assets updates
- SQLite EF updates

The template now restores, builds and
runs fine.
There are some small fixes remaining for
this tempalte to be done but they will
be part of separte review PR

* Add missing login partial import in web template (#655)

🐛 missing login partial import

* Fix SQLite connection string (#656)

The RC2 uses new convention for Configuration
access of connection strings. This commit
adopts that convention to construct and later
read SQLite configuration

* 🐛 Fix C#6 interpolation SQLite connection string (#658)

* 🐛 Fix $year$ variable artifact (#657)

* 🎨 Update Semantic UI option for web template to RC2 (#659)

👯

* 🐛 Fix invalid namespace in web template (#661)

Semantic UI version shipped with hardcoded namespace.
This commit fixes this

* Small fixes in Semantic UI version (#662)

- remove unused imports
- whitespace unification between versions

* 🔒 Always use HTTPS for MS url shortener (#663)

/cc @sayedihashimi

* Fix sections in starter web template (#664)

- section ordering

The sections are now sorted the same way as in
aspnet/Templates

* Add missing package declaration (#665)

* Small whitespace fix (#666)

* Fix whitespace to match aspnet/Templates version (#668)

* Add dnxcore50 import to console/lib project.json (#667)

See: aspnet/Templates#542

* Fix content layout of empty web app project.json (#669)

- sections layout
- scripts section content update

Thanks!

* Rename build options in configuration (#671)

See aspnet/Templates#536

* Fix missing package entry (#672)

* Revert "Rename build options in configuration (#671)" (#674)

This reverts commit 917740f.
The builds are failing under .NET Command Line Tools (1.0.0-rc2-002485)
starting from this commit.
The commit was found using git bisect tool:

917740f is the first bad commit
commit 917740f
Author: Peter Blazejewicz <[email protected]>
Date:   Fri May 6 22:19:05 2016 +0200

    Rename build options in configuration (#671)

    See aspnet/Templates#536

:040000 040000 1dcdfa62565e51d87aafd32b5b279df6b87570b0
db3df7d2f0358c095ab053c4d3be0f8c1749c8db M      templates

Thanks!

* Bring changes from aspnet/Templates#530 (#651) (#675)

* Remove comment from Main method in web templates (#645)

See aspnet/Templates/4521a05

* Address feedback for Startup.cs (#646)

See aspnet/Templates@53f174b

* Move Microsoft.NETCore.App to top of dependencies section (#647)

See aspnet/Templates@1a8c062

* Remove unneeded depenedencies from project.json (#648)

See aspnet/Templates@49173ba

* Move server gc section for full framework to app.config (#649)

See aspnet/Templates@289ac238

* 🐛 Remove a comma breaking config (#650)

* 📝 Update CLI animation in README.md. Closes #604 (#676)

- animation change
- framework name update in alt

Thanks!

* 📝 Update README.md. Closes #603 (#670)

- no code samples
- links to docs.asp.net instead of code samples

Thanks!

* Remove UseDefaultHostingConfiguration() from templates (#677)

Bring changes from aspnet/Templates@c749a4f
See also: aspnet/Announcements#174

Thanks!

* Remove duplicate section keys from configs (#678)

Duplicated sections removal
Thanks!

* Update/client side deps for RC2 (#681)

* ⬆️ Bump jQuery version

See aspnet/Templates#549

* ⬆️ Bump jQuery.Validation plugin

See aspnet/Templates#549

* React to project.json schema changes and tooling package renames (#679)

This bring some changes from aspnet/Templates@aa31cb9

Thanks!

* Output name field in Bower config in lowercase. Closes #680 (#682)

The name field meta key should be lower case
otherwise Bower renders a warning to users:
bower invalid-meta The "name" is recommended
to be lowercase, can contain digits, dots, dashes

The changes include:
- actual changes in bower.json templates
- test coverage

Thanks!

* Update/npm dependencies for RC2 (#683)

* ⬆️ Bump Gulp NPM dependency

After this change the version installed is 3.9.1:
npm install
...
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]

Thanks!

* ⬆️ Bump up gulp-concat NPM version

npm install
└── [email protected]

Thanks!

* ⬆️ Bump gulp-uglify NPM version

npm install
...
└─┬ [email protected]

Thanks!

* ⬆️ Bump rimraf NPM version

npm install
...
└─┬ [email protected]
  └── [email protected]

Thanks!

* ⬆️ Bump Grunt NPM version

npm install
...
└─┬ [email protected]
  ├── [email protected]
  ├─┬ [email protected]

Thanks!

* Fix/launch settings (#684)

* 🐛 The launch settings use template variables

This commti fixes problems when launchSettings.json
has not been updated to evaluate project name used
in settings

Thanks!

* Fix missing launch settings

Make sure that changes from aspnet/Templates#521
are incorporated

* 🐛 Remove orphaned <text> tag. Fixes #553 (#687)

See aspnet/Templates#553 and aspnet/Templates#554

Thanks!

* Remove code for EF migration from Startup (#688)

This is follow up to aspnet/Templates#562

Thanks!

* Update Class Library template for RC2. Closes ##689 (#695)

Latest bits run on 1.0.0-rc2-002485

* Update Console application template. Closes #690 (#696)

This updates Console application template to RC2.
Tested on donet 1.0.0-rc2-002485

* Update Empty Web project template for RC2. Closes #691 (#697)

Tested and run using dotnet 1.0.0-preview1-002700

* Move mkdirp to regular dependencies (#699)

The mkdirp is technicaly runtime dependency for client
side installation - not development.
Is used by subgenerator and will be used by project
templates to create empty directories like wwwroot

Thanks!

* Update/web api app. Closes #692 (#700)

* 🎨 Store README.md in project root

The aspnet/Templates creates empty wwwroot web root
directory. This commits brings the same behavior
to generator. The readme is created in project root
while web root folder is created empty

Thanks!

* ⬆️ Update web api template for RC2

Udpated with recent changes from aspnet/Templates.
Tested and run on 1.0.0-preview1-002700

Thanks!

* Update NuGet unstable feeds to point to recent RC2 (#708)

* Update Console application template for RC2. Closes #706 (#709)

Most recent bits for final RC2
Tested with 1.0.0-preview1-002702

* Update Class Library project. Closes #705 (#710)

Update with most recent final RC2 bits
Thanks!

* Update WebAPI application for RC2. Closes #703 (#711)

The final bits of RC2
Tested with 1.0.0-preview1-002702

* Update Empty web application for RC2. Closes #704 (#712)

* Update Empty web application for RC2. Closes #704

Update with final bits for RC2

Tested with 1.0.0-preview1-002702

* 🎨 Store README.md project root

This moves README.md to the project root outside
of template webroot directory:
- implementation
- test coverage

This unifies template with aspnet/Templates structure

Thanks!

* ⬆️ Update web application template to aspnet. Closes #694 [WIP] (#702)

:arrow_up: Update web application template to aspnet. Closes #694

* ⬆️ Update starter web template for RC2. Closes #693 [WIP] (#701)

:arrow_up: Update starter web template for RC2. Closes #693

* [WIP] Update Unit test project for RC2. Closes #639 (#716)

Update Unit test project for RC2. Closes #639

* Call NPM and Bower install scripts in postrestore (#718)

See #713 comments about RC2 changes and avoiding
less experienced users confusion

Thanks!

* Add EF migration usage hints for RC2 web template (#719)

EF migrations are now not built-into templates
let users to know how to scaffold database using code-first scenario
with saved migrations
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants