[英]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.在运行新创建的全新 Azure function 项目时,我在 Visual Studio 代码中遇到以下错误。
It's roughly about .NET Core Sdk and all other errors seems to be relate with that.大约是 .NET Core Sdk ,所有其他错误似乎都与此有关。 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 CSProj文件
As I have.Net SDK 6.0.100
along with 6.0.101
as you can see below:正如我所拥有的.Net SDK
6.0.100
和6.0.101
一样,如下所示:
And Created the Azure Functions of Stack .Net 6.0 Http Trigger Function through Visual Studio Code, it is running successfully.并通过Visual Studio Code创建了Stack .Net 6.0 Http Trigger Function的Azure函数,运行成功。
Here is my .csproj
file:这是我的
.csproj
文件:
As I believe that you're missing the SDK Package Reference
in the ItemGroup of your .csproj
file:我相信您在
.csproj
文件的 ItemGroup 中缺少SDK Package Reference
:
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.0.1" />
Include it in the .csproj
file and check running the function.将其包含在
.csproj
文件中并检查运行 function。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.