我在Visual Studio 2013中打开的每个项目现在都突然给我以下错误:
EverySingleProject.csproj:错误:项目的默认XML名称空间必须是MSBuild XML名称空间.如果项目是以MSBuild 2003格式创作的,请在元素中添加xmlns ="http://schemas.microsoft.com/developer/msbuild/2003".如果项目是以旧的1.0或1.2格式编写的,请将其转换为MSBuild 2003格式.C:\ Program Files(x86)\ MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets
这是在文件中:
Project ToolsVersion ="12.0"DefaultTargets ="Build"xmlns ="http://schemas.microsoft.com/developer/msbuild/2003"
为什么这会失败?
我从web api获取同一对象的集合的集合.然后,我想将JSON反序列化为单个List
JSON如下:
{
"Liverpool": [
{
"playerId": "LIV01",
"name": "Adam Llana",
"position": "Midfielder"
},
{
"playerId": "LIV02",
"name": "Daniel Sturridge",
"position": "Forward"
}
],
"ManchesterUnited": [
{
"playerId": "MNU01",
"name": "Daley Blind",
"position": "Defender"
},
{
"playerId": "MNU02",
"name": "Romelu Lukaku",
"position": "Forward"
}
],
"Arsenal": [
{
"playerId": "ARS01",
"name": "Petr Cech",
"position": "Goalkeeper"
},
{
"playerId": "ARS02",
"name": "Santi Cazorla",
"position": "Midfielder"
}
]
}
Run Code Online (Sandbox Code Playgroud)
我想能够做的是以下因为我对集合名称不感兴趣:
public class Player
{
public string playerId { get; set; } …Run Code Online (Sandbox Code Playgroud)