version control - What parts of a Xamarin solution should be kept out of the repository? -
i'm working designer on xamarin.android application , having trouble keeping in sync. use mercurial, question should relevant git or other dvcs. .hgignore file looks this:
^bin/ ^obj/ ^components/ \.keystore$
i unsure these files:
^resources/resource.designer.cs \.sln$ \.userprefs$ \.csproj$
thanks!
update
found great community wiki confirmed excluding *.pidb , *.userprefs , implication confirms including *.sln , *.csproj
see: .gitignore visual studio projects , solutions
i'm not sold on including resource.designer.cs file. gets automatically regenerated after changes resources , includes notice:
// ------------------------------------------------------------------------------ // <autogenerated> // code generated tool. // mono runtime version: 4.0.30319.17020 // // changes file may cause incorrect behavior , lost if // code regenerated. // </autogenerated> // ------------------------------------------------------------------------------
with merge might reject id name change in layout file, accept file containing new name.
to answer question, you're wondering this:
^resources/resource.designer.cs \.sln$ \.userprefs$ \.csproj$
the resource.designer.cs
file should not ignored. sure, it'll regenerated in cases, if alter resx file generated from, committing version control removes hassle else, don't need regenerate it.
the .sln
, .csproj
files should definitely not ignored. solution file contains projects part of solution, , csproj file contains project information, both of need commit.
.userprefs
local file, contains user preferences user using machine, not want in version control.
here own xamarin ignore file, comments below:
syntax: glob _resharper.*/ [bb]in/ [oo]bj/ *.user *.userprefs *.suo .ds_store
the first line tells mercurial use glob library handle file masks.
the next line ignore resharper temporary files, added own subdirectory according project or solution name. note can ask resharper use temp folder on machine this, instead of storing in solution directory, may per-user setting ensure folder doesn't accidentally gets committed, ignore folder.
then ignore bin , obj folders, handling both upper , lowercase first letter, ie. bin ignored, bin.
then ignore extension user, userprefs, , suo, since of store local user preferences.
the last entry ignore mac resource folder.
if have ncrunch, teamcity, or finalbuilder, there additional entries want add:
_ncrunch_*/ _teamcity.*/ *.fb7lck *.fbl7 *.fbpinf
Comments
Post a Comment