Solved

How to Rebuild a DLL file when changes done to .CS file

Posted on 2015-01-28
11
421 Views
Last Modified: 2015-02-09
Hi Experts,

Q-1.
I have a .dll file. When I make some changes to the .CS file, the dll do not reflect the changes.  How to rebuild the dll?

Q-2.
My class file name is ImportRPF.  But the dll created is DAL.dll.  How the name dll file name is different?

Please try to help me.  Thank you in advance.
0
Comment
Question by:RadhaKrishnaKiJaya
  • 5
  • 4
  • 2
11 Comments
 
LVL 33

Expert Comment

by:Mike Eghtebas
ID: 40576796
Most likely, your dll is saved as "ImportRDF.dll" somewhere correctly. I located some writing on the web and still trying to get to bottom of it myself. Meanwhile, you can take a look at it yourself to see if it helps:

"if you can set two solutions one for your dll referenced and another for your project that reference them after 1/create a dependencies folder where you will set all binaries that are dll you need 2/set path to this dependencies folder on all your projects that will create dll you want to reference 3/set build order on your solution to first build your dll and after build your project that reference your dll

when you deploy it, make sure that you create dependencie folder

for your information, your application first see on GAC folder (windows\assembly), after see on your current path, and after use PATH environment variable"

http://stackoverflow.com/questions/11807889/where-are-dll-libraries-stored-in-vs-net
0
 
LVL 40
ID: 40576909
Q-1

You rebuild the dll through the Build menu.

Just make sure that the one you use for your test is the one generated by the new compilation. To know where the build is generated, open the projects properties (last entry in the Project menu), go to Build tab and look at the Output path at the bottom of the form.


Q-2

The file name for the class has nothing to do with the name of the dll, because a dll can have many classes.

What defines of the dll, by default, is the project name. But you can change that, in the project's properties once again, by defining a different Assembly name in the Application tab.
0
 

Author Comment

by:RadhaKrishnaKiJaya
ID: 40578054
Hi Jacques Bourgeois,
Thank you for your help!  

I already tried Build and Rebuild Solution options.  When I make changes to my class file, my changes are not reflected.  Whe I I checked the DLL file, I see no change in the time stamp.

In the project --> Properties, I don't see any option to change the DLL name.  Anyways, I don't want to change the name, but just wanted to know.

The most surprising thing is, why my changes are not reflected.  Even Intellisense not able to see the new methods I created in the class file.

Thank you again.
0
 
LVL 33

Expert Comment

by:Mike Eghtebas
ID: 40578082
With you class selected, perhaps you need to change Do not copy yo Copy alwaysCopyAlways
0
 
LVL 40
ID: 40578114
What type of project are you working in?

Most dlls are created in a Class Library project, so I assumed that this is what you were talking about. In such a project, you will find the features I have talked about in the Application tab and the Build tab. This might be different if you are in another type of project.

If you do not have this information in the Build tab of the project's properties, simply launch a search for your dll in Windows Explorer. It will list you all the copies it find on your system, with their creation date if you are in Details view.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:RadhaKrishnaKiJaya
ID: 40578125
Hi eghtebas,
Thank you!

This is web project I am working on.  What I understand, the Built Action is applicable for Web Applications.

Please see my above reply to Jacques Bourgeois and throw some light if you can.

Thank you!
0
 
LVL 40
ID: 40578162
If you are working alone and develop the dll in parallel with the web site, you can add it to your solution and reference the project instead of the dll itself. This enables you to step into the dll from your application and debug both together when you run your web application, and you always have the latest copy of the to work with.

To do that, first add your dll project to the web application solution through File...Add...Existing Project. You will see your dll project along the web project in the Solution Explorer.

You now have to change the reference. Remove the old reference, and then launch the Reference Manager. You need to reference your dll project, not the dll itself, which can be done in the Solution tab Manager.
0
 

Author Comment

by:RadhaKrishnaKiJaya
ID: 40599433
Thank you Jacques ,
At this point I am very frustrated.  Now discovered another error.  I am not able to goto definition. For example, when I right click on the method name, GetEmployeeInfo and try to goto the definition, it redirects me to a temporary folder C:\User\username\AppData\Local\Temp\5952$DAL.dll$v4.0.30319$NoDynamic\XXX.DAL.EmployeeDetails.cs[metadata], where I can see only the definition.  It does not redirect me to my original folder, which should be DAL.EmployeeDetails.  See the line below.  I just see only this line and definition of other methods.  But no other codes.

public static XmlDocument GetEmployeeInfo(int employeeId);

Please let me know if you have any idea about this issue.

Thank you again!
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 40599490
Does this happens with other parts of your code or even in other projects?

When you end up with strange behaviors in a project/solution that do not appear in others, the first thing to try Build...Clean Solution and then recompile the solution. If the code for GetEmployeeInfo is not part of the solution, then do the same in the solution that compiles it.

If this does not solve the problem, then look if you have Warnings in the Error List window. Warnings do not prevent you from compiling, but usually points to factors that can have side effects.

If the problem is not solved at that point, you might try Find All References instead of GoTo Definition. The definition should be somewhere in there.

If this still gives you problems, then, try repairing Visual Studio from the Control Panel Programs applet.

If not, then the ultimate uninstall and reinstall of Visual Studio.
0
 

Author Comment

by:RadhaKrishnaKiJaya
ID: 40600081
Thank you Jacques,
Let me try your steps and I will update you.  Thank you again.
0
 

Author Closing Comment

by:RadhaKrishnaKiJaya
ID: 40600094
Jacques,
I was trying to open the .sln file in the wrong folder, resulting all the problems.  By mistake, the same solution file was in 2 different folders.  Now it is working fine.  

Thank you very much for your help.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now