473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

A strange error when compiling

Hello!

I have several projects where each one build a library.(class library or
window control library).

Now I get some strange compile error when building the *.exe file and
doesn't understand what this means.
Can somebody tell me what is causing this?
Do I have made some setup in a wrong way for some of my project where I
build my library.

here are the strange compile error.
Warning: The dependency 'MMICommon, Version=1.0.2462.13017, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MMICommon, Version=1.0.2462.14068,
Culture=neutral'.

Warning: The dependency 'MultiLang, Version=1.0.2462.12705, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MultiLang, Version=1.0.2462.14059,
Culture=neutral'.

//Tony
Sep 28 '06 #1
6 3447
You have an incremental build of the assembly in the run directory that has a
build version number higher than the one that is being built. You can delete
it before building. An easy way to prevent this is to use fixed build numbers
in your AssemblyInfo file so that they don't keep getting incremented each
time you build the project. Then when you are really ready to have a new
"official" build, you can increment the number manually.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"tony" wrote:
Hello!

I have several projects where each one build a library.(class library or
window control library).

Now I get some strange compile error when building the *.exe file and
doesn't understand what this means.
Can somebody tell me what is causing this?
Do I have made some setup in a wrong way for some of my project where I
build my library.

here are the strange compile error.
Warning: The dependency 'MMICommon, Version=1.0.2462.13017, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MMICommon, Version=1.0.2462.14068,
Culture=neutral'.

Warning: The dependency 'MultiLang, Version=1.0.2462.12705, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MultiLang, Version=1.0.2462.14059,
Culture=neutral'.

//Tony
Sep 28 '06 #2
tony wrote:
Hello!

I have several projects where each one build a library.(class library or
window control library).

Now I get some strange compile error when building the *.exe file and
doesn't understand what this means.
Can somebody tell me what is causing this?
Do I have made some setup in a wrong way for some of my project where I
build my library.

here are the strange compile error.
Warning: The dependency 'MMICommon, Version=1.0.2462.13017, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MMICommon, Version=1.0.2462.14068,
Culture=neutral'.
It seems to me that you are trying to overwrite a newer version
"1.0.2462.14068" with an older version "1.0.2462.13017", If your exe
depends on the dlls, you may want to set the project dependency which is
under Project -Project dependency.
Warning: The dependency 'MultiLang, Version=1.0.2462.12705, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MultiLang, Version=1.0.2462.14059,
Culture=neutral'.

//Tony

Sep 28 '06 #3
here are the strange compile error.
Warning: The dependency 'MMICommon, Version=1.0.2462.13017, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MMICommon, Version=1.0.2462.14068,
Culture=neutral'.

Warning: The dependency 'MultiLang, Version=1.0.2462.12705, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MultiLang, Version=1.0.2462.14059,
Culture=neutral'.

The compile error you mention is one I also had in my project. I got it
because one project referenced a DLL and the other reference the
project for that DLL (the project was in the solution).

Anyhow, I see know that I don't completely understand how this works,
but I do know that you should check how your projects/dlls reference
eachother. Make sure that if you use one project/dll multiple times,
each time you use it it should reference the same one.

Hope that helps some. Maybe someone else can provide a more definite
answer.

-Jeroen

Sep 28 '06 #4
tony wrote:
Hello!

I have several projects where each one build a library.(class library or
window control library).

Now I get some strange compile error when building the *.exe file and
doesn't understand what this means.
Can somebody tell me what is causing this?
Do I have made some setup in a wrong way for some of my project where I
build my library.

here are the strange compile error.
Warning: The dependency 'MMICommon, Version=1.0.2462.13017, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MMICommon, Version=1.0.2462.14068,
Culture=neutral'.

Warning: The dependency 'MultiLang, Version=1.0.2462.12705, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MultiLang, Version=1.0.2462.14059,
Culture=neutral'.
The error is because it is trying to copy those assemblies to the run
directory, but there are already newer versions of the assemblies
there. Are you using direct references to the .dll or are you using
project references in Visual Studio?

Also, in the assemblyinfo file, make sure you specify all four parts of
the version number. Don't use the auto increment feature of the
version number. In other words, don't specify the version using an
asterisk like this: [assembly: AssemblyVersion("2.0.*")].

Instead, specify all four part explicitly:

[assembly: AssemblyVersion("2.0.0.0")]

Sep 28 '06 #5

tony wrote:
Hello!

I have several projects where each one build a library.(class library or
window control library).

Now I get some strange compile error when building the *.exe file and
doesn't understand what this means.
Can somebody tell me what is causing this?
Do I have made some setup in a wrong way for some of my project where I
build my library.

here are the strange compile error.
Warning: The dependency 'MMICommon, Version=1.0.2462.13017, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MMICommon, Version=1.0.2462.14068,
Culture=neutral'.

Warning: The dependency 'MultiLang, Version=1.0.2462.12705, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MultiLang, Version=1.0.2462.14059,
Culture=neutral'.
You have an (at least) three-level dependency in your DLLs.

MeltPracApplication depends upon MMICommon and MultiLang and something
else, and that "something else" in turn depends upon MMICommon and
MultiLang. If you look at a dependency tree of your projects, it might
look like this:

MeltPracApplication
uses MMICommon
and MultiLang
and SomethingElse
which uses MMICommon
and MultiLang

All four projects use "copy local" for their DLL dependencies. So now,
rebuild the MMICommon and MultiLang projects, and think about what is
where:
- The MMICommon project contains a new MMICommon DLL.
- The MultiLang project contains a new MultiLang DLL.
- The SomethingElse project contains the SomethingElse DLL and the
*old* MMICommon and MultiLang DLLs because it hasn't been rebuilt yet,
and only a rebuild will copy the new ones in.
Now you rebuild MeltPracApplication. What happens? It copies in the new
MMICommon and MultiLang DLLs because it depends upon them directly. It
also copies in the existing SomethingElse DLL because it needs that
too, and then goes on to try to copy in the MMICommon and MultiLang
DLLs from the SomethingElse directory, but they're older than the ones
it has already copied directly from the MMICommon and MultiLang project
directories, so it complains!

The solution is to rebuild SomethingElse, then rebuild
MeltPracApplication.

By the way, the poster who suggested using fixed version numbers is
correct, but is advocating something dangerous: fixed version numbers
will only mask this problem. You would end up with disparate builds of
your dependent DLLs all with the same version number, so now the
builder won't warn you when something like this happens. It will
just... do something, and what that is... well, your guess is as good
as mine.

There are good reasons for using fixed version numbers. This isn't one
of them.

By the way, I'm sure that there are better ways of structuring your
projects so that this sort of thing isn't a problem. Nonetheless, if
this is the way that you have your projects set up, this is what will
happen if you build them out of order.

Sep 28 '06 #6
What is most likely happening is that you have one library which has a
project reference to MMICommon (and is therefore always copying the
latest version to the run folder), and another library which has a file
reference to MMICommon (and is therefore always trying to copy the
older version to the run folder). If MMICommon is still changing,
make sure all projects in the solution reference it's project. If
MMICommon is stable, build a release version, remove it from the
solution, and point all the other projects references in the solution
to the release dll.

tony wrote:
here are the strange compile error.
Warning: The dependency 'MMICommon, Version=1.0.2462.13017, Culture=neutral'
in project 'MeltPracApplication' cannot be copied to the run directory
because it would overwrite the reference 'MMICommon, Version=1.0.2462.14068,
Culture=neutral'.
Sep 28 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Travis Oliphant | last post by:
I have a normal looking setup.py file with a single extension module. When distutils runs (python setup.py build), the module compiles fine, but an error is issued that seems to indicate that gcc...
7
by: cppaddict | last post by:
Hi, I've been trying to debug a strange runtime error for the last 5 hours... I'm hoping someone might have an insight about it. I have an application that creates a vector of MyDisplay...
8
by: grundmann | last post by:
Hello, i got a strange compiler error. When compiling the following: // forward declarations typedef AvlTree<LineSegment,LineSegmentComperator> LSTree; void handleEventPoint (const...
6
by: Joe Piscapo | last post by:
Hello, When I compile my program in Visual Studio it does not work for every input, some numbers make it crash. But compiling in gcc works for those numbers that made it crash in Visual Studio. ...
5
by: Nathan Sokalski | last post by:
When I view my index.aspx page any time after the first time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize)...
4
by: arcimboldo | last post by:
Hello, I got a strange link problem; here are the simplest files showing the error: a.h:: #include <utility> class a{ public:
11
by: Mike C# | last post by:
Hi all, I keep getting a strange error and can't pin it down. The message is: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's...
1
by: stromhau | last post by:
Ok, i have a file with main and an additional .cpp file i include in the main file but i get a lot of strange warnings when including. Both files compile just great separately. It seems that it have...
3
by: Bob Palank | last post by:
This is an issue for someone much wiser than I - perhaps a MVP will help? I color coded the following for readability. Running XP Pro and VC++.Net Express 2008 and vtk visualization software In...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.