我正在使用Azure Devops管道,但出现此错误:
var value = '{"root":{"row":[{"DatabaseID":"21","fileid":"1","databaseName":"AutomationPortal","FileLogicalName":"AutomationPortal","FileFullPath":"D:\\\\MSSQL13.MSSQLSERVER\\\\MSSQL\\\\DATA\\\\AutomationPortal.mdf","FileSizeMB":"100.00","SpaceUsedMB":"10.25","MaxfileSizeMB":"-0.01","SPaceOnVolumeMB":"95110.38","AutogrowSetting":"8192"},{"DatabaseID":"21","fileid":"3","databaseName":"AutomationPortal","FileLogicalName":"AutomatioPortal_01","FileFullPath":"D:\\\\MSSQL13.MSSQLSERVER\\\\MSSQL\\\\DATA\\\\AutomatioPortal_01.ndf","FileSizeMB":"100.00","SpaceUsedMB":"0.06","MaxfileSizeMB":"130.00","SPaceOnVolumeMB":"95110.38","AutogrowSetting":"8192"}]}}'
var data = JSON.parse(value);
var tablearray = [];
tablearray.push("<table><tr>")
var queryRow = data.root.row.length;
var headerProperty = Object.keys(data.root.row[0]);
for (i = 0; i < headerProperty.length; i++) {
tablearray.push("<th>" + headerProperty[i] + "</th>");
}
tablearray.push("</tr>");
//console.log(tablearray);
for (i = 0; i < queryRow; i++) {
tablearray.push("<tr>")
for (j = 0; j < headerProperty.length; j++) {
// console.log(headerProperty[j]);
// console.log(data.root.row[0].DatabaseID);
// console.log(data.root.row[i].headerProperty[j]);
tablearray.push("<td>" + data.root.row[i][headerProperty[j]] + "</td>");
}
tablearray.push("</tr>");
}
tablearray.push("</table>");
document.write(tablearray.join(''));
-该项目建立在Visual Studio的本地系统上,没有任何问题
-生成过程是“ Visual Studio生成”。
-resx文件设置为使用“ PublicResXFileCodeGenerator”
-resx文件同时存在于我的本地文件和存储库中
-我尝试将它们删除并重新添加到项目中
-我尝试完全删除对它们的引用,但这会在本地产生编译错误