Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 如何修复损坏的csproj文件?_Xml_Git_Visual Studio_Rebase_Csproj - Fatal编程技术网

Xml 如何修复损坏的csproj文件?

Xml 如何修复损坏的csproj文件?,xml,git,visual-studio,rebase,csproj,Xml,Git,Visual Studio,Rebase,Csproj,我在一个项目组中工作,准备用master branch使用git的新更新重新确定我的分支的基础。当rebase启动时,它突然出现故障,并向我显示以下错误消息: The project file could not be loaded. Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 173, position 2. 无法加载项目文件。姓名不能 从“开始,当我想在ASP.NET MVC项目上与我

我在一个项目组中工作,准备用master branch使用git的新更新重新确定我的分支的基础。当rebase启动时,它突然出现故障,并向我显示以下错误消息:

The project file could not be loaded. Name cannot 
begin with the '<' character, hexadecimal value 0x3C.
Line 173, position 2.
无法加载项目文件。姓名不能
从“开始,当我想在ASP.NET MVC项目上与我的朋友合并时,我也遇到了这样一个问题,问题是当我使用git合并我们的项目时,.csproject文件中存在一些差异,因此我无法打开该项目


最后,我使用sublime打开该文件,发现问题在于我已将几个css样式表添加到项目中,然后我修复csproject文件中的合并冲突并打开该项目,最后解决项目中的其他冲突。

我同意Chrisaboo。问题在项目文件中。无论何时在Visual Studio中更新解决方案,都有可能发生合并冲突。您可以通过将项目文件与以前的版本进行比较并消除文本编辑器或版本控制工具中的差异来解决此问题。 这为我解决了这个问题


建议在Visual Studio中的文件夹级别而不是解决方案级别更新项目。

只需删除csproj文件中以下类型的文本即可


***这是一个互动的基础?是否可以删除所有项目相关文件并重新导入项目?(尝试备份)顺便说一下,csproj和其他IDE相关文件通常不受版本控制。它们应该被添加到。gitignore@NickVolynkin你好已尝试重新导入该项目。没有运气。仍然会收到错误消息,并停留在“1/2重基”上。你是说csproj不应该出现在主文件中吗?我应该删除它吗?过了一会儿,我找到了一个解决方案。事实证明这很简单。如果您有相同的问题,请签出此项:@NickVolynkin 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>