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); }
public bool ReferenceExists(string name) { return(References.ContainsKey(name) || FrameworkReferences.Contains(name)); }
public Task <bool> ReferenceExistsAsync(string name) { return(Task.FromResult(References.ContainsKey(name) || FrameworkReferences.Contains(name))); }