xml – 如何修复损坏的csproj文件?

前端之家收集整理的这篇文章主要介绍了xml – 如何修复损坏的csproj文件?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我是一个正在研究项目的小组,并且正准备使用git从主分支重新启动我的分支.当rebase启动时,它突然崩溃并给我这个错误消息:

The project file could not be loaded. Name cannot 
begin with the '<' character,hexadecimal value 0x3C.
Line 173,position 2.

“csproj”文件似乎已损坏.我怎样才能解决这个问题?问题看起来像这样:

<ItemGroup>
    <Compile Include="App_Start\BundleConfig.cs" />
    <Compile Include="App_Start\FilterConfig.cs" />
    <Compile Include="App_Start\IdentityConfig.cs" />
    <Compile Include="App_Start\RouteConfig.cs" />
    <Compile Include="App_Start\Startup.Auth.cs" />
    <Compile Include="App_Start\WebApiConfig.cs" />
    <Compile Include="Controllers\AccountController.cs" />
    <Compile Include="Controllers\CategoryController.cs" />
<<<<<<< HEAD
    <Compile Include="Controllers\GalleryController.cs" />
=======
    <Compile Include="Controllers\CheckoutController.cs" />
>>>>>>> Checkout Works. something wrong with Authorization. No need be logged
    <Compile Include="Controllers\HomeController.cs" />
    <Compile Include="Controllers\ManageController.cs" />
    <Compile Include="Controllers\PhotoController.cs" />
    <Compile Include="Controllers\ShoppingCartController.cs" />
    <Compile Include="Controllers\StoreController.cs" />
    <Compile Include="Controllers\StoreManagerController.cs" />
    <Compile Include="Global.asax.cs">
      <DependentUpon>Global.asax</DependentUpon>
    </Compile>

解决方法

只需在csproj文件删除下面的文本类型即可

***<<<<<<<<<<<<<<<

– – – – -矿

“>>>>>>>>>>>>>>>>>>> ***

并重新加载项目它将工作.

猜你在找的XML相关文章