mhutch / MonoDevelop.AddinMaker

Extension to make it easier to create Visual Studio for Mac / MonoDevelop extensions
MIT License
50 stars 26 forks source link

Remove Entry Added in Xamarin Forms Project #78

Open kalirajanganesan opened 5 years ago

kalirajanganesan commented 5 years ago

Hi @mhutch / @mrward ,

We created the visualstudio mac extension file (mac) using addin maker for adding some files in the project We are using the below codes for add the files to project

Options 1:

IdeApp.ProjectOperations.AddFilesToProject(DotNetProject project,FilePath[] files, FilePath[] Targetdirectory, string buildAction);

Option 2:

project.AddFile(string File, string buildAction);

While adding the files to project remove entry added for some files like below image.

image

Could you please help to overcome that issue or else share the information any other options to add the project?

Note : This issue Randomly occurred not occured every time

mrward commented 5 years ago

I think this is a bug in VS Mac. Do you have a good way to reproduce this?

kalirajanganesan commented 5 years ago

Hi @mrward ,

The issue occurred in normal Microsoft project.

Reproducing steps:

image

Kannan1015 commented 5 years ago

I too facing this same problem even adding the XAML file from Add new item. Do we have a solution for this?

mrward commented 5 years ago

I can only reproduce this when the .xaml and .xaml.cs file are moved outside VS Mac. Doing the same thing inside the IDE does not show this problem. Thanks to @Kannan1015 for providing a screen recording.

This problem is being tracked on the Developer Community site:

https://developercommunity.visualstudio.com/content/problem/831208/xaml-file-getting-removed-when-installing-the-nuge.html

I think we can close this one on GitHub since it is not an Addin Maker bug.