aspnet / MusicStore

[Archived] MusicStore test application that uses ASP.NET/EF Core. Project moved to https://github.com/aspnet/AspNetCore
1.3k stars 878 forks source link

Error at running #655

Closed antonioapostoliu closed 8 years ago

antonioapostoliu commented 8 years ago

Error at running Please help me

D:\msd2\MusicStore-dev\src\MusicStore.Standalone>dotnet run Project MusicStore.Standalone (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing Compiling MusicStore.Standalone for .NETCoreApp,Version=v1.0 D:\msd2\MusicStore-dev\src\MusicStore.Standalone\project.json(16,15): warning DOTNET1015: The 'compile' option is deprecated. Use 'compile' in 'buildOptions' instead. D:\msd2\MusicStore-dev\src\MusicStore.Standalone\project.json(20,15): warning DOTNET1015: The 'exclude' option is deprecated. Use 'exclude' within 'compile' or 'embed' instead.

Compilation succeeded. 2 Warning(s) 0 Error(s)

Time elapsed 00:00:02.5607108

Unhandled Exception: System.IO.FileNotFoundException: The configuration file 'config.json' was not found and is not optional. at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load() at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build() at MusicStore.Startup..ctor(IHostingEnvironment hostingEnvironment) --- End of stack trace from previous location where exception was thrown --- at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider) at Microsoft.Extensions.Internal.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters) at Microsoft.Extensions.Internal.ActivatorUtilities.GetServiceOrCreateInstance(IServiceProvider provider, Type type) at Microsoft.AspNetCore.Hosting.Internal.StartupLoader.LoadMethods(IServiceProvider services, Type startupType, String environmentName) at Microsoft.AspNetCore.Hosting.WebHostBuilder.<>cDisplayClass13_1.b1(IServiceProvider sp) at Microsoft.Extensions.DependencyInjection.ServiceLookup.FactoryService.Invoke(ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceProvider.SingletonCallSite.Invoke(ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>cDisplayClass12_0.b0(ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderExtensions.GetRequiredService[T](IServiceProvider provider) at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureStartup() at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices() at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() at MusicStore.Standalone.Program.Main(String[] args)

D:\msd2\MusicStore-dev\src\MusicStore.Standalone>dotnet --info .NET Command Line Tools (1.0.0-rc2-002659)

Product Information: Version: 1.0.0-rc2-002659 Commit Sha: 11a001706f

Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x86

D:\msd2\MusicStore-dev\src\MusicStore.Standalone>cat config.json { "AppSettings": { "SiteTitle": "ASP.NET MVC Music Store" }, "DefaultAdminUsername": "Administrator@test.com", "DefaultAdminPassword": "YouShouldChangeThisPassword1!", "Data": { "DefaultConnection": { // Use a shared (and running) LocalDB database when executing in IIS e.g. // "Server=(localdb).\IIS_DB;Database=MusicStore;Trusted_Connection=False;MultipleActiveResultSets=true;User ID=iis_login;Password=****" "ConnectionString": "Server=(localdb)\MSSQLLocalDB;Database=MusicStore;Trusted_Connection=True;MultipleActiveResultSets=true;Connect Timeout=30;" } }

}

cat work because I have one unix tools installed Best regards

antonioapostoliu commented 8 years ago

I figure what missing... change include with content and promote outside the paragrph... I close it...