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

Change to build to use dotnet #586

Closed JunTaoLuo closed 8 years ago

JunTaoLuo commented 8 years ago

Blocked on ServerTests updates. Will start once work there is complete.

Eilon commented 8 years ago

@kichalla a gift from John.

cheers00 commented 8 years ago

Wondering if ASP.NET5 and MusicStore will continue to use dnx and dnu or moving to dotnet cli. Currently I can restore but can not run E2E test.

From: https://github.com/dotnet/cli

Interested in .NET Core + ASP.NET 5 RC bits?

This toolchain is independent from the DNX-based .NET Core + ASP.NET 5 RC bits. If you are looking for .NET Core + ASP.NET 5 RC bits, you can find instructions on the http://get.asp.net/.

Eilon commented 8 years ago

@cheers00 everything is switching over to dotnet-cli, nothing will use dnx and dnu because they are going away.

balneaves commented 8 years ago

Probably a bit premature since this issue is still open, but I get the following error if I try to run (dev branch) on OSX :

Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry point named 'GlobalizationNative_IsNormalized' in DLL 'System.Globalization.Native'.
   at Interop.GlobalizationNative.IsNormalized(NormalizationForm normalizationForm, String src, Int32 srcLen)
   at System.StringNormalizationExtensions.IsNormalized(String value, NormalizationForm normalizationForm)
   at Microsoft.AspNetCore.Server.Kestrel.Http.PathNormalizer.NormalizeToNFC(String path)
   at Microsoft.AspNetCore.Server.Kestrel.ServerAddress.FromUrl(String url)
   at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[TContext](IHttpApplication`1 application)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.Start()
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host, CancellationToken token, String shutdownMessage)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
   at MusicStore.Program.Main(String[] args)
.NET Command Line Tools (1.0.0)
Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.11
 OS Platform: Darwin
 Runtime Id:  osx.10.11-x64
kichalla commented 8 years ago

09590416bd2e08f3dcb42dce64454ea74855ac14

cheers00 commented 8 years ago

@kichalla I was able to build the latest but E2ETest project failed\skipped.

MusicStore.Test  Total: 23, Errors: 0, Failed: 0, Skipped: 0, Time: 1.938s
info: Exec
info:   program: dotnet
info:   commandline: test
info:   workingdir: test\E2ETests
xUnit.net DNX Runner (64-bit win7-x64)
  Discovering: E2ETests
  Discovered:  E2ETests
  Starting:    E2ETests
    E2ETests.SmokeTests_X64.NonWindowsOS(serverType: Kestrel, runtimeFlavor: CoreClr, architecture: x64, applicationBase
Url: "http://localhost:5011/") [SKIP]
      Test cannot run on this operating system.
    E2ETests.OpenIdConnectTests.OpenIdConnect_OnNonWindows(serverType: Kestrel, runtimeFlavor: CoreClr, architecture: x6
4, applicationBaseUrl: "http://localhost:5042/") [SKIP]
      Bug https://github.com/aspnet/dnx/issues/2958
    E2ETests.OpenIdConnectTests.OpenIdConnect_OnWindowsOS(serverType: Kestrel, runtimeFlavor: CoreClr, architecture: x64
, applicationBaseUrl: "http://localhost:5041/") [SKIP]
      Temporarily skipped the test to fix potential product issue

I tried to E2ETests run manually. dotnet.exe restore was successful but dotnet.exe run failed. Do I need to add emitEntryPoint: true to project.json?

Project E2ETests (DNXCore,Version=v5.0) was previously compiled. Skipping compilation.
Unhandled Exception: System.MissingMethodException: Entry point not found in assembly 'E2ETests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=
null'.
kichalla commented 8 years ago

@cheers00

  1. Change the aspnet vnext feed to <add key="AspNetVNext" value="https://www.myget.org/F/aspnetvolatiledev/api/v3/index.json" /> in MusicStore repo's Nuget.config
  2. dotnet restore
  3. dotnet build
  4. dotnet test (this will cause the dotnet xunit test runner to run the tests)