c# - Visual Studio 2013 创建 Web API 项目时出错 : The element <#text> beneath element <Project> is unrecognized

标签 c# visual-studio-2013 asp.net-web-api2

我的 Visual Studio 安装有问题。

为了重现它,我创建了一个新的空白解决方案,然后:

  • 添加新项目..
  • ASP.NET 网络应用程序
  • 网络应用程序接口(interface)
  • 创建项目

Visual Studio 无法创建它,我收到此消息:

The element <#text> beneath element <Project> is unrecognized.

有什么解决办法吗?

最佳答案

如果 csproj 包含无效的 XML,您将得到这样的错误。
我不小心删除了<!--时遇到了这个错误在 csproj 文件中并留下 --> :

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>

关于c# - Visual Studio 2013 创建 Web API 项目时出错 : The element <#text> beneath element <Project> is unrecognized,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29794426/

相关文章:

asp.net-web-api - 网址链接() : Route cannot be found when using attribute routing

c# - Angular 7 与 SignalR Hub 的连接失败

c# - ActionResult 的不同结果

c# - 如何复制具有不同名称的工作表 - C# 和 Excel Interop

c# - 为什么我必须在结构构造函数中分配所有字段?

c# - 更改文本框中的粘贴内容

c - Portaudio:防止在 c 中打印到控制台

python - django 1.7、python 3.4 : Microsoft Visual Studio 10. 0\\VC\\BIN\\cl.exe' 上的 mysql-python 错误

c++ - WM_HOTKEY 没有捕捉到

oauth-2.0 - 在 OAuthBearer 中间件上使用自定义 RoleClaimType