GithubHelp home page GithubHelp logo

aspnet / musicstore Goto Github PK

View Code? Open in Web Editor NEW
1.3K 209.0 883.0 6.62 MB

[Archived] MusicStore test application that uses ASP.NET/EF Core. Project moved to https://github.com/aspnet/AspNetCore

aspnet-product

musicstore's Introduction

MusicStore (test application) [Archived]

This GitHub project has been archived. Ongoing development on this project can be found in https://github.com/aspnet/AspNetCore.

This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the AspNetCore repo.

Samples and docs for ASP.NET Core can be found here: https://docs.asp.net.

musicstore's People

Contributors

ajaybhargavb avatar ajcvickers avatar analogrelay avatar anpete avatar aspnetci avatar brennanconroy avatar bricelam avatar chengtian avatar damianedwards avatar davidfowl avatar davidobando avatar dougbu avatar eilon avatar friism avatar haok avatar ianhong avatar jkotalik avatar juntaoluo avatar kichalla avatar kirthik avatar mikeharder avatar natemcmaster avatar ntaylormullen avatar pakrym avatar pranavkm avatar rowanmiller avatar ryanbrandenburg avatar rynowak avatar tratcher avatar troydai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

musicstore's Issues

Make tests run in parallel

Currently it uses fixed port numbers. Need to make it use free ports and run all tests in parallel to save time.

EF fails with an exception on net45

@ajcvickers @rowanmiller - Could you have a look?

EF fails with an exception on net45.

:(
Helios failed to start.
The ApplicationStart method threw an exception. Detailed exception information is below.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Method 'get_Name' in type 'Microsoft.Data.SqlServer.SqlServerDataStoreSource' from assembly 'Microsoft.Data.SqlServer, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
at Microsoft.Data.Entity.SqlServerEntityServicesBuilderExtensions.AddSqlServer(EntityServicesBuilder builder)
at Startup.<Configuration>b__3(EntityServicesBuilder s) in D:\K\src\MusicStore\src\MusicStore\Startup.cs:line 44
at Microsoft.AspNet.DependencyInjection.EntityServiceCollectionExtensions.AddEntityFramework(ServiceCollection serviceCollection, Action`1 nestedBuilder)
at Startup.<>c__DisplayClass0.<Configuration>b__2(ServiceCollection services) in D:\K\src\MusicStore\src\MusicStore\Startup.cs:line 44
at Microsoft.AspNet.ContainerExtensions.UseServices(IBuilder builder, Action`1 configureServices)
at Startup.Configuration(IBuilder app) in D:\K\src\MusicStore\src\MusicStore\Startup.cs:line 32
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Microsoft.AspNet.Hosting.Startup.StartupLoader.<>c__DisplayClass0.<LoadStartup>b__3(IBuilder builder)
at Microsoft.AspNet.Loader.IIS.KlrHttpApplication.HeliosStartupLoaderProvider.WrappingStartupLoader.<>c__DisplayClass0.<LoadStartup>b__2(IBuilder builder)
at Microsoft.AspNet.Hosting.HostingEngine.EnsureApplicationDelegate(HostingContext context)
at Microsoft.AspNet.Hosting.HostingEngine.Start(HostingContext context)
at Microsoft.AspNet.Loader.IIS.KlrHttpApplication.ApplicationStart(IHttpApplication application)
at Microsoft.AspNet.Loader.IIS.HttpApplicationBase.InvokeApplicationStart(IHttpApplication application)

Create a live demo version

It'd be really nice if you would be able to publish the music store website on the web, presumably on Azure.

Consider avoid using the view bag in the login action

In the Login action: If you already have gone to the effort of writing a class to explicitly represent all the information that you want to render on the view, why put the ReturnUrl on the ViewBag (where isn't strongly typed) instead of putting it directly on the LoginViewModel?

Test are flaky when run locally via ./build

MusicStores tests consistently fail for me when run locally via ./build even when passing on CI. Some combination of clean/upgrade/rerun eventually gets them to pass.

Ideally ./build.cmd should run cleanly always

Checkout not working

  1. Clone MusicStore
  2. K restore
  3. Run MusicStore
  4. Add an album to the cart
  5. Checkout
  6. Fill out all the details
  7. Hit Submit

Expected: Checkout completes
Observed: Comes back with the the same page

Need to flatten some of Java Script client components

Because of the long file paths that Node uses within MusicStore, coping/zipping the MusicStore sources doesn't work. It will make it difficult to share the MusicStore sources within a small team after updating them.

I think we should flatten some of Java script client components.

Upgrade to Angular 1.3

Currently blocked by issue in angular-ui-bootstrap with the modal directive (they haven't released an update for 1.3 yet)

  • Update to new form validation pattern (ng-messages, etc.)
  • Remove custom focus directive and use built-in one
  • Remove custom form submitted directive and use built-in one

Cannot access shopping cart on NET45 (exception from EF)

cc @Praburaj

In MusicStore (NET45, Helios or selfhost), try to add an item to the shopping cart.

You get:

InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.

Remotion.Linq.Clauses.ResultOperatorBase.InvokeExecuteMethod(MethodInfo method, Object input)
Remotion.Linq.Clauses.ResultOperatorBase.InvokeGenericExecuteMethod[TInput,TResult](IStreamedData input, Func`2 genericExecuteCaller)
Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase.ExecuteInMemory(IStreamedData input)
Microsoft.Data.Entity.Query.EntityQueryModelVisitor.ExecuteResultOperator[TSource,TResult](IEnumerable`1 source, ResultOperatorBase resultOperator, StreamedSequenceInfo streamedSequenceInfo)
lambda_method(Closure , QueryContext )
Microsoft.Data.Entity.Relational.RelationalDataStore.Query[TResult](QueryModel queryModel, StateManager stateManager)
Microsoft.Data.Entity.Query.EntityQueryExecutor.ExecuteCollection[T](QueryModel queryModel)
Microsoft.Data.Entity.Query.EntityQueryExecutor.ExecuteSingle[T](QueryModel queryModel, Boolean returnDefaultWhenEmpty)
Remotion.Linq.Clauses.StreamedData.StreamedSingleValueInfo.ExecuteSingleQueryModel[T](QueryModel queryModel, IQueryExecutor executor)
Remotion.Linq.Clauses.StreamedData.StreamedSingleValueInfo.ExecuteQueryModel(QueryModel queryModel, IQueryExecutor executor)
Remotion.Linq.QueryModel.Execute(IQueryExecutor executor)
Remotion.Linq.QueryProviderBase.Execute(Expression expression)
Remotion.Linq.QueryProviderBase.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
System.Linq.Queryable.Single[TSource](IQueryable`1 source, Expression`1 predicate)
MusicStore.Models.ShoppingCart.GetTotal() in ShoppingCart.cs
135.                var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId);
MusicStore.Controllers.ShoppingCartController.Index() in ShoppingCartController.cs
25.            var viewModel = new ShoppingCartViewModel
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNet.Mvc.ReflectedActionExecutor.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
Microsoft.AspNet.Mvc.ReflectedActionExecutor.<ExecuteAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionMethod>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionMethodFilter>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNet.Mvc.MvcRouteHandler.<RouteAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNet.Routing.Template.TemplateRoute.<RouteAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNet.Routing.RouteCollection.<RouteAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNet.Builder.RouterMiddleware.<Invoke>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNet.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNet.Diagnostics.ErrorPageMiddleware.<Invoke>d__1.MoveNext()

Reenable Music store tests

Fallback hosting changes appear to have broken the Smoke tests, they appear to work in that they are calling functionality, but the tests all fail at the end, I've disabled the tests for now.

k kestrel on MacOS X throws - MusicStore does not run

This is the stack trace when running k kestrel:

Microsoft.Framework.Runtime.Roslyn.RoslynCompilationException: /Users/christianweyer/GitHub/MusicStore/src/MusicStore/Startup.cs(35,17): error CS1061: 'Microsoft.AspNet.Builder.IApplicationBuilder' does not contain a definition for 'SetDefaultSignInAsAuthenticationType' and no extension method 'SetDefaultSignInAsAuthenticationType' accepting a first argument of type 'Microsoft.AspNet.Builder.IApplicationBuilder' could be found (are you missing a using directive or an assembly reference?)
/Users/christianweyer/GitHub/MusicStore/src/MusicStore/Startup.cs(37,17): error CS1061: 'Microsoft.AspNet.Builder.IApplicationBuilder' does not contain a definition for 'UseServices' and no extension method 'UseServices' accepting a first argument of type 'Microsoft.AspNet.Builder.IApplicationBuilder' could be found (are you missing a using directive or an assembly reference?)
/Users/christianweyer/GitHub/MusicStore/src/MusicStore/StartupNtlmAuthentication.cs(69,17): error CS1061: 'Microsoft.AspNet.Builder.IApplicationBuilder' does not contain a definition for 'UseServices' and no extension method 'UseServices' accepting a first argument of type 'Microsoft.AspNet.Builder.IApplicationBuilder' could be found (are you missing a using directive or an assembly reference?)
/Users/christianweyer/GitHub/MusicStore/src/MusicStore/Mocks/StartupSocialTesting.cs(40,17): error CS1061: 'Microsoft.AspNet.Builder.IApplicationBuilder' does not contain a definition for 'SetDefaultSignInAsAuthenticationType' and no extension method 'SetDefaultSignInAsAuthenticationType' accepting a first argument of type 'Microsoft.AspNet.Builder.IApplicationBuilder' could be found (are you missing a using directive or an assembly reference?)
/Users/christianweyer/GitHub/MusicStore/src/MusicStore/Mocks/StartupSocialTesting.cs(42,17): error CS1061: 'Microsoft.AspNet.Builder.IApplicationBuilder' does not contain a definition for 'UseServices' and no extension method 'UseServices' accepting a first argument of type 'Microsoft.AspNet.Builder.IApplicationBuilder' could be found (are you missing a using directive or an assembly reference?)
at Microsoft.Framework.Runtime.Roslyn.RoslynProjectReference.Load (IAssemblyLoaderEngine loaderEngine) [0x00000] in :0
at Microsoft.Framework.Runtime.Loader.ProjectAssemblyLoader.Load (System.String name) [0x00000] in :0
at klr.host.LoaderContainer.Load (System.String name) [0x00000] in :0
at klr.hosting.RuntimeBootstrapper+<>c__DisplayClasse.b__4 (System.Reflection.AssemblyName assemblyName) [0x00000] in :0
at klr.hosting.RuntimeBootstrapper+<>c__DisplayClasse.b__7 (System.Object sender, System.ResolveEventArgs a) [0x00000] in :0
at System.AppDomain.DoAssemblyResolve (System.String name, Boolean refonly) [0x00000] in :0
at (wrapper managed-to-native) System.AppDomain:LoadAssembly (System.AppDomain,string,System.Security.Policy.Evidence,bool)
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.AppDomain:Load (System.Reflection.AssemblyName,System.Security.Policy.Evidence)
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.AppDomain:Load (System.Reflection.AssemblyName)
at System.Reflection.Assembly.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in :0
at Microsoft.AspNet.Hosting.Startup.StartupLoader.LoadStartup (System.String applicationName, System.String environmentName, IList`1 diagnosticMessages) [0x00000] in :0
at Microsoft.AspNet.Hosting.Startup.StartupManager.LoadStartup (System.String applicationName, System.String environmentName) [0x00000] in :0
at Microsoft.AspNet.Hosting.HostingEngine.EnsureApplicationStartup (Microsoft.AspNet.Hosting.HostingContext context) [0x00000] in :0
at Microsoft.AspNet.Hosting.HostingEngine.EnsureApplicationDelegate (Microsoft.AspNet.Hosting.HostingContext context) [0x00000] in :0
at Microsoft.AspNet.Hosting.HostingEngine.Start (Microsoft.AspNet.Hosting.HostingContext context) [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

Any idea what is wrong?
Thanks.

Use DTOs for APIs

The web APIs should use DTOs instead of the EF entities to ensure explicit binding.

Validation should be inherited from the EF entities however, to avoid duplication.

Two Set-Cookie headers are sent when the cookies in browser is cleared.

Repo

  1. Clear the browser's cookie.
  2. Navigate to /Account/Login

    Two different cookies for __RequestVerificationToken is returned in response:
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
Set-Cookie: __RequestVerificationToken=2WVnhqetdgv_SM9hjduOwhknB6CeG3DYNliuvX_SGRwUuHoqufx3rbvIhOHWeD01xhvw187Hquk9_vXUpCCWcbUf2ukBa7SzPAaC41CJ-L4.; path=/; HttpOnly
Set-Cookie: __RequestVerificationToken=HpCdF171TcUQKnMx9QSLb7cA575e6dB7awTJ5pcAK--4Bj6NbmvSYLjMxKDBetTmp4ULJ5VPjDjNL0w0D3GaMJ4BJZWrWf_2erIszNEe0qQ.; path=/; HttpOnly
Set-Cookie: Session=f3d642d6-6cda-4d60-bb64-c8fcb8404f8a; path=/
X-Frame-Options: SAMEORIGIN
X-Powered-By: ASP.NET
Date: Tue, 09 Sep 2014 07:58:43 GMT

Impact

I notice this issue from the performance test. The first login always failed, while the later requests will pass. The HttpClient will pick up the second value for the __RequestVerificationToken as a result it doesn't match the token fetched from form.

Add transition animations/screens

The app sometimes appears to do be doing nothing as it's waiting for XHR API calls to complete. We should add some sort of transition & pending operation visual states to make this nicer.

Bad practice in how Music Store uses DI

The MusicStore app is using a concrete implementation in all places where the data context is injected:

Startup.cs:

services.AddTransient<MusicStoreContext, MusicStoreContext>();

Checkout.cs:

public CheckoutController(MusicStoreContext context)
{
    db = context;
}

This is a bad practice and we don't want our customers to do DI this way because:

  1. It creates a strong coupling between MusicStoreContext and its consumers
  2. Unit testing is hard; i.e. you have to create a MusicStoreContext in order to test the controllers
  3. One cannot easily replace the MusicStoreContext with let's say MusicStoreNewContext. Ideally, you would only replace the code in the container registration. With today's implementation, you have to change it everywhere.

I suggest adding one or more interfaces that MusicStoreContext implements and taking a dependency on those. See how the WebSimulator sample does it.

cc @Praburaj

Update to latest TypeScript

Currently blocked by grunt-typescript. Looked at grunt-ts but it doesn't support compiling multiple file-sets simultaneously (within a single grunt target).

integration of server side code analisys

Hi,
now that we have ts linting in the pipeline, is there any plan to add to the pipeline server side validation too (former fxcop, actually seems to me vs code analisys ) and stylecop?
another question: if I want to customize the pipeline and I want to write my own module, is it possible to write the core using .net and wrap in a node.js module?

We should make file strucuture and content as much same as possible between projectK musicstore and MVC musicstore

We should make file strucuture and content as much same as possible between projectK musicstore and MVCMusicstore. So that I can easily do a windiff to see the difference, and easily design tool for migration

Right now, it's hard to read the differences between two apps. Especially:

  1. K musicstore doesn't have a app_start folder
  2. Controller's don't even perform the same actions (is this because MVCMusicStore is not updated as musicstore received update recently?)

Please take consideration

Update helios.cmd to run IIS Express from ProgramFiles folder for 64-bit

This applies to all our samples but opening it in this repo - Currently helios.cmd launches IIS Express from ProgramFiles(x86) so Helios requires one to install x86 kre even on 64-bit machines. We should update helios.cmd to launch iisexpress from ProgramFiles.

Even better but lower pri as this is simply a helper for now - we could detect the flavor of kre installed and pick from ProgramFiles(x86) if there is no x64 kre.

"Out of Memory" when running kpm restore on Linux

moni@interpulse-ubuntu:~/MusicStore/src/MusicStore$ kpm restore
Restoring packages for /home/moni/MusicStore/src/MusicStore/project.json
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Kestrel'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Kestrel'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.IIS'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.IIS'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.WebListener'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.WebListener'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Identity.EntityFramework'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Identity.EntityFramework'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Security.Cookies'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Security.Cookies'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Security.Facebook'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Security.Facebook'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Security.Google'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Security.Google'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Security.MicrosoftAccount'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Security.MicrosoftAccount'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Security.Twitter'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Security.Twitter'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.StaticFiles'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.StaticFiles'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.SqlServer'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='EntityFramework.SqlServer'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.InMemory'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='EntityFramework.InMemory'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.ConfigurationModel.Json'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.Framework.ConfigurationModel.Json'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.OptionsModel'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.Framework.OptionsModel'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.SignalR.Server'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.AspNet.SignalR.Server'.
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Cache.Memory'.
  GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='Microsoft.Framework.Cache.Memory'.
Out of memory
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr) <0xffffffff>
  at (wrapper alloc) object.AllocVector (intptr,intptr) <0xffffffff>
  at Mono.Security.ASN1.GetBytes () <0x002bc>
  at Mono.Security.X509.X509Certificate.get_Hash () <0x00088>
  at Mono.Security.X509.X509Store.LoadCertificate (string) <0x000b3>
  at Mono.Security.X509.X509Store.BuildCertificatesCollection (string) <0x00107>
  at Mono.Security.X509.X509Store.get_Certificates () <0x00023>
  at System.Security.Cryptography.X509Certificates.X509Store.Open (System.Security.Cryptography.X509Certificates.OpenFlags) <0x00143>
  at System.Security.Cryptography.X509Certificates.X509Chain.get_UserRootStore () <0x000ab>
  at System.Security.Cryptography.X509Certificates.X509Chain.get_Roots () <0x0005b>
  at System.Security.Cryptography.X509Certificates.X509Chain.get_CertificateCollection () <0x000a3>
  at System.Security.Cryptography.X509Certificates.X509Chain.FindParent (System.Security.Cryptography.X509Certificates.X509Certificate2) <0x00027>
  at System.Security.Cryptography.X509Certificates.X509Chain.BuildChainFrom (System.Security.Cryptography.X509Certificates.X509Certificate2) <0x0003b>
  at System.Security.Cryptography.X509Certificates.X509Chain.Build (System.Security.Cryptography.X509Certificates.X509Certificate2) <0x00083>
  at System.Net.ServicePointManager/ChainValidationHelper.ValidateChain (Mono.Security.X509.X509CertificateCollection) <0x002cf>
  at Mono.Security.Protocol.Tls.SslClientStream.OnRemoteCertificateValidation2 (Mono.Security.X509.X509CertificateCollection) <0x0002a>
  at Mono.Security.Protocol.Tls.SslStreamBase.RaiseRemoteCertificateValidation2 (Mono.Security.X509.X509CertificateCollection) <0x00018>
  at Mono.Security.Protocol.Tls.SslClientStream.RaiseServerCertificateValidation2 (Mono.Security.X509.X509CertificateCollection) <0x00013>
  at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.RemoteValidation (Mono.Security.Protocol.Tls.ClientContext,Mono.Security.Protocol.Tls.AlertDescription) <0x0003a>
  at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.validateCertificates (Mono.Security.X509.X509CertificateCollection) <0x0007f>
  at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.ProcessAsTls1 () <0x00117>
  at Mono.Security.Protocol.Tls.Handshake.HandshakeMessage.Process () <0x00056>
  at (wrapper remoting-invoke-with-check) Mono.Security.Protocol.Tls.Handshake.HandshakeMessage.Process () <0xffffffff>
  at Mono.Security.Protocol.Tls.ClientRecordProtocol.ProcessHandshakeMessage (Mono.Security.Protocol.Tls.TlsStream) <0x000a3>
  at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (System.IAsyncResult) <0x0029c>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono() [0x4b3f48]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7f97c65b8340]
        /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7f97c6218bb9]
        /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7f97c621bfc8]
        mono() [0x6250a9]
        mono() [0x6252af]
        mono() [0x625352]
        mono() [0x5e22c6]
        mono() [0x5e24a3]
        [0x41c0025e]

Debug info from gdb:


=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

/home/moni/.kre/packages/KRE-Mono.1.0.0-beta1/bin/klr: line 15: 28797 Aborted                 (core dumped) mono $MONO_OPTIONS "$DIR/klr.mono.managed.dll" "$@"

MissingMethodException: Method not found: 'Void

hi team,

I can't display pages using VS14 CTP3.

Here the stack, I can debug startupand controller, seem to be dynamic compilation on razor

An unhandled exception occurred while processing the request.

MissingMethodException: Method not found: 'Void Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions..ctor(Microsoft.CodeAnalysis.OutputKind, System.String, System.String, System.String, System.Collections.Generic.IEnumerable1<System.String>, Boolean, Boolean, Boolean, System.String, System.String, System.Nullable1, Int32, UInt64, Microsoft.CodeAnalysis.Platform, Microsoft.CodeAnalysis.ReportDiagnostic, Int32, System.Collections.Generic.IEnumerable1<System.Collections.Generic.KeyValuePair2<System.String,Microsoft.CodeAnalysis.ReportDiagnostic>>, Boolean, Microsoft.CodeAnalysis.DebugInformationKind, Microsoft.CodeAnalysis.SubsystemVersion, System.String, Boolean, Microsoft.CodeAnalysis.XmlReferenceResolver, Microsoft.CodeAnalysis.SourceReferenceResolver, Microsoft.CodeAnalysis.MetadataReferenceResolver, Microsoft.CodeAnalysis.MetadataReferenceProvider, Microsoft.CodeAnalysis.AssemblyIdentityComparer, Microsoft.CodeAnalysis.StrongNameProvider)'.
Microsoft.AspNet.Mvc.Razor.Compilation.RoslynCompilationService.Compile(String content)

Stack
MissingMethodException: Method not found: 'Void Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions..ctor(Microsoft.CodeAnalysis.OutputKind, System.String, System.String, System.String, System.Collections.Generic.IEnumerable1<System.String>, Boolean, Boolean, Boolean, System.String, System.String, System.Nullable1, Int32, UInt64, Microsoft.CodeAnalysis.Platform, Microsoft.CodeAnalysis.ReportDiagnostic, Int32, System.Collections.Generic.IEnumerable1<System.Collections.Generic.KeyValuePair2<System.String,Microsoft.CodeAnalysis.ReportDiagnostic>>, Boolean, Microsoft.CodeAnalysis.DebugInformationKind, Microsoft.CodeAnalysis.SubsystemVersion, System.String, Boolean, Microsoft.CodeAnalysis.XmlReferenceResolver, Microsoft.CodeAnalysis.SourceReferenceResolver, Microsoft.CodeAnalysis.MetadataReferenceResolver, Microsoft.CodeAnalysis.MetadataReferenceProvider, Microsoft.CodeAnalysis.AssemblyIdentityComparer, Microsoft.CodeAnalysis.StrongNameProvider)'.
Microsoft.AspNet.Mvc.Razor.Compilation.RoslynCompilationService.Compile(String content)
Microsoft.AspNet.Mvc.Razor.RazorCompilationService.CompileCore(IFileInfo file)
Microsoft.AspNet.Mvc.Razor.RazorCompilationService.<>c__DisplayClass0.b__1()
Microsoft.AspNet.Mvc.Razor.CompilerCache.GetOrAdd(IFileInfo file, Func1 compile) Microsoft.AspNet.Mvc.Razor.RazorCompilationService.Compile(IFileInfo file) Microsoft.AspNet.Mvc.Razor.VirtualPathRazorPageFactory.CreateInstance(String path) Microsoft.AspNet.Mvc.Razor.RazorViewEngine.CreateViewEngineResult(ActionContext context, String viewName, Boolean partial) Microsoft.AspNet.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName) Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext context, String viewName, Boolean partial) Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext context, String viewName) Microsoft.AspNet.Mvc.ViewResult.FindView(IViewEngine viewEngine, ActionContext context, String viewName) Microsoft.AspNet.Mvc.ViewResult.<ExecuteResultAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionResult>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionResultFilter>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionResultWithFilters>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() Microsoft.AspNet.Mvc.MvcRouteHandler.<RouteAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() Microsoft.AspNet.Routing.Template.TemplateRoute.<RouteAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() Microsoft.AspNet.Routing.RouteCollection.<RouteAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() Microsoft.AspNet.Builder.RouterMiddleware.<Invoke>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() Microsoft.AspNet.Security.Infrastructure.AuthenticationMiddleware1.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNet.RequestContainer.ContainerMiddleware.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNet.Diagnostics.ErrorPageMiddleware.d__1.MoveNext()

MusicStore project doesn't run on machine with only VS14 due to localdb instance name

The MusicStore project is configured to use a localdb instance called v11.0. This instance only exists on machines that have or have had VS 2013 installed on them at some point. This causes the MusicStore to fail on machines with only VS14 on them.

VS14 comes with two instances of localdb configured by default:

  • ProjectsV12
    • this one shows up SQL Server Object Explorer by default
  • MSSQLLocalDB
    • this one doesn't show up by default, but is there and can be used, and can be added to the toolbox manually if desired

Perhaps we should standardize on the ProjectsV12 instance for now as it's the one that shows up in the tooling.

Build failing on Master branch

Build is failing on Master branch (so does on Dev)

  1. Run Build.cmd
  2. Package restore successful.
  3. K version installed and use - 1.0.0-alpha4-10353
  4. Project 'MusicStore' is getting failed.
  5. Rest all projects (SPA and MVC) are building properly.

Few points from the Build log :

E:\Git\MusicStore\src\MusicStore\Models\MusicStoreContext.cs(12,18): error CS0311: The type 'MusicStore.Models.Applicati
onUser' cannot be used as type parameter 'TUser' in the generic type or method 'Microsoft.AspNet.Identity.EntityFramewor
k.IdentityDbContext'. There is no implicit reference conversion from 'MusicStore.Models.ApplicationUser' to 'Micr
osoft.AspNet.Identity.IdentityUser'.
E:\Git\MusicStore\src\MusicStore\Models\MusicStoreContext.cs(12,18): error CS0012: The type 'Microsoft.AspNet.Identity.I
dentityUser' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Id
entity, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.
E:\Git\MusicStore\src\MusicStore\Components\CartSummaryComponent.cs(30,54): error CS1061: 'MusicStore.Components.CartSum
maryComponent' does not contain a definition for 'Context' and no extension method 'Context' accepting a first argument
of type 'MusicStore.Components.CartSummaryComponent' could be found (are you missing a using directive or an assembly re
ference?)
E:\Git\MusicStore\src\MusicStore\Startup.cs(30,13): error CS0012: The type 'Microsoft.AspNet.Builder.IApplicationBuilder
' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Http, Version
=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
E:\Git\MusicStore\src\MusicStore\Startup.cs(75,13): error CS0012: The type 'Microsoft.AspNet.Builder.IApplicationBuilder
' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Http, Version
=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
E:\Git\MusicStore\src\MusicStore\Startup.cs(80,17): error CS0012: The type 'Microsoft.AspNet.Security.AuthenticationOpti
ons' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Security,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
E:\Git\MusicStore\src\MusicStore\Startup.cs(80,17): error CS0117: 'Microsoft.AspNet.Security.Cookies.CookieAuthenticatio
nOptions' does not contain a definition for 'AuthenticationType'
E:\Git\MusicStore\src\MusicStore\Startup.cs(80,38): error CS0103: The name 'ClaimsIdentityOptions' does not exist in the
current context
E:\Git\MusicStore\src\MusicStore\Startup.cs(81,17): error CS0012: The type 'Microsoft.AspNet.Http.PathString' is defined
in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Http, Version=1.0.0.0, Cu
lture=neutral, PublicKeyToken=null'.
E:\Git\MusicStore\src\MusicStore\Startup.cs(81,33): error CS0246: The type or namespace name 'PathString' could not be f
ound (are you missing a using directive or an assembly reference?)
E:\Git\MusicStore\src\MusicStore\Startup.cs(78,13): error CS0012: The type 'Microsoft.AspNet.Builder.IApplicationBuilder
' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Http, Version
=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
E:\Git\MusicStore\src\MusicStore\Startup.cs(85,13): error CS0012: The type 'Microsoft.AspNet.Builder.IApplicationBuilder
' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Http, Version
=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Deleting an album present in your cart breaks music store

This is an issue with the application itself. If you happen to delete an album which is in your cart it breaks music store and navigating to any path throws the following:

An unhandled exception occurred while processing the request.
InvalidOperationException: Sequence contains no elements
Remotion.Linq.Clauses.ResultOperatorBase.InvokeExecuteMethod(MethodInfo method, Object input)
• Stack 
• Query 
• Cookies 
• Headers 
• Environment
• InvalidOperationException: Sequence contains no elements
o   Remotion.Linq.Clauses.ResultOperatorBase.InvokeExecuteMethod(MethodInfo method, Object input)
o   Remotion.Linq.Clauses.ResultOperatorBase.InvokeGenericExecuteMethod[TInput,TResult](IStreamedData input, Func`2 genericExecuteCaller)
o   Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase.ExecuteInMemory(IStreamedData input)
o   Microsoft.Data.Entity.Query.EntityQueryModelVisitor.ExecuteResultOperator[TSource,TResult](IEnumerable`1 source, ResultOperatorBase resultOperator, StreamedSequenceInfo streamedSequenceInfo)
o   lambda_method(Closure , QueryContext )
o   Microsoft.Data.Entity.Relational.RelationalDataStore.Query[TResult](QueryModel queryModel, StateManager stateManager)
o   Microsoft.Data.Entity.Query.EntityQueryExecutor.ExecuteCollection[T](QueryModel queryModel)
o   Microsoft.Data.Entity.Query.EntityQueryExecutor.ExecuteSingle[T](QueryModel queryModel, Boolean returnDefaultWhenEmpty)
o   Remotion.Linq.Clauses.StreamedData.StreamedSingleValueInfo.ExecuteSingleQueryModel[T](QueryModel queryModel, IQueryExecutor executor)
o   Remotion.Linq.Clauses.StreamedData.StreamedSingleValueInfo.ExecuteQueryModel(QueryModel queryModel, IQueryExecutor executor)
o   Remotion.Linq.QueryModel.Execute(IQueryExecutor executor)
o   Remotion.Linq.QueryProviderBase.Execute(Expression expression)
o   Remotion.Linq.QueryProviderBase.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
o   System.Linq.Queryable.Single[TSource](IQueryable`1 source, Expression`1 predicate)
o   MusicStore.Models.ShoppingCart.GetCartItems() in ShoppingCart.cs
108.                    cartItem.Album = _db.Albums.Single(a => a.AlbumId == cartItem.AlbumId);
o   MusicStore.Components.CartSummaryComponent.GetCartItems() in CartSummaryComponent.cs
32.             var cartItems = cart.GetCartItems()
o   MusicStore.Components.CartSummaryComponent.<InvokeAsync>d__1.MoveNext() in CartSummaryComponent.cs
20.             var cartItems = await GetCartItems();
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
o   Microsoft.AspNet.Mvc.ReflectedActionExecutor.<CastToObject>d__2`1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
o   Microsoft.AspNet.Mvc.ReflectedActionExecutor.<CoerceResultToTaskAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
o   Microsoft.AspNet.Mvc.ReflectedActionExecutor.<ExecuteAsync>d__2.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
o   Microsoft.AspNet.Mvc.DefaultViewComponentInvoker.<InvokeAsyncCore>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
o   Microsoft.AspNet.Mvc.DefaultViewComponentInvoker.<InvokeAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Mvc.DefaultViewComponentHelper.<InvokeCoreAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Mvc.DefaultViewComponentHelper.<InvokeAsync>d__2.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
o   Microsoft.AspNet.Mvc.DefaultViewComponentHelper.<InvokeAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
o   0
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Mvc.Razor.RazorView.<RenderAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Mvc.Razor.RazorView.<RenderLayoutAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Mvc.Razor.RazorView.<RenderAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Mvc.ViewResult.<ExecuteResultAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionResult>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionResultFilter>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
o   Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionResultWithFilters>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Mvc.ReflectedActionInvoker.<InvokeActionAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Mvc.MvcRouteHandler.<RouteAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Routing.Template.TemplateRoute.<RouteAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Routing.RouteCollection.<RouteAsync>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Builder.RouterMiddleware.<Invoke>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__1.MoveNext()
o   --- End of stack trace from previous location where exception was thrown ---
o   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
o   System.Runtime.CompilerServices.TaskAwaiter.GetResult()
o   Microsoft.AspNet.Diagnostics.ErrorPageMiddleware.<Invoke>d__1.MoveNext()

how can I run MusicStore.spa?

Hi, I tried to open musicstore.spa in dev 14 ctp 1 and I'm unable to compile and run, and I have problems running k run and k web.
AM I missing something?

Handle EF exceptions nicely

Handle EF exceptions nicely and display something useful in the app, e.g.:

  • Missing record
  • Key violations
  • Concurrency exceptions

PathTooLongException when running on VS 2015 Preview

I cannot run MusicStore on my machine with Visual Studio 2015 Preview. It gives me the below error. I am getting this error for almost all projects where I use node_modules (even if exclude bower and npm paths):

Show Details Severity Code Description Project File Line
Error NuGet Package restore failed for project MvcMusicStore: Unable to find version '3.4.1.9004' of package 'Antlr'.. 0
Error System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.PathHelper.GetFullPathName()
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.File.InternalGetLastWriteTimeUtc(String path, Boolean checkHost)
at Microsoft.Framework.Runtime.Roslyn.RoslynCompiler.GetSyntaxTrees(Project project, IEnumerable1 sourceFiles, IEnumerable1 sourceReferences, CSharpParseOptions parseOptions)
at Microsoft.Framework.Runtime.Roslyn.RoslynCompiler.CompileProject(Project project, ILibraryKey target, IEnumerable1 incomingReferences, IEnumerable1 incomingSourceReferences, IList1 outgoingReferences) at Microsoft.Framework.Runtime.Roslyn.RoslynProjectReferenceProvider.GetProjectReference(Project project, ILibraryKey target, Func1 referenceResolver, IList1 outgoingReferences) at Microsoft.Framework.Runtime.ProjectLibraryExportProvider.<>c__DisplayClass0.<GetLibraryExport>b__3(CacheContext ctx) at Microsoft.Framework.Runtime.CacheExtensions.<>c__DisplayClass01.b__1(CacheContext ctx)
at Microsoft.Framework.Runtime.Cache.CreateEntry(Object k, Func2 acquire) at Microsoft.Framework.Runtime.Cache.<>c__DisplayClass10.<AddEntry>b__11() at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy1.get_Value()
at Microsoft.Framework.Runtime.Cache.Get(Object key, Func2 factory) at Microsoft.Framework.Runtime.CacheExtensions.Get[T](ICache cache, Object key, Func2 factory)
at Microsoft.Framework.Runtime.ProjectLibraryExportProvider.GetLibraryExport(ILibraryKey target)
at Microsoft.Framework.Runtime.CompositeLibraryExportProvider.<>c__DisplayClass0.b__1(ILibraryExportProvider r)
at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate) at Microsoft.Framework.Runtime.CompositeLibraryExportProvider.GetLibraryExport(ILibraryKey target) at Microsoft.Framework.Runtime.ProjectExportProviderHelper.GetExportsRecursive(ICache cache, ILibraryManager manager, ILibraryExportProvider libraryExportProvider, ILibraryKey target, Boolean dependenciesOnly) at Microsoft.Framework.Runtime.LibraryManager.<>c__DisplayClass0.<GetAllExports>b__1(CacheContext ctx) at Microsoft.Framework.Runtime.CacheExtensions.<>c__DisplayClass01.b__1(CacheContext ctx)
at Microsoft.Framework.Runtime.Cache.CreateEntry(Object k, Func2 acquire) at Microsoft.Framework.Runtime.Cache.<>c__DisplayClass10.<AddEntry>b__11() at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy1.get_Value()
at Microsoft.Framework.Runtime.Cache.Get(Object key, Func2 factory) at Microsoft.Framework.Runtime.CacheExtensions.Get[T](ICache cache, Object key, Func2 factory)
at Microsoft.Framework.Runtime.LibraryManager.GetAllExports(String name, String aspect)
at Microsoft.Framework.Runtime.LibraryManager.GetAllExports(String name)
at Microsoft.Framework.Runtime.ProjectMetadataProvider.GetProjectMetadata(String name)
at Microsoft.Framework.DesignTimeHost.ApplicationContext.Initialize(String appPath, String configuration, Boolean triggerBuildOutputs)
at Microsoft.Framework.DesignTimeHost.ApplicationContext.Calculate()
at Microsoft.Framework.DesignTimeHost.ApplicationContext.DoProcessLoop()
at Microsoft.Framework.DesignTimeHost.ApplicationContext.ProcessLoop(Object state) MusicStore.Spa 0

image

Could not load type 'Microsoft.Framework.DependencyInjection.ServiceCollection'

When running the music store project on OSX with KVM version 1.0.0-beta1 and Mono 3.10.0...

"KPM Restore" runs as expected
"K Kestrel" gives following error

System.TypeLoadException: Could not load type 'Microsoft.Framework.DependencyInjection.ServiceCollection' from assembly 'Microsoft.Framework.DependencyInjection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
  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 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.