[英]The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft'
I have created a very basic (default) function app using Visual Studio by following MS Docs -我按照MS Docs使用 Visual Studio 创建了一个非常基本的(默认)function 应用程序 -
Installed the packages according to the doc only.仅根据文档安装软件包。
After I created a new function app, I am seeing this errors -在我创建了一个新的 function 应用程序后,我看到了这个错误 -
csproj csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.11" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
Let me know if anything else I need to provide?让我知道我是否需要提供其他任何东西?
It looks like you do not have the required nuget packages installed.看起来您没有安装所需的 nuget 软件包。
Use the "Manage packages for the solution" to install the missing packages.使用“管理解决方案的包”来安装缺少的包。
See: https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio#manage-packages-for-the-solution请参阅: https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio#manage-packages-for-the-solution
The picture in the article shows the "Microsoft.AspNet.Mvc" package文中图片为“Microsoft.AspNet.Mvc”package
Please check if you have the following Nuget-Package
in the Dependencies.请检查依赖项中是否有以下Nuget-Package
。
If you don't have the Nuget-package
Microsoft.NET.Sdk.Functions
, please right-click Packages->Manage Nuget-package->Search the package and install it.如果您没有Nuget-package
Microsoft.NET.Sdk.Functions
,请右键单击 Packages->Manage Nuget-package->搜索 package 并安装它。
If you already have the Nuget-package
Microsoft.NET.Sdk.Functions
, please find it in the Installed tab and reinstall it.如果您已经拥有Nuget-package
Microsoft.NET.Sdk.Functions
,请在已安装选项卡中找到它并重新安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.