Additional files not included when publish solution

P

Phil

VB2005 Express.
I am developing a solution that involves a windows forms application and a
number of class library projects (DLLs). Some of the DLLs require extra data
files or third party dlls. I can include additional non-source files in my
projects, but these are not always automatically included when I publish the
application. It seems that files included in the main application project
are included, but any files that I add to other projects in the solution are
not automatically added.
Is there a way of specifying that these files are required when referencing
another project? Using the Setup and Deployment wizard in VB6 I could
generate dependency files, then it would know that when it included the DLL
it would also have to include the additional files. Is there an equivalent
feature in .NET?
If not, is it possible to specify additional files to include without
actually adding them all to the main project?
When I click on 'Application Files' in the publish screen, it allows me to
choose to exclude files that have been automatically added, but there is no
option that I can see to add additional files that it has not picked up.
TIA
Phil
 
C

Cor Ligthert[MVP]

Phil,

Be aware that the Express version is first created as a scolar tool, however
without much use restriction (I don't even know one, however before I forget
some). You cannot compare that with by instance VB6, which never has been in
a free version.

What your ask is standard in all payed versions of Visual Studio.

Cor
 
L

Linda Liu[MSFT]

Hi Phil,

Based on my understanding, you have a WinForm application and a number of
Class Libray projects which contains some data files. When you publish the
WinForm application via ClickOnce, you'd like to include these data files
of the Class Library projects in the ClickOnce deployment package. If I'm
off base, please feel free to let me know.

As you said, the data files of the WinForm application would be included in
the ClickOnce deployment package automatically, but the data files of the
Class Library projects won't be included in the deployment package
automatically and there's even no way to add these data files to the
deployment package.

I would say that the above behavior is by design. If we'd like to include
data files to a ClickOnce deployment package, we have to add them to the
WinForm application project first.

If you have any concern, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Phil

Based on my understanding, you have a WinForm application and a number of
Class Libray projects which contains some data files. When you publish the
WinForm application via ClickOnce, you'd like to include these data files
of the Class Library projects in the ClickOnce deployment package. If I'm
off base, please feel free to let me know.

That is the issue precisely, yes.
As you said, the data files of the WinForm application would be included
in
the ClickOnce deployment package automatically, but the data files of the
Class Library projects won't be included in the deployment package
automatically and there's even no way to add these data files to the
deployment package.
Correct.


I would say that the above behavior is by design.

This seems unlikely to me.
I can understand if this is just an ommission due to a bug, or because it
was not thought about in the design process. I can also understand if this
has been deliberately disabled in the Express edition. However, I cannot
believe that anyone would deliberately make a decision that this should not
be implemented, because they think it is more desirable to force developers
to put all data files into a single project.
If we'd like to include
data files to a ClickOnce deployment package, we have to add them to the
WinForm application project first.

That appears to be the case, and is obviously undesirable, especially once
you start getting a number of projects within a solution.
If you have any concern, please feel free to let me know.

My concern is that if this feature is not available, we basically have to
manually manage all project dependencies. This is a backward step. In the
VB6 Package and Deployment wizard there was a mechanism to automatically
determine these dependencies for you. In addition it means that if you have
more than one solution sharing one or more projects, you would have to
include all these dependent files in the main project of both solutions,
when the obvious and logical place for them is in the actual projects that
need them. This could result in a lot of unnecessary duplication of files,
and lead to all sorts of version control issues.
 
P

Phil

Cor Ligthert said:
Phil,

Be aware that the Express version is first created as a scolar tool,
however without much use restriction (I don't even know one, however
before I forget some). You cannot compare that with by instance VB6, which
never has been in a free version.

I realise this, but for the most part the Express edition provides the
functionality I need.
I am seriously considering upgrading to a payed-for version, but have not
yet decided whether we need the standard or professional edition.
What your ask is standard in all payed versions of Visual Studio.

I thought that might be the case. How does it work in the standard edition?
Are data files within individual projects automatically included when the
main project is published?
Is there an option from within the publish screen to add additional files at
this point?

Cheers,
Phil..
 
P

Phil

Thankyou very much to both Linda and Cor for your replies. However your
answers appear to be contradicting each other. I would be very grateful if
someone with access to the standard edition of VB2005 could test this for me
to confirm this one way or the other. To reproduce the problem create a
Winform Application project, then add a class library project. Add the
second project as a reference in the first project, then add a data file to
the second project. Then publish the solution and see if the data file is
automatically included in the deployment package.

Cheers,
Phil.
 
P

Phil

Cor Ligthert said:
Phil,

IIn the payable version are Deployment projects included. That makes an
installer project which you can add to your solution.

With that you can create a complete deployment set in a MSI file.

OK. I understand. The 'ClickOnce' system works the same, but there is an
alternative deployment system available. That makes sense.
Here a link about the differences in versions.

http://msdn2.microsoft.com/en-us/vstudio/aa700921.aspx
Thanks, I think I've seen this already, but I'll take another look.

Cheers,
Phil.
 
L

Linda Liu[MSFT]

Hi Phil,

Thank you for your feedback! I understand your concern.

After doing more research, I found that we have two options to solve this
problem.

Option 1: Add the data files of the class library projects as links in the
WinForm applicatioin project, so that they aren't copied into the WinForm
application project directory.

To do this, in the solution explorer right click and select 'Add Existing
Item'. Browse to the file (or files, you can multi-select) you want. Then
with the file selected, instead of clicking 'Add' you need to click the
caret (down arrow) on the right side of the Add button and 'Add as Link'
shows up as a second choice.

Option 2: Deploy the ClickOnce WinForm application manually so that you can
include any data files you want into the ClickOnce application manifest.

For more information on how to deploy a ClickOnce application manually, you
may refer to the following MSDN document:
'Walkthrough: Deploying a ClickOnce Application Manually'
http://msdn2.microsoft.com/en-us/library/xc3tc5xx.aspx

Hope this helps.
If you have any question or concern, please feel free to let me know.


Sincerely,
Linda Liu
Microsoft Online Community Support
 
P

Phil

Option 1: Add the data files of the class library projects as links in the
WinForm applicatioin project, so that they aren't copied into the WinForm
application project directory.

To do this, in the solution explorer right click and select 'Add Existing
Item'. Browse to the file (or files, you can multi-select) you want. Then
with the file selected, instead of clicking 'Add' you need to click the
caret (down arrow) on the right side of the Add button and 'Add as Link'
shows up as a second choice.

OK. I wasn't aware of this feature. I'll try this and see how it works.
Option 2: Deploy the ClickOnce WinForm application manually so that you
can
include any data files you want into the ClickOnce application manifest.

For more information on how to deploy a ClickOnce application manually,
you
may refer to the following MSDN document:
'Walkthrough: Deploying a ClickOnce Application Manually'
http://msdn2.microsoft.com/en-us/library/xc3tc5xx.aspx

OK. I'll perhaps take a look at this later. If/when we decide to upgrade to
the standard or professional edition, it might be better to use the
installshield approach instead.
Thanks.
Phil.
 
P

Phil

Here a link about the differences in versions.
Thanks, I think I've seen this already, but I'll take another look.
There are a few things that would be useful in the standard and professional
editions, but the vast majority of what I need is available in the express
edition. I know it's not all that expensive, but it seems silly to pay out
for stuff we don't really need. I think we will may wait until VS2008 is
released. Do you know if there is an equivalent of the above comparison for
the new version? I couldn't find it on the MS site.
 
C

Cor Ligthert[MVP]

There are a few things that would be useful in the standard and
professional editions, but the vast majority of what I need is available
in the express edition. I know it's not all that expensive, but it seems
silly to pay out for stuff we don't really need. I think we will may wait
until VS2008 is released. Do you know if there is an equivalent of the
above comparison for the new version? I couldn't find it on the MS site.
I would have told you

:)

Cor
 

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