Reputation: 532
I have created a very basic (default) function app using Visual Studio by following MS Docs-
Installed the packages according to the doc only.
After I created a new function app , I am seeing this errors -
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?
Upvotes: 0
Views: 5234
Reputation: 5986
Please check if you have the following Nuget-Package
in the Dependencies.
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.
If you already have the Nuget-package
Microsoft.NET.Sdk.Functions
, please find it in the Installed tab and reinstall it.
Upvotes: 1
Reputation: 65361
It looks like you do not have the required nuget packages installed.
Use the "Manage packages for the solution" to install the missing packages.
The picture in the article shows the "Microsoft.AspNet.Mvc" package
Upvotes: 1