Why is there not a Microsoft.AspNetCore.Mvc.ViewFeatures, Version 6.0.0.0 in NuGet?

Rod Workman 1 Reputation point
2022-07-05T19:36:57.757+00:00

Unable to use assembly Microsoft.AspNetCore.Mvc.ViewFeatures, Version 6.0.0.0 in Azure Functions project. I need the ViewResult to support the view model in a Blazor client application. The latest Microsoft.AspNetCore.Mvc.ViewFeatures I can add via NuGet is Microsoft.AspNetCore.Mvc.ViewFeatures, Version 2.2.0. With this I get a Compiler Error CS1705.

Error CS1705 Assembly 'Csla.AspNetCore' with identity 'Csla.AspNetCore, Version=6.0.0.0, Culture=neutral, PublicKeyToken=93be5fdc093e4c30' uses 'Microsoft.AspNetCore.Mvc.ViewFeatures, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' which has a higher version than referenced assembly 'Microsoft.AspNetCore.Mvc.ViewFeatures' with identity 'Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' Arms.AzureFunctions D:\dev\Pawportunities\Arms.AzureFunctions\CSC 1 Active

Why is there not a Microsoft.AspNetCore.Mvc.ViewFeatures, Version 6.0.0.0 in NuGet?

Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | .NET | Blazor
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2022-07-05T19:54:00.027+00:00

    the nuget package was moved to asp.net core 6 framework, so it is no longer required. many of the asp.net core nuget packages were moved and are now more interdependent.

    just remove the package from the project


  2. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2022-07-06T01:49:47.487+00:00

    the Microsoft.AspNetCore.Mvc.ViewFeatures.dll is in the Microsoft.AspNetCore.App runtime folder. Not sure if you can get aspnetcore library to work with the azure functions. one of the features of the aspnetcore runtime, is it can update core features.

    you may need to deploy as web app rather than a azure function. you certainly can call it from an azure function.

    0 comments No comments

  3. Rod Workman 1 Reputation point
    2022-07-06T12:39:33.607+00:00

    My Azure Functions project was based on <Project Sdk="Microsoft.NET.Sdk"> . I updated the Sdk reference to be <Project Sdk="Microsoft.NET.Sdk.Web">. This added Microsoft.AspNetCore.App.Ref under the dependencies frameworks. Now I can reference the Controller that is part of Microsoft.AspNetCore.Mvc.ViewFeatures.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.