1

Just updated to AspNetCore and having issues with the client side still referencing the ASPNET MVC packages, such as:

"Microsoft.AspNet.Mvc": "1.0.0-*"

They no longer exist in my package directory or have a reference in the project json and have been replaced by their new namespaces such as:

"Microsoft.AspNetCore.Mvc.Razor": "1.0.0-*"

I also deleted and regenerated the lock file. Getting errors like Razor does not exist in the namespace Micosoft.AspNet.Mvcand IUrlHelper etc. I also ran the new dotnet commands with no luck.

{
  "version": "1.0.0-*",
  "compilationOptions": {
    "emitEntryPoint": true,
    "define": [ "DEMO", "TESTING" ]
  },
  "dependencies": {
    "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
    "Microsoft.AspNetCore.Server.WebListener": "0.1.0-*",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
    "Microsoft.AspNetCore.Mvc": "1.0.0-*",
    "Microsoft.AspNetCore.Hosting": "1.0.0-*",   
    "Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
    "Autofac": "4.0.0-*",
    "Autofac.Extensions.DependencyInjection": "4.0.0-*", 
    "Newtonsoft.Json": "8.0.2",
    "Microsoft.AspNetCore.Authentication.Facebook": "1.0.0-*",
    "Microsoft.AspNetCore.Diagnostics.Elm": "0.1.0-rc2-16612",
    "Microsoft.AspNetCore.Mvc.Core": "1.0.0-*",
    "WindowsAzure.Storage": "6.2.2-preview",
    "System.Linq.Parallel": "4.0.0",
    "Microsoft.AspNetCore.Cors": "1.0.0-*",
    "Microsoft.AspNetCore.Authentication": "1.0.0-*",
    "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-*",
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-*",
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-*",
    "Microsoft.WindowsAzure.Caching": "2.7.0.0",
    "Microsoft.AspNetCore.Mvc.DataAnnotations": "1.0.0-*",  
    "Google.Apis.Oauth2.v2": "1.10.0.1050",
    "Google.Apis.Gmail.v1": "1.9.2.340",
    "Google.Apis": "1.10.0",
    "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-*",
    "Microsoft.AspNetCore.Mvc.ViewFeatures": "1.0.0-*",
    "Microsoft.AspNetCore.Mvc.Abstractions": "1.0.0-*",
    "Microsoft.AspNetCore.Mvc.Razor": "1.0.0-*",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0-rc2-*",
    "Microsoft.NETCore.Platforms": "1.0.1-*",
    "Microsoft.AspNetCore.Session": "1.0.0-rc2-*"
  },
  "commands": {
    "web": "makeithappen"
  },
  "frameworks": {
    "dnx451": {
      "frameworkAssemblies": {
        "System.Web": "4.0.0.0"
      }  
    }

  },
  "exclude": [
    "wwwroot",
     "node_modules",
      "bower_components",
      "dist",
      ".tmp"
  ],
  "publishExclude": [
    "**.user",
    "**.vspscc",
    "*.cmd"
  ],
  "scripts": {
        "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
    }
6
  • Try using packagesearch.azurewebsites.net to find which packages you need. Right now it's a bit awkward and requires some trial and error. Commented Mar 2, 2016 at 17:11
  • The packages resolve successfully server side. Commented Mar 2, 2016 at 17:14
  • Hmm. Sounds like something is still referencing those packages. If you've removed everything that references Microsoft.AspNet, you shouldn't be getting errors about that namespace. Can you post your project.json? Commented Mar 2, 2016 at 17:31
  • Are you using any third party packages that has not been updated to use .AspNetCore. and may pull in .AspNet. versions of packages? Commented Mar 2, 2016 at 17:41
  • at the top of Solution Explorer window in Visual Studio 2015, there is a text box for Search Solution Explorer, enter Microsoft.AspNet.Mvc there and hopefully you can find which package is referring to them. Commented Mar 3, 2016 at 7:41

1 Answer 1

1

Controller and view component discovery was broken.

"As part of our recent migration, we broke compatibility with DNX in Mvc"

Visit https://github.com/aspnet/Announcements/issues/154

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.