Disabling unused dependencies

S

Simon Wilton

Sure this one must have been covered somewhere - but I can't find it.

I want to deliberately leave out components that are dependencies of things
that I do want.

eg I want DirectX support form VB, but I only need DirectSound. I can't find
any way of stopping Direct3D, etc being added to my build.

How is it done?

TIA

Simon
 
T

Tony Camilli

Any time you do a dependency check, those components will
be brought in - I don't know of a way to prevent that.
What I've done in those cases is let the component be
brought in, then disable the files, registry data, and
resoruces - but leave the component itself enabled. In
the future, you should not have any problems with
dependency check.

HTH
Tony
 
D

Dan Simpson [MSFT]

Hi,

In Target Designer, do the following:

1. In the Tools menu, choose Options. The Options window appears.

2. Under the Dependency Check tab, clear the "Auto-Resolve Dependencies"
check box.

Now, when you check dependencies, missing dependencies are not automatically
added to the build. Any missing dependencies are displayed in the Message
window (bottom of the TD window).

Hope this helps,

Dan
 
J

Johannes Stratmann

is it also possible to turn off the errors for unwanted components ? I have
some dependencies left and want them to be ignored.
 
S

Sean Liming \(eMVP\)

Building on what Tony's suggestion, you could create a seperate component
that has only the DirectX supported needed for your applications. This way
you don't have to delete the files and registry entries each time you want
to use a specific feature in a configuration.

Regards,



Sean Liming

www.a7eng.com

Author: Windows NT Embedded Step-By-Step and XP Embedded Advanced.
 
D

Dan Simpson [MS]

Not that I know of. If a component is dependent on a missing component, it
will always show up in the error log. But, if you're sure you don't need
it, then you can safely ignore it (and the subsequent error messages and
dialog boxes.)

Dan
 
J

Johannes Stratmann

Dan Simpson said:
Not that I know of. If a component is dependent on a missing component, it
will always show up in the error log. But, if you're sure you don't need
it, then you can safely ignore it (and the subsequent error messages and
dialog boxes.)

yes, that the way I handle it now. But you have to build an image that has a
number of 'errors' in it. And if you add another component, you must first
check if the no. of errors has changed and then you must compare and hope
the errors are still the same that do not affect your build...
So a ignore option that compares against the same error would be _very_
helpful.
 
S

Simon Wilton

Didn't know this was such a can of worms!

Suggestion for MS to improve TD.

Make auto dependency skip components that are present but marked as
disabled. This way dependencies will be added when you add a component. The
user can then see them and specifically exclude them. A warning in the the
dependecy check that a "......., a dependency of ..... is disabled" should
be adequate. All sub-dependencies should be be automatically removed
(anything else that uses them puts them back automatically, and so does
re-enabling the component).

How does anyone else feel about this approach?

Simon
 
S

Simon Wilton

What I was trying to suggest is a middle way.

At the moment TD includes dependencies willy-nilly. This is exactly what it
should do. If it includes something you don't need, as I understand it, you
delete the things that you think you don't want and build without
re-checking dependencies. This can leave things badly broken (if you didn't
realise something was used not only by the thing you didn't want, but also
by a component that you kept). Also it can leave unnecessary dependencies of
the things you deleted.

The naughty bit about the current behaviour is that if you leave the
dependency in place, disable it and check dependencies TD will add another
copy of that component.

If the behaviour was I as suggested (ie the dependency had to be in the SLX,
but could really be disabled) apart from the thing that the user had
explicitly turned off, everything would still resolve correctly. And yes I
agree that the user should be told that they had done this, and which
dependencies were disabled from which components. This is a warning not an
error. You then arrive at the position that without having to manually
manipulate the build, or manually resolve every dependency, every dependency
found during resolution would be automatically satisfied either by including
it, or by reporting that it was present, but disabled by the user.

If your seriously worried that the change in behaviour might offend, make it
an option that us poor mortals who wallow in pool of user souls can choose.

Simon
 
J

Johannes Stratmann

Simon sez the truth...
the 'unwanted' components should give a warning, not an error. If I select a
new component that needs an 'unwanted' marked component its an error again
unless I mark it unwanted again.
This is what I must do manualy now. And how do explain this to some ISO
engineers how get a reproducible result ?????????????? If this is the way MS
handles their releases, how can they get a ISO certificate ????
You see its not a matter of technical possibilities, but a matter of
logistics to retrieve the same result as from some builds before.
 

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