public void AddFrameworkReference(string name) { if (FrameworkReferences.Contains(name)) { throw new InvalidOperationException("Cannot add existing reference. That would be a COMException in VS"); } FrameworkReferences.Add(name); }
public Task AddFrameworkReferenceAsync(string name, string packageId) { if (FrameworkReferences.Contains(name)) { throw new InvalidOperationException("Cannot add existing reference. That would be a COMException in VS"); } FrameworkReferences.Add(name); return(Task.CompletedTask); }