domingo, 12 de febrero de 2012

Cambiar el tamaño de los attachments

image

There where people who changes the attachment size using code:

TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(@"yourtfsserver/.../DefaultCollection");
ITeamFoundationRegistry rw = tfs.GetService<ITeamFoundationRegistry>();
RegistryEntryCollection rc = rw.ReadEntries(@"/Service/WorkItemTracking/Settings/MaxAttachmentSize");
RegistryEntry re = new RegistryEntry(@"/Service/WorkItemTracking/Settings/MaxAttachmentSize", "20971520");//20MB
       
if (rc.Count != 0)
{   
    re = rc.First();   
    re.Value = "20971520";
}
       
rw.WriteEntries(new List<RegistryEntry>() { re });

But the only thing you had to do in order to change the attachment size in TFS 2010 is to change_tfs_resources to the collection name, as follow:

http://localhost:8080/tfs/_tfs_resources/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx?op=SetMaxAttachmentSize 

TO:

http://localhost:8080/tfs/<CollectionName>/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx?op=SetMaxAttachmentSize

No hay comentarios:

Publicar un comentario