Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, April 25, 2016 8:07 PM
Would there be any issue in adding the Resource.Designer.cs files to my gitignore?
All replies (7)
Tuesday, April 26, 2016 12:08 AM âś…Answered
@ClayAckerland - technically no because Xamarin is meant to automatically regenerate the file if it doesn't exist. But since you are only using .gitignore on the file, it should still be referenced in your project (.proj). As such when they rebuild the project, it should be recreated and build correctly.
I keep mentioning "should" and "meant to" because they are occasionally some issues that prevent the regeneration from happening properly.
Tuesday, April 26, 2016 12:34 AM
Great thank you.
Wednesday, September 20, 2017 9:27 AM
@ClayAckerland Any problems so far? I guess there shouldn't be ones.
Tuesday, February 13, 2018 4:48 PM
For future folks coming here, check out the link below from the official Xamarin.Forms samples GitHub page. They are actually ignoring these files.
https://github.com/xamarin/xamarin-forms-samples/blob/master/.gitignore
Since it is generated at compile time, it can technically be removed. It's up to you.
Example for GitIgnore: ```
Xamarin.Android Resource.Designer.cs files
/
.Android//[Rr]esource.[Dd]esigner.cs /.Droid//[Rr]esource.[Dd]esigner.cs /Android//[Rr]esource.[Dd]esigner.cs /Droid//[Rr]esource.[Dd]esigner.cs ```
Wednesday, February 21, 2018 2:58 PM
I see that the xamarin-forms-samples ignore the files, but they've also committed an initial version of the Resource.Designer.cs file. Is this initial commit required for the file, or can the file be ignored and nothing added to source control?
Wednesday, February 21, 2018 4:14 PM
I have successfully excluded the Resource.Designer.cs file from git, with none in the initial commit either. I have cloned multiple times and I never have a problem.
Monday, July 16, 2018 11:04 PM
@DamianSuess said: For future folks coming here, check out the link below from the official Xamarin.Forms samples GitHub page. They are actually ignoring these files.
https://github.com/xamarin/xamarin-forms-samples/blob/master/.gitignore
Since it is generated at compile time, it can technically be removed. It's up to you.
Example for GitIgnore: ```
Xamarin.Android Resource.Designer.cs files
/
.Android//[Rr]esource.[Dd]esigner.cs /.Droid//[Rr]esource.[Dd]esigner.cs /Android//[Rr]esource.[Dd]esigner.cs /Droid//[Rr]esource.[Dd]esigner.cs ```
Interestingly, gitignore.io does not ignore these. Below is link to generated gitignore.io file for VisualStudio and XamarinStudio https://gitignore.io/api/visualstudio,xamarinstudio