Bug 39750 - Visual Studio source control does not automatically include asset catalog `.plist` and image files when using Team Foundation Version Control
Summary: Visual Studio source control does not automatically include asset catalog `.p...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: Normal enhancement
Target Milestone: 4.3.0 (C9)
Assignee: Emanuel
Depends on:
Reported: 2016-03-18 00:56 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2017-02-07 13:53 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Test case (16.18 KB, application/zip)
2016-03-18 00:56 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Logs (3.45 KB, application/x-zip-compressed)
2017-02-07 12:45 UTC, Prashant manu

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Brendan Zagaeski (Xamarin Team, assistant) 2016-03-18 00:56:35 UTC
Created attachment 15453 [details]
Test case

Visual Studio source control does not automatically include asset catalog `.plist` and image files when using Team Foundation Version Control

This is probably the "correct" expected behavior from the perspective of Visual Studio _itself_ because these files are all marked with the `<InProject>false</InProject>` element in the `.csproj` file.

## Possible improvements

Perhaps there is a way to tell Visual Studio that these files _should_ be included in Team Foundation Version Control even though they are intentionally _not_ shown in the list of project files in the Solution Explorer?

Another option might be simply to stop automatically applying the `<InProject>false</InProject>` element to these `ImageAsset` files, but that approach does have its own downsides with respect to aesthetics and clarity.

## Regression status: not a regression

## Steps to replicate

1. Set up a Team Foundation Server and a corresponding Team Project. (You can use Visual Studio Team Services to host the Team Project if you like.)

2. Open the attached test case in Visual Studio. (The test case is just a template iPhone project with 1 icon added to an asset catalog.) 

3. Right-click the solution name in Solution Explorer and select "Add Solution to Source Control".

4. Select "Team Foundation Version Control". (This bug does not affect the "Git" source control option.)

5. Open the "View -> Team Explorer" window.

6. Select the "Pending Changes" button.

## Results

The following files are _not_ listed under the "Included Changes":

- Resources\Media.xcassets\AppIcons.appiconset\58x58.png
- Resources\Media.xcassets\AppIcons.appiconset\Contents.json
- Resources\Media.xcassets\LaunchImages.launchimage\Contents.json

(The user must add them by hand from the "Excluded Changes" section.)

## Expected results

Ideally all 3 of the files under `Media.xcassets` should be listed automatically under "Included Changes". That way the user will not have to add them by hand.

(If you select "Git" at step 4, all 3 of the files are indeed automatically listed under "Included Changes", so this issue currently only affects Team Foundation Version Control.)

## Version info (brief)

### Windows 8.1 (64-bit)

Visual Studio 2015, Update 1
Xamarin (f869dba)
Comment 2 xamarin-release-manager 2016-11-16 16:48:07 UTC
Fixed in version (master)

Author: Emanuel
Commit: b67671662b9c943dd2a2d2d447c393c5a6bb04b6 (xamarin/XamarinVS)
Comment 3 xamarin-release-manager 2016-11-22 14:21:38 UTC
Fixed in version (cycle9)

Author: Emanuel
Commit: 510f318c8534dbef2287ab18e41b04cda0972dd5 (xamarin/XamarinVS)
Comment 6 Emanuel 2017-02-07 13:53:33 UTC
Hi @Prashant and @Brendan, we cannot fix the scenario described in comment1, simply because when you create en new Team Project over an existent Solution, it'll get all the files and decide what to do with each of those, and we cannot intercept that. 

The fix that was done improves the integration with TFS once your Solution has been added to a Team Project, in that case when you add/modify/delete any Asset Catalog file (using our editor) we'll let TFS know that file should be marked as added/modified/deleted. We can interact with an existent TFS instance, but we cannot intercept the creation of a new TeamProject and the way it auto-detect files.

@Brendan, do you think there is anything else we can do to improve the current TFS integration?