एक .NET C# प्रोजेक्ट में जो स्रोत नियंत्रण के लिए जीआईटी का उपयोग करता है, मैं सबसे हाल ही में दिए गए कोड प्राप्त करने के लिए पुन: प्रयास करने के बाद विकृत csproj फ़ाइलों को प्राप्त करता रहता हूं। यह मेरा प्रक्रिया है:मेरी .csproj फ़ाइलों को गिट रिबेस के बाद गड़बड़ क्यों हो रही है?
- प्रतिबद्ध मेरी कोड
- निर्माण और चलाने के परीक्षण
- रिबेस "नवीनतम प्राप्त करने के लिए"
- , आकाश शाप के रूप में csproj फ़ाइल को खराब कर दिया है ... फिर
D:\GitHub\AwesomeProject>git rebase master
First, rewinding head to replay your work on top of it...
Applying: added getstatus call
Using index info to reconstruct a base tree...
M Host/Host.csproj
M Host/packages.config
M Trees/Trees.csproj
M Trees/packages.config
M UnitTests/UnitTests.csproj
<stdin>:1229: trailing whitespace.
<!-- To modify your build process, add your task inside one of the targets bel
ow and uncomment it.
warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging UnitTests/UnitTests.csproj
Auto-merging Trees/packages.config
CONFLICT (content): Merge conflict in Trees/packages.config
Auto-merging Trees/Trees.csproj
Auto-merging Host/packages.config
CONFLICT (content): Merge conflict in Host/packages.config
Auto-merging Host/Host.csproj
Failed to merge in the changes.
Patch failed at 0001 added getstatus call
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To check out the original branch and stop rebasing run "git rebase --abort".
:
यहाँ रिबेस पर उत्पादन है संघर्ष हैं, लेकिन जैसा कि आप इसे csproj फ़ाइलों को स्वतः विलय कर सकते हैं, और यह गलत तरीके से किया !! Csprojfile का एक्सएमएल मान्य नहीं है और प्रोजेक्ट लोड नहीं होता है। यहां एक छिपी हुई कथन है जो यह दिखता है:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
... most of one version the project file
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
... most of the other version the project file
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
</Project>
ऐसा क्यों हो रहा है? और मैं इससे निपटने के लिए अपनी प्रक्रिया में सुधार कैसे कर सकता हूं?
ऐसा करने के बाद से कोई समस्या नहीं आई है। धन्यवाद! –
एक साल बाद इसे पढ़ने वाले लोगों के लिए, आपको इस आलेख को गिटूब डेवलपर से देखना चाहिए: http://haacked.com/archive/2014/04/16/csproj-merge-conflicts/ –