Version error

A

aualias

I am getting the following error:

Warning: The dependency 'ShoppingCart, Version=1.0.1895.27037,
Culture=neutral' in project 'www.sitename.com' cannot be copied to the run
directory because it would overwrite the reference 'ShoppingCart,
Version=1.0.0.0, Culture=neutral'.

I changed [assembly: AssemblyVersion("1.0.*")] to [assembly:
AssemblyVersion("1.0.0")] in AssemblyInfo.cs, but the error lies elsewhere.

Any ideas would be appreciated.

Thanks.

David
 
G

Guest

David,

I would first check following things,

1. using ILDASM Tool find out metadata information for the referenced
assemblies.
esp. ShoppingCart.


2. How are you referencing ShoppingCart assembly in your application ?
are you are manually adding the reference and giving the path to the some
directory or you are loading it from GAC

3. If you are doing step 2then check references section of your applicaiton
and find out the reference of shopping cart and click F4.
This will open properties if Copy local attributes is true then make it false.

and see if the same error persisits.

4. You can also try with binding redirect elelment from application config
file.


HTH

Harish Shikhare
 
A

aualias

Harish,

I'm confused...

The version that is referenced in the application is Version=1.0.0.0, which
should be the latest version (I got rid of the * in AssemblyInfo.cs after I
started having problems). I am referencing the shoppingcart dll by browsing
for the project and going into the obj directory and taking that copy.

By looking at the manifest the versions should be the same - 1.0.0.0 - I am
referencing the newest version. I did a build of the shopping cart, deleted
the reference in the web application, and then re-referenced it. No luck.

Somewhere, either VisualStudio or .NET is holding a reference to an old
version and attempting to use that version of the dll. I would love to
understand what is going on here.

Thanks for your reply.

David



Harish Shikhare said:
David,

I would first check following things,

1. using ILDASM Tool find out metadata information for the referenced
assemblies.
esp. ShoppingCart.


2. How are you referencing ShoppingCart assembly in your application ?
are you are manually adding the reference and giving the path to the some
directory or you are loading it from GAC

3. If you are doing step 2then check references section of your
applicaiton
and find out the reference of shopping cart and click F4.
This will open properties if Copy local attributes is true then make it
false.

and see if the same error persisits.

4. You can also try with binding redirect elelment from application config
file.


HTH

Harish Shikhare

aualias said:
I am getting the following error:

Warning: The dependency 'ShoppingCart, Version=1.0.1895.27037,
Culture=neutral' in project 'www.sitename.com' cannot be copied to the
run
directory because it would overwrite the reference 'ShoppingCart,
Version=1.0.0.0, Culture=neutral'.

I changed [assembly: AssemblyVersion("1.0.*")] to [assembly:
AssemblyVersion("1.0.0")] in AssemblyInfo.cs, but the error lies
elsewhere.

Any ideas would be appreciated.

Thanks.

David
 
G

Guest

David,

Try following steps.

1. Close Visual Studio.NET IDE
2. IISreset /stop
3. Delete Contents of VSWebCache directory (This is the directory created
under \Documents and Settings \Your login \VSWebCache\Machine Name)
4. IISreset /start
5. open IDE and try to recompile the project

Harish Shikhare


aualias said:
Harish,

I'm confused...

The version that is referenced in the application is Version=1.0.0.0, which
should be the latest version (I got rid of the * in AssemblyInfo.cs after I
started having problems). I am referencing the shoppingcart dll by browsing
for the project and going into the obj directory and taking that copy.

By looking at the manifest the versions should be the same - 1.0.0.0 - I am
referencing the newest version. I did a build of the shopping cart, deleted
the reference in the web application, and then re-referenced it. No luck.

Somewhere, either VisualStudio or .NET is holding a reference to an old
version and attempting to use that version of the dll. I would love to
understand what is going on here.

Thanks for your reply.

David



Harish Shikhare said:
David,

I would first check following things,

1. using ILDASM Tool find out metadata information for the referenced
assemblies.
esp. ShoppingCart.


2. How are you referencing ShoppingCart assembly in your application ?
are you are manually adding the reference and giving the path to the some
directory or you are loading it from GAC

3. If you are doing step 2then check references section of your
applicaiton
and find out the reference of shopping cart and click F4.
This will open properties if Copy local attributes is true then make it
false.

and see if the same error persisits.

4. You can also try with binding redirect elelment from application config
file.


HTH

Harish Shikhare

aualias said:
I am getting the following error:

Warning: The dependency 'ShoppingCart, Version=1.0.1895.27037,
Culture=neutral' in project 'www.sitename.com' cannot be copied to the
run
directory because it would overwrite the reference 'ShoppingCart,
Version=1.0.0.0, Culture=neutral'.

I changed [assembly: AssemblyVersion("1.0.*")] to [assembly:
AssemblyVersion("1.0.0")] in AssemblyInfo.cs, but the error lies
elsewhere.

Any ideas would be appreciated.

Thanks.

David
 
A

aualias

Hi Harish,

I put all the projects involved in the same solution, then went through them
and recompiled the ones that did not depend on anything else. I then
deleted these dependencies and put them back, using the add project instead
of adding the dll. I worked my way up the chain, recompiling and then
updating those dependencies. Seems to be working...

I did try deleting the cache, but without any luck. I guess that while I am
still working on the code, I should install all the dependent projects into
the solution. VisualStudio seems to keep the dependencies updated.

Thanks for your help.

David


Harish Shikhare said:
David,

Try following steps.

1. Close Visual Studio.NET IDE
2. IISreset /stop
3. Delete Contents of VSWebCache directory (This is the directory
created
under \Documents and Settings \Your login \VSWebCache\Machine Name)
4. IISreset /start
5. open IDE and try to recompile the project

Harish Shikhare


aualias said:
Harish,

I'm confused...

The version that is referenced in the application is Version=1.0.0.0,
which
should be the latest version (I got rid of the * in AssemblyInfo.cs after
I
started having problems). I am referencing the shoppingcart dll by
browsing
for the project and going into the obj directory and taking that copy.

By looking at the manifest the versions should be the same - 1.0.0.0 - I
am
referencing the newest version. I did a build of the shopping cart,
deleted
the reference in the web application, and then re-referenced it. No
luck.

Somewhere, either VisualStudio or .NET is holding a reference to an old
version and attempting to use that version of the dll. I would love to
understand what is going on here.

Thanks for your reply.

David



Harish Shikhare said:
David,

I would first check following things,

1. using ILDASM Tool find out metadata information for the referenced
assemblies.
esp. ShoppingCart.


2. How are you referencing ShoppingCart assembly in your application ?
are you are manually adding the reference and giving the path to the
some
directory or you are loading it from GAC

3. If you are doing step 2then check references section of your
applicaiton
and find out the reference of shopping cart and click F4.
This will open properties if Copy local attributes is true then make it
false.

and see if the same error persisits.

4. You can also try with binding redirect elelment from application
config
file.


HTH

Harish Shikhare

:

I am getting the following error:

Warning: The dependency 'ShoppingCart, Version=1.0.1895.27037,
Culture=neutral' in project 'www.sitename.com' cannot be copied to the
run
directory because it would overwrite the reference 'ShoppingCart,
Version=1.0.0.0, Culture=neutral'.

I changed [assembly: AssemblyVersion("1.0.*")] to [assembly:
AssemblyVersion("1.0.0")] in AssemblyInfo.cs, but the error lies
elsewhere.

Any ideas would be appreciated.

Thanks.

David
 
C

Chris Dunaway

One other thing, if you can, use only project references instead of
referencing the .dll directly. That allows VS to properly determine
the correct version numbers. Only use direct .dll references if you
don't have access to the project.
 

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