简体   繁体   English

使用Visual Studio 2017的C#(xamarin.forms)警告

[英]Warning in C# (xamarin.forms) using visual studio 2017

when i just create a xamarin.forms project the visual studio show me this warning and when i try to lunch the project it is stop after while and tell me there were deployment errors .what i must to do 当我刚创建一个xamarin.forms项目时,Visual Studio会向我显示此警告,当我尝试对该项目进行午餐时,它会在一段时间后停止并告诉我存在部署错误。我该怎么办

Warning IDE0006 Error encountered while loading the project. 警告IDE0006加载项目时遇到错误。 Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. 某些项目功能(例如针对失败项目的完整解决方案分析以及依赖该项目的项目)已被禁用。

Looks to me like an error in the code analysis module which is used for code rules. 在我看来,这是用于代码规则的代码分析模块中的错误。 It is not currently supported for several new project types such as .NET Standard 2.0. 当前不支持几种新项目类型,例如.NET Standard 2.0。 You will not be able to find the option to turn it off inside Visual Studio. 您将无法在Visual Studio中找到将其关闭的选项。 You will need to edit the project file. 您将需要编辑项目文件。 Try opening it up in notepad, it might look something like this: 尝试在记事本中打开它,它可能看起来像这样:

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <RunCodeAnalysis>true</RunCodeAnalysis>
    <CodeAnalysisRuleSet>CodeRules.ruleset</CodeAnalysisRuleSet>
  </PropertyGroup>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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