Adding and removing item from AssemblyInfo.cs when changing a property on a shape

Hi There,

I have managed to add an attribute in assemblyinfo.cs when i change a property on my shape but struggling to remove an item.


Here is what i am doing:

public partial class MyDomainClass
 internal sealed partial class MyPropertyPropertyHandler
  protected override void OnValueChanging(MyDomainClass element, bool oldValue, bool newValue)
   base.OnValueChanging(element, oldValue, newValue);

    if (element is Page)
     _DTE dte = element.Store.GetService(typeof(_DTE)) as _DTE;

     if (dte != null && dte.ActiveDocument != null)
      Project pr = dte.ActiveDocument.ProjectItem.ContainingProject;
      ProjectItem pi = pr.ProjectItems.Item("Properties").ProjectItems
      if (newValue)
       pi.FileCodeModel.AddAttribute("MyAttribute", "MyValue");
       //got code that loops through all the 
       //attributes and gets the correct one 
       //just don't know how to delete the entry            

Thanks in advance…

Hello.I suggest that you have a look to the following open-source project  

Thanks Jean, Will have a look…. 🙂 Getting allot of grey hair from DSL….lol…but learning allot while doing it…