[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

.NET app loading old dll's

Posted on 2011-05-11
7
Medium Priority
?
544 Views
Last Modified: 2013-11-07
VS2010, Windows 7 Ultimate 64-bit, .NET 3.5 Framework

I have a C# app written in VS2003 that I converted into VS2010.  I've changed the framework from 2.0 to 3.5.  I also have some 3rd party reporting dll's that the app uses and upgraded those as well to compatible versions.

I've deleted the old references and added the new ones, verified the versions are the correct updated ones.  They are not being copied to local and no specific version is selected in the reference properties.  The app builds and runs fine in VS.  It is set to build for x86 architecture.

On my target machine (Win7 64-bit) it runs in XP compatibility mode and as Administrator on the properties.  It dies on load and after debugging it, it is trying to load the older version of the reporting dll's which can't be found.

My question is, where in the dll-hell is the reference info coming from?  Cached config files?  I've done a 1/2 day reading on .config files, manifest files and other stuff but where is this stuff on the target machine?  I need some straight education on where the hell the reference to the old is coming from and how to correct it to point to the versions the app's compiled to find.

Thanks!
0
Comment
Question by:supertedusa
7 Comments
 
LVL 18

Expert Comment

by:dj_alik
ID: 35743706
You can put right dlls in  your application directory and they will be found by application first.
Or put dlls in GAC
and also set specific version of dlls in app.config like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>  
  <runtime>      
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">        
           <dependentAssembly>                  
         <assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845dcd8080cc91" />            
                <publisherPolicy apply="no"/>              
      </dependentAssembly>    
       </assemblyBinding>  
 </runtime>
</configuration>
0
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 35745138
try to check the verion in ur web.config
0
 

Author Comment

by:supertedusa
ID: 35746205
Meant to add that:  they are listed correctly in the GAC.  I'm cloudy on how app.config works.  I created that file via the project properties but it doesn't list any of my references (or these dll's) in it.  Where would the old references be found?

king2002:  does a client-based C# app have a web.config?

Thanks.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 41

Expert Comment

by:graye
ID: 35746330
So, why did you configure VS to not copy the DLLs to the local directory?   If you changed that to "copy if newer", then you'd get a nice list of DLLs that the VS thinks your app needs.  That'd be a good way to check out the version numbers.

Did I understand that this is a Windows From application that's running under a virtual machine (aka the XP Mode)?   If so, how did you deploy the application?  Did you just copy the contents of the bin directory?
0
 

Author Comment

by:supertedusa
ID: 35746501
I've tried the copy local setting on them but it didn't help.  I'm not sure what "copy if newer" is?

Yes, it's a WinForm app on a virtual machine.  I'm using WISE installer to build the install.  Those files are set to "Always Replace" during installation and I can verify they are correctly installed on the machine.  What I can't understand is where are these references found in my application?

Thanks.
0
 
LVL 41

Accepted Solution

by:
graye earned 2000 total points
ID: 35748801
There may not be any "direct" references....  instead, you might only reference A (which in turn, references B and C).

In the solution explorer, you can click on a reference and see the properties.  One of the properties is the "Copy Local" property (which you previously said you had configured to "false').  When this is set to "True" (my mistake on the "copy if newer" comment...I should have said just "true'), then VS attempts to figure out what other components need to "come along for the ride".   It will place all of the DLLs that it thinks needs to be there in the bin directory.

If you configure that property to True, then you can browse the project's bin directory and see all of the DLLs (and their version numbers)
0
 

Author Closing Comment

by:supertedusa
ID: 35749095
Thanks, I deleted the project, restored an original but deleted the references before upgrading it to VS2010 and then added them in.  Copied local and set the build settings I needed for x86 and it's all running fine.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question