468,537 Members | 2,284 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,537 developers. It's quick & easy.

I get some warnings that I don't understand when building the exe file

Hello!!

I use VS 2003 and C# for all class library except MeltPracCommon.dll which
is C++.NET

The problem is that I get these warnings when building the exe file and use
my class libraries.
See below for a detail description.

Preparing resources...
Updating references...
Warning: The dependency 'Commons, Version=1.0.2273.15060, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'Commons, Version=1.0.2273.16498,
Culture=neutral'.

Warning: The dependency 'MultiLang, Version=1.0.2273.15961, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MultiLang, Version=1.0.2273.16656,
Culture=neutral'.
Performing main compilation...

Build complete -- 0 errors, 0 warnings
Building satellite assemblies...

The exe file are using six class library dll. These are:
class library
Comment
1. MeltPracCommon.dll is using
Multilang.dll
2. Commons.dll is not
using any of these dll
3. MeltPracStorage.dll is not
using any of these dll
4. MMICommon.dll is using
Commons
5. Multilang.dll is
using MeltPracStorage.dll
6. UTCASCommon.dll is using
MMICommon.dll and MeltPracStorage.dll

I have only a single project in each solution project. So a have 6 solution
project having one class library project in each one.

So in the referens list for each project I have the following.
UTCASCommon reference MMICommon and MeltPracStorage
MMICommon reference Commons
MeltPracCommon reference Multilang
Multilang reference MeltPracStorage

I use copy local = TRUE for each referece dll that I use.
When I use C++.NET the dll is always copied to the output directory even
when having copy local=false.
There are no problems at all to build all the class library dll

In the UTCASCommon output directory I have the following after a successful
build.
UTCASCommon.dll, MMICommon.dll, Common.dll and MeltPracStorage.dll

In the MMICommon output directory I have the following after a successful
build.
MMICommon.dll and Commons.dll

In the Commons output directory I have the following after a successful
build.
Commons.dll

In the MeltPracCommon output directory I have the following after a
successful build.
MeltPracCommon.dll and Multilang.dll

In the Multilang output directory I have the following after a successful
build.
Multilang.dll and MeltPracStorage.dll

In the MeltPracStorage output directory I have the following after a
successful build.
MeltPracStorage.dll

In the project where the exe file is being built I have referenced the class
library dll where output directory is for the class library project.

For example when I reference the Commons in the reference list I select the
following
C:\PK\Development\Products\UTCAS\4.0\SRC\Commons\b in\Commons.dll
It's the same how I reference the other class library dll

So can somebody explain or tell me how to fix my warnings when buiding the
exe file because
I haven't any idea.

//Tony





Mar 23 '06 #1
2 1520
Hello,

Basically You have a refernce to one or more dll that corresponds to version
say version 1.0.0.0.1 in your project. When you build, it tries to copy it
to the bin directory and finds the dll's you copied there that is of
version 1.0.0.0.0

To fix this, do one of the following...

Simply reference the dll's from where they are, Visual studio will
automatically copy them to the bin directory when your build or run your
project.

If you want it referenced from within the bin directory (where you
already have put it) reference it from there (take out the old reference and
add the one from bin)

If you don't want it copied there (want it referenced in some other
location - would force you to deploy to the same location ...) then change
its property "copy Local" to false.

Regards
Scott Blood
C# Developer
"tony" <jo*****************@telia.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello!!

I use VS 2003 and C# for all class library except MeltPracCommon.dll which
is C++.NET

The problem is that I get these warnings when building the exe file and
use
my class libraries.
See below for a detail description.

Preparing resources...
Updating references...
Warning: The dependency 'Commons, Version=1.0.2273.15060, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'Commons, Version=1.0.2273.16498,
Culture=neutral'.

Warning: The dependency 'MultiLang, Version=1.0.2273.15961,
Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MultiLang,
Version=1.0.2273.16656,
Culture=neutral'.
Performing main compilation...

Build complete -- 0 errors, 0 warnings
Building satellite assemblies...

The exe file are using six class library dll. These are:
class library
Comment
1. MeltPracCommon.dll is using
Multilang.dll
2. Commons.dll is
not
using any of these dll
3. MeltPracStorage.dll is not
using any of these dll
4. MMICommon.dll is using
Commons
5. Multilang.dll
is
using MeltPracStorage.dll
6. UTCASCommon.dll is using
MMICommon.dll and MeltPracStorage.dll

I have only a single project in each solution project. So a have 6
solution
project having one class library project in each one.

So in the referens list for each project I have the following.
UTCASCommon reference MMICommon and MeltPracStorage
MMICommon reference Commons
MeltPracCommon reference Multilang
Multilang reference MeltPracStorage

I use copy local = TRUE for each referece dll that I use.
When I use C++.NET the dll is always copied to the output directory even
when having copy local=false.
There are no problems at all to build all the class library dll

In the UTCASCommon output directory I have the following after a
successful
build.
UTCASCommon.dll, MMICommon.dll, Common.dll and MeltPracStorage.dll

In the MMICommon output directory I have the following after a successful
build.
MMICommon.dll and Commons.dll

In the Commons output directory I have the following after a successful
build.
Commons.dll

In the MeltPracCommon output directory I have the following after a
successful build.
MeltPracCommon.dll and Multilang.dll

In the Multilang output directory I have the following after a successful
build.
Multilang.dll and MeltPracStorage.dll

In the MeltPracStorage output directory I have the following after a
successful build.
MeltPracStorage.dll

In the project where the exe file is being built I have referenced the
class
library dll where output directory is for the class library project.

For example when I reference the Commons in the reference list I select
the
following
C:\PK\Development\Products\UTCAS\4.0\SRC\Commons\b in\Commons.dll
It's the same how I reference the other class library dll

So can somebody explain or tell me how to fix my warnings when buiding the
exe file because
I haven't any idea.

//Tony




Mar 23 '06 #2
Are you referencing the .dll directly? Or are you using project
references? The best method is to have a single solution that includes
all of the projects and then use project references. That way VS will
handle the versioning properly.

Also, in the AssemblyInfo.cs file for each of your projects, you
should explicitly set the version numbers rather than rely on the
automatic version number increment (i. e. dont use 1.0.* as the
version number.)

Your warnings are caused by the version number being automatically
incremented. A newer version of the assembly already exists in the
folder and it is trying to copy an older one over it. Using project
references and explicitly setting the version numbers will alleviate
most if not all of these problems.

See this article, especially chapter 4 "Managing Dependencies"

http://msdn.microsoft.com/library/de...ml/tdlg_rm.asp

Mar 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by PHPkemon | last post: by
10 posts views Thread by Kylotan | last post: by
reply views Thread by Bonj | last post: by
28 posts views Thread by Yuri CHUANG | last post: by
6 posts views Thread by pete142 | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.