Force ClickOnce PreRequisite file to deploy with application?

D

Dean Slindee

Using VS2005, I am deploying a WinForm application with ClickOnce. The
project contains a ReportViewer2005 control, so there is a prerequisite for
the ReportViewer2005.dll.

The ReportViewer.dll that is included with Visual Studio 2005 works fine on
my (developer) pc, both within Visual Studio 2005, and after deployed, from
my pc. However, this is not the case with the user's pcs. When they
download the ReportViewer2005.dll from Microsoft, they get a
ReportViewer2005 with built-in bugs.

There is a service pack for ReportViewer2005.dll, but I would rather bundle
the Visual Studio copy of ReportViewer2005 in with the ClickOnce deployment.
It is possible?
On Project properties | publish | Application Files., should I be changing
the Publish Status column to "Include", (Required), and then manually point
to the ClickOnce site where I have copied the Visual Studio
ReportViewer2005.dll? Would this bundle the Visual Studio
ReportViewer2005.dll in with my application?

Thanks in advance,
Dean S
 
S

Steve Gerrard

Dean said:
Using VS2005, I am deploying a WinForm application with ClickOnce. The project
contains a ReportViewer2005 control, so there is a
prerequisite for the ReportViewer2005.dll.

The ReportViewer.dll that is included with Visual Studio 2005 works
fine on my (developer) pc, both within Visual Studio 2005, and after
deployed, from my pc. However, this is not the case with the user's
pcs. When they download the ReportViewer2005.dll from Microsoft,
they get a ReportViewer2005 with built-in bugs.

Ooo, built in bugs, an extra bonus! :)
There is a service pack for ReportViewer2005.dll, but I would rather
bundle the Visual Studio copy of ReportViewer2005 in with the
ClickOnce deployment. It is possible?
On Project properties | publish | Application Files., should I be
changing the Publish Status column to "Include", (Required), and then
manually point to the ClickOnce site where I have copied the Visual
Studio ReportViewer2005.dll? Would this bundle the Visual Studio
ReportViewer2005.dll in with my application?

I would click Include (Required), and include the file right from your dev PC.
The ClickOnce publish copies all those files to the publication folder, so no
need to point it somewhere else. I publish my ClickOnce to a local folder, then
copy it in stages to the actual deployment location. After the first time, I
only copy the updated files up the ladder. My sequence is to publish local, copy
new and updated files to a transfer folder on the server, then remote desktop to
server, where I copy from the transfer folder to the actual folder. Works nice,
gives good control, and the final step is very quick so no interruptions or
synch issues.
 
R

RobinS

Steve Gerrard said:
Ooo, built in bugs, an extra bonus! :)


I would click Include (Required), and include the file right from your dev
PC. The ClickOnce publish copies all those files to the publication
folder, so no need to point it somewhere else. I publish my ClickOnce to a
local folder, then copy it in stages to the actual deployment location.
After the first time, I only copy the updated files up the ladder. My
sequence is to publish local, copy new and updated files to a transfer
folder on the server, then remote desktop to server, where I copy from the
transfer folder to the actual folder. Works nice, gives good control, and
the final step is very quick so no interruptions or synch issues.

You are manually copying the files in order to only pick up the updates? Why
not use the update functionality built into ClickOnce? It does incremental
updates for you; why would you do this manually?

RobinS.
GoldMail, Inc.
 
R

RobinS

Dean Slindee said:
Using VS2005, I am deploying a WinForm application with ClickOnce. The
project contains a ReportViewer2005 control, so there is a prerequisite
for the ReportViewer2005.dll.

The ReportViewer.dll that is included with Visual Studio 2005 works fine
on my (developer) pc, both within Visual Studio 2005, and after deployed,
from my pc. However, this is not the case with the user's pcs. When they
download the ReportViewer2005.dll from Microsoft, they get a
ReportViewer2005 with built-in bugs.

There is a service pack for ReportViewer2005.dll, but I would rather
bundle the Visual Studio copy of ReportViewer2005 in with the ClickOnce
deployment. It is possible?
On Project properties | publish | Application Files., should I be changing
the Publish Status column to "Include", (Required), and then manually
point to the ClickOnce site where I have copied the Visual Studio
ReportViewer2005.dll? Would this bundle the Visual Studio
ReportViewer2005.dll in with my application?

Thanks in advance,
Dean S

Does it have to be a prerequisite, or do you just need it installed along
with your application? Assuming that all you really need to install for the
user is the dll, you can include it in your deployment package. If you
actually have to install SQLServer Reporting Services,that's a different
ball of wax.

Including the dll in your deployment ensures that if the user installs some
other version of that with some other software, it does not cause you any
problems, and you don't cause problems with someone else's software either.

To include the dll, in the References, click on the reference, and set
CopyLocal to true.

Also make sure (as noted by the other post) that under Application Files, it
is set to "Include (Required)".

Note: As good practice, if working with multiple developers, create a folder
under your main project and put the dll(s) there, marking it with a Build
Action of None, and Copy = false. Then when you add the reference, don't
point it at the dll installed on your machine, do a Browse and point it at
the dll in your new folder in your project, and have CopyLocal set to true.
That way, if your developers have different versions of the same software,
they will still be running the app and developing against the same version.

We figured this out after we had problems because our developers had
different versions of DirectX installed, and we were using whatever was in
the GAC for our application. :-O

RobinS.
GoldMail, Inc.
 
S

Steve Gerrard

RobinS said:
You are manually copying the files in order to only pick up the
updates? Why not use the update functionality built into ClickOnce?
It does incremental updates for you; why would you do this manually?

Nope, just not publishing straight to the actual deployment folder, so copying
manually to get them there. That lets me stage things so it can all go down at
once on the production server.
 
R

RobinS

Steve Gerrard said:
Nope, just not publishing straight to the actual deployment folder, so
copying manually to get them there. That lets me stage things so it can
all go down at once on the production server.

But it sounds like you are only copying the changed files:
After the first time, I only copy the updated files up the ladder. My
sequence is to publish local, copy new and updated files to a transfer
folder on the server...

Is that true? Or are you copying the whole deployment folder over, and then
continuing?

RobinS.
GoldMail, Inc.
 
S

Steve Gerrard

RobinS said:
But it sounds like you are only copying the changed files:


Is that true? Or are you copying the whole deployment folder over,
and then continuing?

1. Publish to a local folder, i.e. hit Publish Now button.
2. Copy needed files to deployment server.
3. Copy needed files to deployment folder.

Not really sure what you are asking...
 
R

RobinS

Steve Gerrard said:
1. Publish to a local folder, i.e. hit Publish Now button.
2. Copy needed files to deployment server.
3. Copy needed files to deployment folder.

Not really sure what you are asking...

I'm curious what "needed files" is. Is it the whole deployment folder, or
are you cherrypicking the files manually?

RobinS.
 
S

Steve Gerrard

RobinS said:
I'm curious what "needed files" is. Is it the whole deployment
folder, or are you cherrypicking the files manually?

If I am copying files from folder A to folder B, and three files are already up
to date, and two are not, then I would normally copy the two files that are not
up to date. Whether they were part of a program, or just some mp3 files, or any
sort of files at all. Pretty much SOP for updating one folder from another, I
would think...
 
R

RobinS

Steve Gerrard said:
If I am copying files from folder A to folder B, and three files are
already up to date, and two are not, then I would normally copy the two
files that are not up to date. Whether they were part of a program, or
just some mp3 files, or any sort of files at all. Pretty much SOP for
updating one folder from another, I would think...

Well, whatever makes you happy. :) I was just curious. I guess in the
interest of easier-for-me, and making-sure-I-didn't-miss-something, I could
just copy the entire folder, and let it overlay anything that was already
there.

But you found something that works for you, so go with it!

RobinS.
 
S

Steve Gerrard

RobinS said:
Well, whatever makes you happy. :) I was just curious. I guess in
the interest of easier-for-me, and
making-sure-I-didn't-miss-something, I could just copy the entire
folder, and let it overlay anything that was already there.

But you found something that works for you, so go with it!

RobinS.

Yup. There are some reasons for not publishing directly to the production
server, but they are not interesting ones.

I do sometimes copy the whole folder, only say no to each thing that is already
there and up to date, as a way of checking that I'm not missing something. I
don't have a good reason for not just copying the whole thing, other than habit
I guess.
 

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