我注意到在我的 PUBXML 文件中,第一个元素带有蓝色波浪下划线。当我删除它并尝试输入它时,我注意到智能感知无法识别它。我已经检查过MSDN about PUBXML files这似乎是正确的。
我还注意到,当我删除
可能是什么错误?如何排除故障?
以下是该文件的内容。请注意,这是MS/VS和Azure发布文件下载自动提供的未篡改版本。
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is used by the publish/package process of your Web project.
You can customize the behavior of this process by editing this MSBuild
file. In order to learn more about this please visit
http://go.microsoft.com/fwlink/?LinkID=208121. -->
<Project
ToolsVersion="4.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>...</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>False</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<MSDeployServiceURL>...</MSDeployServiceURL>
<DeployIisAppPath>VisitMore</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>Chamster</UserName>
<_SavePWD>True</_SavePWD>
<PrecompileBeforePublish>True</PrecompileBeforePublish>
<EnableUpdateable>False</EnableUpdateable>
<DebugSymbols>False</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
</PropertyGroup>
</Project>
最佳答案
XML 编辑器将在您指定的 xmlns 中未定义的任何内容下放置一个蓝色波浪线。然而,这种情况一直在发生——考虑到 MSBuild 允许您定义任意属性名称,VS 附带的 MSBuild 架构具有相对较少的属性。事实上,即使您在大多数情况下打开项目文件,您也会发现这些曲线。
忽略蓝色曲线即可。
关于c# - 智能感知无法识别 PUBXML 中的正确标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20921790/