微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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文件删除下面的文本类型即可

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

– – – – -矿

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

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。