All I have to do is open up a Xamarin.Forms solution file and build, and I typically see a huge number of changes to the Xamarin.Android/Resources/Resource.designer.cs
file. The same occurs for other developers on my team. If we are each working on a feature branch of our own, this can easily lead to merge conflicts in this Resources/Resource.designer.cs
file. As an auto-generated file, should this file even be in source control?
Here are the data points I've gathered so far:
- An ancient Bugzilla report from 2011 where a user suggests keeping
Resources.Resource.designer.cs
out of source control... But the bug was closed without any action.- Note that the last response (in 2012) mentions that developers can add this to their
.gitignore
file if they like. Does this indicate there would be no problem in doing so? It sounds like it.
- Note that the last response (in 2012) mentions that developers can add this to their
- I found a more recent (2016) discussion on the Xamarin forums site asking if one could ignore this file.
- One user said there 'should' be no problems.
- Another user referenced the
.gitignore
file from Xamarin's own samples repository. This does ignore theXamarin.Android/Resources/Resource.designer.cs
file(s). This seems like fairly rock-solid evidence that it can be ignored. But I'm still nervous, since a newXamarin.Forms
app doesn't ignore this file by default in Visual Studio. - Finally, a third user generated a
.gitignore
using gitignore.io (generated file here), and found that it did not ignore the file.
That is the question, my fellow developers. It seems safe, but I'd love to hear your opinions in the comments below!
After running a quick twitter poll, Dan Siegel weighed in with some very solid reasoning and advice. The conclusion I've come away with is that it's perfectly fine, and IMHO preferable to ignore this file.