Bug in VS.NET 2005 for click-once deployment

C

CSharpner

It appears there's a bug in Visual Studio 2005 when trying to deploy a
click-once application (this is a completely different issue than my
last post, in case anyone's keeping track).

When I set my publishing settings, the first time, it works just
fine. When I want to publish to a different server, the part of the
publish wizard that asks "How will users install the application?",
the "From a Web site" setting is ignored and the original value I
entered from the FIRST deployment is used. Now, once in a blue moon,
it'll change, but it's unpredictable and rare.

The only way I've found to "fix" it is to use a file searching utility
(I use TextPad's "Search in files" feature) to search all files in the
entire solution folder tree for occurances of the old URL. It appears
that there's 3 items storing the URL in the .csprog file, one of which
is the culprit (can't recall right now which), but they are:
<PublicUrl>
<InstallUrl>
<UpdateUrl>

I think it's the InstallUrl that holds onto the old setting. I have
to manually edit the project file with a text editor to get the darn
thing to publish and behave properly.

Am I doing something wrong or is this a bug? Is there a better way to
do this?

TIA.
 
C

CSharpner

The answer is:

Yes, there's a bug.

I'll give the work-around below:

How to reproduce:

• Make a Click-Once deployed app.
• Go to project properties.
• Go to "Publish: tab.
• Set your "Publishing Location" and "Installation URL".
• Set the project as "The application is available offline • as well
(launchable from Start menu)".
• Click the "Updates" button.
• Enter a path in the "Update location" at the bottom.
• Then later decide you want your app as "This application is
available online only".
• Change your "Publish Location" to another server.
• Change your "Installation URL" to the newer server.
• (Note that change the Update URL is not possible because the
"Updates button" is disabled due to your choice of making it available
online only).
• Publish your project.
The .application file deployed to the server will still point to the
old path, which apparently comes from the non-accessible "Update
location" in the "Application Updates" dialog available only from the
disabled "Updates" button.

Work-Around:

• Temporarily change your "Install Mode" from "The application is
available online only" to "The application is available offline as
well".
• This enables the "Updates" button. Click the "Updates" button.
• Change the "Update location" at the bottom to your new location and
click "OK".
• Change your "Install Mode" back to "The application is available
online only".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top