简体   繁体   中英

Problem running .NET Core Azure functions on Visual Studio Code. Predefined type 'System.Object' is not defined or imported

I am getting following error in visual studio code while running brand new Azure function project created newly.

It's roughly about .NET Core Sdk and all other errors seems to be relate with that. Can somebody help me to get rid from them.

I already tested all other links but my problem is not related with the any of the described issues. 在此处输入图像描述

CSProjFile

在此处输入图像描述

在此处输入图像描述 在此处输入图像描述 虽然做

As I have.Net SDK 6.0.100 along with 6.0.101 as you can see below:

在此处输入图像描述

And Created the Azure Functions of Stack .Net 6.0 Http Trigger Function through Visual Studio Code, it is running successfully.

在此处输入图像描述

Here is my .csproj file:

在此处输入图像描述

As I believe that you're missing the SDK Package Reference in the ItemGroup of your .csproj file:

<PackageReference  Include="Microsoft.NET.Sdk.Functions"  Version="4.0.1"  />

Include it in the .csproj file and check running the function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM