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

Runtime error when running "Web Application" with no modifications #141

Closed
tbehunin opened this issue Apr 28, 2015 · 7 comments
Closed

Runtime error when running "Web Application" with no modifications #141

tbehunin opened this issue Apr 28, 2015 · 7 comments

Comments

@tbehunin
Copy link

Trying to create/run a simple aspnet web app on OSX Yosemite. After typing yo aspnet, selecting Web Application, typing in the name of my project (foo), the project is successfully created. I then type dnx . kestrel to start the application and I get the following error:

System.InvalidOperationException: Unable to resolve project 'foo' from /Users/tbehunin/code/foo at Microsoft.Framework.Runtime.ApplicationHostContext..ctor (IServiceProvider serviceProvider, System.String projectDirectory, System.String packagesDirectory, System.String configuration, System.Runtime.Versioning.FrameworkName targetFramework, ICache cache, ICacheContextAccessor cacheContextAccessor, INamedCacheDependencyProvider namedCacheDependencyProvider, IAssemblyLoadContextFactory loadContextFactory, Boolean skipLockFileValidation) [0x00000] in <filename unknown>:0 at Microsoft. (stacktrace continues on...)

Am I missing a command somewhere?

Also, the output when running yo aspnet specifies to use the k commands (kpm restore, kpm build, k run, k kestrel, etc). However, all the docs on the AspNet GitHub page reference dnx, dnvm, etc. Not sure what I'm doing wrong here..?

@spboyer
Copy link
Contributor

spboyer commented Apr 28, 2015

If you are running dnx, the beta4 branch is the dev home for that version.

The current release is still running k, so you would need to have that installed.

As a note k and DNX can run side by side.

@spboyer
Copy link
Contributor

spboyer commented Apr 28, 2015

Install instructions for k

brew tap aspnet\k
brew install kvm

@tbehunin
Copy link
Author

Ok thanks @spboyer. After doing that (and installing grunt and bower), I was able to run kpm restore and received the Done, without errors. Restore complete. message.

However, when I type in kpm build or k kestrel, I get the following error:
System.IO.IOException: kqueue() FileSystemWatcher has reached the maximum nunmber of files to watch. at System.IO.KqueueMonitor.Add (System.String path, Boolean postEvents, System.Collections.Generic.List``1& fds) [0x00000] in <filename unknown>:0 at System.IO.KqueueMonitor.Scan (System.String path, Boolean postEvents, System.Collections.Generic.List``1& fds) [0x00000] in <filename unknown>:0 at System.IO.KqueueMonitor.Setup () [0x00000] in <filename unknown>:0 at System.IO.KqueueMonitor.DoMonitor () [0x00000] in <filename unknown>:0

Any ideas?

@tbehunin
Copy link
Author

Looks to be a known Mono issue..?

http://www.mono-project.com/docs/about-mono/releases/3.12.0/

Ref this issue: aspnet/Mvc#2348

@spboyer
Copy link
Contributor

spboyer commented Apr 29, 2015

@tbehunin check the fix here for your .bash_profile
#138

It should work for k with no problems.

@tbehunin
Copy link
Author

@spboyer Thanks - that got me past that hurdle. Once I enter k kestrel, I can now get to the app at http://localhost:5004.

One strange thing I found though, if I try kpm build, I get the following error:
System.IO.EndOfStreamException: Failed to read past end of stream. at System.IO.BinaryReader.ReadChar () [0x00000] in <filename unknown>:0 at Microsoft.CodeAnalysis.CvtResFile.ReadStringOrID (System.IO.BinaryReader fhIn) [0x00000] in <filename unknown>:0 at Microsoft.CodeAnalysis.CvtResFile.ReadResFile (System.IO.Stream stream) [0x00000] in <filename unknown>:0 at Microsoft.CodeAnalysis.Compilation.MakeWin32ResourceList (System.IO.Stream win32Resources, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) [0x00000] in <filename unknown>:0 at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.SetupWin32Resources (Micros (stacktrace continues..)

Even though it fails to build using that command, I can still successfully start the web app (k kestrel) and hit the app in a browser. Not sure what that's all about...

@spboyer
Copy link
Contributor

spboyer commented Apr 30, 2015

@tbehunin yes. duplicate of #140

@spboyer spboyer closed this as completed Apr 30, 2015
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

2 participants