Custom downloader - UNC

O

olguyilmaz

Hi,

I am using the Updater Application Block Version 2.

I am trying to follow the instructions at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpa...
to build a custom downloader (UNC )

So far I was not successfull.
Firstly,
As it was stated I added
<includeTypes>
<includeType name="UNCDownloader"
type="MyApp.Downloaders.UNCDownloaderProviderData, MyApp" />
</includeTypes> to app.config. But I am getting "Unrecognized element
IncludeTypes" error.

Secondly,
it says section
<downloaders>
<downloader xsi:type="UNCDownloaderProviderData"
name="UNCDownloader">
</downloader>
</downloaders>
should be added to Updaterconfiguration.config file. However I do not
have this file. Should I create it?

ServerManifest.xml
Looks like
....
<files base="\\MyApp\Server"
hashComparison="Yes" hashProvider="MD5CryptoServiceProvider" >
<file hash="a5aqUnlIyzu670VDJW8lSwXJdJM=" source="MyApp.exe"
transient="No" />
<file hash="0UOXi/+fNtBihjD9Vv8WS+1NBCo="
source="MyApp.Forms.dll" transient="No" />
</files>
<downloader name="UNCDownloader" />
....

App.Config file

....
<UpdaterConfiguration defaultDownloader="UNCDownloader"
applicationId="{345E1AD7-9ABA-432f-A458-24BABA556908}"
manifestUri="http://localhost/Servermanifest.xml">
<includeTypes>
<includeType name="UNCDownloader"
type="MyApp.UNCDownloaderProviderData, MyApp" />
</includeTypes>

</UpdaterConfiguration>
....
Has anybody had any idea what it can be wrong here...
Thanks in advance,

Olgu.
 
O

olguyilmaz

Here is the link.
http://msdn2.microsoft.com/en-us/library/ms978557.aspx

I get an error in the following section. ConfigurationNamespace should
be Configuration. But I also have problem with TypeName.

Thanks for in advance. I really need to make this work.
Olgu.

[XmlRoot("downloader",
Namespace=ApplicationUpdaterSettings.ConfigurationNamespace )]
public sealed class UNCDownloaderProviderData : DownloadProviderData
{
public UNCDownloaderProviderData()
{
}

public override string TypeName
{
get { return typeof( UNCDownloader ).AssemblyQualifiedName; }
set {}
}

ServerManifest looks like

<application applicationId="{215E1AD7-9ABA-432f-A952-24BABA556850}">
<entryPoint file="ExeName.exe" />
<location>C:\Client</location>
</application>
<files base="C:\Server"
hashComparison="Yes" hashProvider="MD5CryptoServiceProvider" >
<file hash="a5aqUnlIyzu670VDJW8lSwXJdJM=" source="ExeName.exe"
transient="No" />
<file hash="0UOXi/+fNtBihjD9Vv8WS+1NBCo="
source="ExeName.Forms.dll" transient="No" />
</files>
<downloader name="UNCDownloader" />
<activation>
<tasks>
<task name="WaitForApplicationExitProcessor"
type="Microsoft.ApplicationBlocks.Updater.ActivationProcessors.WaitForApplicationExitProcessor,
Microsoft.ApplicationBlocks.Updater.ActivationProcessors"/>
<task name="ApplicationDeployProcessor"
type="Microsoft.ApplicationBlocks.Updater.ActivationProcessors.ApplicationDeployProcessor,
Microsoft.ApplicationBlocks.Updater.ActivationProcessors"/>
</tasks>
</activation>
</manifest>

......
App.config
.....
<UpdaterConfiguration defaultDownloader="UNCDownloader"
applicationId="{215E1AD7-9ABA-432f-A952-24BABA556850}"
manifestUri="C:\Server\ServerManifest.xml">
<downloaders>
<add name="UNCDownloader"
type="ExeName.Forms.ManualUpdater.UNCDownloader,
ExeName.Forms.ManualUpdater"
/>
</downloaders>
.....
 
O

olguyilmaz

Here is the link.
http://msdn2.microsoft.com/en-us/library/ms978557.aspx

I get an error in the following section. ConfigurationNamespace should
be Configuration. But I also have problem with TypeName.

Thanks in advance. I really need to make this work.
Olgu.

[XmlRoot("downloader",
Namespace=ApplicationUpdaterSettings.ConfigurationNamespace )]
public sealed class UNCDownloaderProviderData : DownloadProviderData
{
public UNCDownloaderProviderData()
{
}

public override string TypeName
{
get { return typeof( UNCDownloader ).AssemblyQualifiedName; }
set {}
}

ServerManifest looks like

<application applicationId="{215E1AD7-9ABA-432f-A952-24BABA556850}">
<entryPoint file="ExeName.exe" />
<location>C:\Client</location>
</application>
<files base="C:\Server"
hashComparison="Yes" hashProvider="MD5CryptoServiceProvider" >
<file hash="a5aqUnlIyzu670VDJW8lSwXJdJM=" source="ExeName.exe"
transient="No" />
<file hash="0UOXi/+fNtBihjD9Vv8WS+1NBCo="
source="ExeName.Forms.dll" transient="No" />
</files>
<downloader name="UNCDownloader" />
<activation>
<tasks>
<task name="WaitForApplicationExitProcessor"
type="Microsoft.ApplicationBlocks.Updater.ActivationProcessors.WaitForApplicationExitProcessor,
Microsoft.ApplicationBlocks.Updater.ActivationProcessors"/>
<task name="ApplicationDeployProcessor"
type="Microsoft.ApplicationBlocks.Updater.ActivationProcessors.ApplicationDeployProcessor,
Microsoft.ApplicationBlocks.Updater.ActivationProcessors"/>
</tasks>
</activation>
</manifest>

......
App.config
.....
<UpdaterConfiguration defaultDownloader="UNCDownloader"
applicationId="{215E1AD7-9ABA-432f-A952-24BABA556850}"
manifestUri="C:\Server\ServerManifest.xml">
<downloaders>
<add name="UNCDownloader"
type="ExeName.Forms.ManualUpdater.UNCDownloader,
ExeName.Forms.ManualUpdater"
/>
</downloaders>
.....
 
O

olguyilmaz

HI-

I posted the link. But I have another question related to my other
questions.
On http://msdn2.microsoft.com/en-us/library/ms978557.aspx it says

"Even if your downloader does not require any configuration
information, you must still create the DownloadProviderData class and
override the TypeName method."

There is already a class called DownloaderProviderData in
Microsoft.ApplicationBlocks.Updater.Configuration. Am I supposed to
create a new one called DownloadProviderData or use the exising
DownloaderProviderData ?

Thank you,
Olgu.
 
Top