Remove project reference programmatically using C# RRS feed

  • Question

  • Hi

    I want to remove "Microsoft.VisualBasic" and "Microsoft.VisualBasic.Compatibility" reference from a VB.Net project programmatically using C#. In C# application I will just provide the VB.Net project path and both the references should be removed. Any link or code will be highly appreciated.


    Friday, May 17, 2013 6:09 AM


  • Easiest approach is to just open the file as XML and remove the references.

    Alternatively there is the Microsoft.Build.Construction namespace but from my understanding the types that are needed are internal so I don't know how you'd get started with it.  Some folks have wrapped the internal types but this could be dangerous.

    Michael Taylor

    Friday, May 17, 2013 2:21 PM