我正在升级一些旧的解决方案,在自动迁移并在迁移报告中列出后,很少有项目遇到以下错误
名称不能以“?”开头字符,十六进制值0x3f.line
1,位置3。
我在网上做了一些调查,但找不到那个角色的结果?.
我查过了
名称不能以“”字符开头,十六进制值0x20
名称不能以“$”字符开头,十六进制值0x24
但解决方案似乎不适合我的情况。
我研究了csproj,并通过在线工具验证了XML的有效性,一切看起来都很好。
失败的项目似乎是ASP.NET站点或SOAP Web服务。
一个csproj中的内容
<?xml version="1.0" encoding="utf-8"?>
<VisualStudioProject>
<CSHARP ProjectType="Web" ProductVersion="7.10.3077" SchemaVersion="2.0" ProjectGuid="{9CCCD8A9-8CEF-4FFF-80C6-8123FC554342}" SccProjectName="SAK" SccLocalPath="SAK" SccAuxPath="SAK" SccProvider="SAK">
<Build>
<Settings ApplicationIcon="" AssemblyKeyContainerName="" AssemblyName="PortalHome" AssemblyOriginatorKeyFile="" DefaultClientScript="JScript" DefaultHTMLPageLayout="Grid" DefaultTargetSchema="IE50" DelaySign="false" OutputType="Library" PreBuildEvent="" PostBuildEvent="" RootNamespace="PortalHome" RunPostBuildEvent="OnBuildSuccess" StartupObject="">
<Config Name="Debug" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="DEBUG;TRACE" DocumentationFile="" DebugSymbols="true" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="false" OutputPath="bin\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4" />
<Config Name="Release" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="TRACE" DocumentationFile="" DebugSymbols="false" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="true" OutputPath="bin\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4" />
</Settings>
<References>
<Reference Name="System" AssemblyName="System" HintPath="..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" />
<Reference Name="System.Drawing" AssemblyName="System.Drawing" HintPath="..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll" />
<Reference Name="System.Data" AssemblyName="System.Data" HintPath="..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" />
<Reference Name="System.Web" AssemblyName="System.Web" HintPath="..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Web.dll" />
<Reference Name="System.XML" AssemblyName="System.Xml" HintPath="..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" />
<Reference Name="System.Web.Mobile" AssemblyName="System.Web.Mobile" HintPath="..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Web.Mobile.dll" />
</References>
</Build>
<Files>
<Include>
<File RelPath="AssemblyInfo.cs" BuildAction="Compile" />
<File RelPath="Default.aspx" BuildAction="Content" />
<File RelPath="Default.aspx.cs" DependentUpon="Default.aspx" SubType="ASPXCodeBehind" BuildAction="Compile" />
<File RelPath="Global.asax" SubType="Component" BuildAction="Content" />
<File RelPath="Global.asax.cs" DependentUpon="Global.asax" SubType="Code" BuildAction="Compile" />
<File RelPath="Global.asax.resx" DependentUpon="Global.asax.cs" BuildAction="EmbeddedResource" />
<File RelPath="Web.config" BuildAction="Content" />
</Include>
</Files>
</CSHARP>
</VisualStudioProject>
我想我找到了线索。
当我双击csproj时,它将创建一个tmp文件,如
vs2D44.tmp
. 它是XML格式,包含
<??>
<VisualStudioProject>
<CSHARP
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
something ...
我认为这就是错误信息实际来自的地方。但是,仍然不知道为什么或如何解决它。