Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnu problem when running dev HelloMvc and HelloWeb on Mono 3.12.1 #420

Closed
witterlee opened this issue Mar 28, 2015 · 5 comments
Closed

dnu problem when running dev HelloMvc and HelloWeb on Mono 3.12.1 #420

witterlee opened this issue Mar 28, 2015 · 5 comments

Comments

@witterlee
Copy link

Ubuntu 12.04 LTS

apt-get install mono-complete (3.12.1)
runtime: dnx-mono.1.0.0-beta5-11400

dnx . run , Console sample is ok.

when dnx . kestrel has a message like:

root@ubuntu:~/Home/samples/HelloWeb# dnx . kestrel
System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'DNX,Version=v4.5.1':
   Kestrel 1.0.0-beta3
   Microsoft.AspNet.Diagnostics 1.0.0-beta3
   Microsoft.AspNet.Hosting 1.0.0-beta3
   Microsoft.AspNet.Server.WebListener 1.0.0-beta3
   Microsoft.AspNet.StaticFiles 1.0.0-beta3

Searched Locations:
  /root/Home/samples/{name}/project.json
  /usr/lib/mono/4.5/{name}.dll
  /usr/lib/mono/4.5/Facades/{name}.dll

Try running 'dnu restore'.

  at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 

After run "dnu restore",only give more information that
/root/.dnx/packages/{name}/{version}/{name}.nuspec

root@ubuntu:~/Home/samples/HelloWeb# dnx . kestrel
System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'DNX,Version=v4.5.1':
   Kestrel 1.0.0-beta3
   Microsoft.AspNet.Diagnostics 1.0.0-beta3
   Microsoft.AspNet.Hosting 1.0.0-beta3
   Microsoft.AspNet.Server.WebListener 1.0.0-beta3
   Microsoft.AspNet.StaticFiles 1.0.0-beta3

Searched Locations:
  /root/Home/samples/{name}/project.json
  /root/.dnx/packages/{name}/{version}/{name}.nuspec
  /usr/lib/mono/4.5/{name}.dll
  /usr/lib/mono/4.5/Facades/{name}.dll

Try running 'dnu restore'.

  at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 

/root/.dnx/packages have all of
Kestrel 1.0.0-beta3
Microsoft.AspNet.Diagnostics 1.0.0-beta3
Microsoft.AspNet.Hosting 1.0.0-beta3
Microsoft.AspNet.Server.WebListener 1.0.0-beta3
Microsoft.AspNet.StaticFiles 1.0.0-beta3

root@ubuntu:~/.dnx/packages# ls
Kestrel
Microsoft.AspNet.Diagnostics
Microsoft.AspNet.FeatureModel
Microsoft.AspNet.FileProviders
Microsoft.AspNet.FileProviders.Interfaces
Microsoft.AspNet.Hosting
Microsoft.AspNet.Http
Microsoft.AspNet.Http.Core
Microsoft.AspNet.Http.Extensions
Microsoft.AspNet.Http.Interfaces
Microsoft.AspNet.Mvc
Microsoft.AspNet.Mvc.Core
Microsoft.AspNet.Mvc.ModelBinding
Microsoft.AspNet.Mvc.Razor
Microsoft.AspNet.Mvc.Razor.Host
Microsoft.AspNet.Razor
Microsoft.AspNet.Razor.Runtime
Microsoft.AspNet.RequestContainer
Microsoft.AspNet.Routing
Microsoft.AspNet.Security
Microsoft.AspNet.Security.DataProtection
Microsoft.AspNet.Server.Kestrel
Microsoft.AspNet.Server.WebListener
Microsoft.AspNet.StaticFiles
Microsoft.AspNet.WebUtilities
Microsoft.CodeAnalysis.Analyzers
Microsoft.CodeAnalysis.Common
Microsoft.CodeAnalysis.CSharp
Microsoft.CSharp
Microsoft.Framework.Cache.Memory
Microsoft.Framework.ConfigurationModel
Microsoft.Framework.DependencyInjection
Microsoft.Framework.Logging
Microsoft.Framework.Logging.Interfaces
Microsoft.Framework.OptionsModel
Microsoft.Framework.Runtime.Interfaces
Microsoft.Framework.Runtime.Roslyn.Common
Microsoft.Net.Http.Headers
Microsoft.Net.Http.Server
Microsoft.Net.WebSocketAbstractions
Microsoft.Net.WebSockets
Microsoft.Win32.Primitives
Microsoft.Win32.Registry
Newtonsoft.Json
System.Collections
System.Collections.Concurrent
System.Collections.Immutable
System.ComponentModel
System.ComponentModel.Annotations
System.ComponentModel.Primitives
System.ComponentModel.TypeConverter
System.Console
System.Diagnostics.Contracts
System.Diagnostics.Debug
System.Diagnostics.Tools
System.Diagnostics.TraceSource
System.Diagnostics.Tracing
System.Dynamic.Runtime
System.Globalization
System.Globalization.Extensions
System.IO
System.IO.FileSystem
System.IO.FileSystem.Primitives
System.IO.FileSystem.Watcher
System.Linq
System.Linq.Expressions
System.Net.Primitives
System.ObjectModel
System.Reflection
System.Reflection.Extensions
System.Reflection.Metadata
System.Reflection.Primitives
System.Reflection.TypeExtensions
System.Resources.ResourceManager
System.Runtime
System.Runtime.Extensions
System.Runtime.Handles
System.Runtime.InteropServices
System.Runtime.Serialization.Primitives
System.Runtime.Serialization.Xml
System.Security.Claims
System.Security.Cryptography.Encoding
System.Security.Cryptography.Encryption
System.Security.Cryptography.Encryption.Aes
System.Security.Cryptography.Hashing
System.Security.Cryptography.Hashing.Algorithms
System.Security.Cryptography.RandomNumberGenerator
System.Security.Cryptography.X509Certificates
System.Security.Principal
System.Security.Principal.Windows
System.Text.Encoding
System.Text.Encoding.Extensions
System.Text.RegularExpressions
System.Threading
System.Threading.Overlapped
System.Threading.Tasks
System.Threading.Tasks.Parallel
System.Threading.Thread
System.Threading.ThreadPool
System.Threading.Timer
System.Xml.ReaderWriter
System.Xml.XDocument
System.Xml.XmlSerializer

anything wrong?

@davidfowl
Copy link
Member

Read this blog post, see if it helps http://davidfowl.com/diagnosing-dependency-issues-with-asp-net-5/

@witterlee
Copy link
Author

@davidfowl Thanks. But when I run dnu build,give some error message, maybe need update some code?
Build failed.
2 Warnings(s)
4 Error(s)

/root/Home/samples/HelloMvc/Startup.cs(13,13): error CS0012: The type 'IServiceDescriptor' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Framework.DependencyInjection.IServiceDescriptor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
/root/Home/samples/HelloMvc/Startup.cs(13,13): error CS0012: The type 'IServiceCollection' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Framework.DependencyInjection.IServiceCollection, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

/root/Home/samples/HelloMvc/Startup.cs(13,13): error CS0012: The type 'IServiceDescriptor' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Framework.DependencyInjection.IServiceDescriptor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
/root/Home/samples/HelloMvc/Startup.cs(13,13): error CS0012: The type 'IServiceCollection' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Framework.DependencyInjection.IServiceCollection, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

@Tragetaschen
Copy link
Contributor

Obviously you haven't read "Tip #1" from the blog post. I suggest doing that.

@witterlee
Copy link
Author

I use dnvm upgrade get the newest dnx and git clone the newest code from https://github.com/aspnet/Home, then use dnu restore to get the project.json nuget package.
anything wrong,guy?

@davidfowl
Copy link
Member

Use the dev branch for samples that work with beta4/5

natemcmaster pushed a commit that referenced this issue Nov 20, 2018
Remove FeatureReference indirection
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
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

3 participants