Changing the UAB 2.1 Config Files to work with Enterprise Library 3.1

Oct 26, 2007 at 8:59 AM
"Enterprise Library 3.0 could be used by recompiling the block and changing the configuration files "

Could anyone point me in the right direction for doing this please? I have an application that must use theEnterprise Library 3.1 so I've changed the references in the UAB 2.1 solution and recompiled but I get these two errors that I'm not sure about fixing.

Error 2 Using the generic type 'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElementCollection<T,TCustomElementData>' requires '2' type arguments

internal NameTypeConfigurationElementCollection<DownloaderProviderData> Downloaders

{

get

{

ApplicationUpdaterSettings settings = this.ApplicationUpdaterSettings;

return settings.Downloaders;

}

}





Error 2 Using the generic type 'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElementCollection<T,TCustomElementData>' requires '2' type arguments



public NameTypeConfigurationElementCollection<DownloaderProviderData> Downloaders

{

get { return (NameTypeConfigurationElementCollection<DownloaderProviderData>)basedownloadersProperty; }

}



Coordinator
Oct 28, 2007 at 2:13 AM
Try replacing
 
NameTypeConfigurationElementCollection<DownloaderProviderData> 
with
 
NameTypeConfigurationElementCollection<DownloaderProviderData, DownloaderProviderData> 

You will have to recompile and fix the classes that uses that property.

Let me know if it works
Matias
Oct 29, 2007 at 1:36 AM
I tried that and I also tried implementing a CustomDownloaderProviderData class. I end up with this error

'Microsoft.ApplicationBlocks.Updater.Configuration.BitsDownloaderAssembler' does not implement interface member 'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.IAssembler<Microsoft.ApplicationBlocks.Updater.IDownloader,Microsoft.ApplicationBlocks.Updater.Configuration.DownloaderProviderData>.Assemble(Microsoft.Practices.ObjectBuilder.IBuilderContext, Microsoft.ApplicationBlocks.Updater.Configuration.DownloaderProviderData, Microsoft.Practices.EnterpriseLibrary.Common.Configuration.IConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationReflectionCache)'

D:\Visual Studio Projects\2005\Updater Block 2.1\src\Downloaders\BitsDownloaderProviderData.cs 87 18 Downloaders


There is also a warning
'System.AppDomain.AppendPrivatePath(string)' is obsolete: 'AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead. http://go.microsoft.com/fwlink/?linkid=14202' D:\Visual Studio Projects\2005\Updater Block 2.1\src\Updater\ActivationManager.cs