VB.NET 2002 IDE Failing to update local dependencies

N

Nak

Hi there,

I have come across a rather frustrating bug with the 2002 VB.NET
Standard IDE. I am currently developing an application framework to use my
my new products, all is pretty straight forward except for when using the
assembly in another assembly. Compiling the applcation that is using the
assembly *should* update its references to any new version, but it does
*not* always do this!

For example, I make a change to my framework, compile and then close the
solution, open the application that is consuming the assembly and recompile
that. The referenced version stays on the previous version! Sometimes I
have noticed that the IDE will even not compile a new version, repeat
attempts will result in the same old version being placed in the bin
directory.

As a solution, close the IDE, restart the PC, load the class library
back up, compile (it should now be updated and placed in the bin directory).
Then open the "consumer" remove the reference to the old assembly, add a new
one and compile. Sometimes I need to even replace and usercontrols with the
new ones, which is pretty strange because I am unsure where the IDE is
caching this old assembly.

Is there any work around for this because its making debugging a
complete nightmare because your unsure whether your changes were even
compiled! I've now started including an assemblyVersion property to all
user controls and components just so I can see quickly whether they are upto
date. Anyway, thanks in advance for any advice on this one.

Nick.
 
N

Nak

Hi again,

I can't really believe my eyes, I'm sitting trying to compile my
assembly and it keeps reverting back to an old version!! I make a change,
delete the bin and obj folders then save and recompile and the old dll is
back!!! Over and over again! I restart and it all starts working again!

Nick.
 
P

Peter Huang

Hi Nick,

It seems that your project works now.
If you still have any concern on this issue, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

Nak

Hi Peter,

Well I wouldn't exactly put it like that. This is my current procedure
for updating my assembly,

1) Open the class library
2) Make changes
3) Save and compile
4) Open the consuming assembly
5) Remove the reference to the old DLL
6) Add a reference to the new DLL
7) Attempt to save and compile
8) Recieve an error message saying it can't find the strong name key,
which is either fixed by closing the solution and re-opening it.

I have to do this *every* time I want to update my class library. Also
I get the error in point 8 quite regularly, I believe that VB.NET has a
resource leak and forgets to close the strong name key file, so technically
it should say it can't "open" it rather than "find" it!

The joys or developing with VB.NET 2002 Standard, I'm thinking of
writing a book... ;-)

Nick.
 
P

Peter Huang

Hi Nick,

Based on your description, I understand that your scenario is as below.
You have a solution which included two projects(1.class libray(stongnamed),
2. a windowform,I assume it is a window form)

I think we can develop the solution as below.
1. in the windows form project we can add a project reference to the class
library project
2. set the start up project as the windows form project
3. so that after we change the class library code, we may just press
Ctrl+F5 or F5 to run the winform, then the IDE will help to build the
classlibrary first and then the winform one and then lauch the winform exe
to run the app
4. And now we will find the class library's chaning will take effect here.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

Nak

Hi Peter,
Based on your description, I understand that your scenario is as below.
You have a solution which included two projects(1.class
libray(stongnamed),
2. a windowform,I assume it is a window form)

Nope, I have 2 solutions, 1 for my class library/s and 1 for the windows
forms application that is consuming the class library.

Both of which are strong named using the same snk file.

I think I found part of the problem,

My class library solution had 3 projects, 1 for a private class library
containing my application framework, a public class library that I wish to
be used to create 3rd party plug-ins for my framework, and another class
library to be used for creating 3rd party plug-ins for the windows forms
application that is consuming the framework (application specific).

I've resolved the versioning issues by prenting the public class library
for making plug-ins for my application framework from being compiled each
time the solution is compiled. What was happening was it was compiling it
*again* last, thus breaking the compatbility with the other assemblies using
that class library! I hadn't thought about this problem occuring before to
be honest with you, can you specify the build order of projects in a
solution?

Application specific Interfaces & Plugins --> Framework Interfaces &
Plugins --> Framework

From what I could tell it was building the "Framework Interfaces &
Plugins" last, and breaking compatability. I don't understand how fixing
this has managed to fix the issue with no changes being made to the
"Framework" but it works now. Hmm, maybe I should arrange my solutions
differently. But now I can make a change, save & compile, open up the
consuming application and just run it, it will then update the framework and
use my recent changes. I'm relieved this is working now because it was
making development a complete nightmare!!

Nick.
 
P

Peter Huang

Hi Nick,

I am glad that you have resolved the problem.
As for the build oder, I think we can right click on the solution file and
then click Project Build Order.
For project dependencies, we can check the dialog by right click on the
solution file and then click Project Dependencies.

If you still have any concern on this issue, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

Nak

Hi Peter,
I am glad that you have resolved the problem.
As for the build oder, I think we can right click on the solution file and
then click Project Build Order.

Oh cool, I thought it must be somewhere but couldn't find it. It's a
shame you can't just set the "build order" in the "build order" dialog, the
automated way of doing it constantly has them in the same order for me, so
maybe the build order wasn't the problem, which is a little confusing as I
definitely had 2 different versions of my public interface library being
created with each build.
For project dependencies, we can check the dialog by right click on the
solution file and then click Project Dependencies.

Cool, that's in the same dialog, but anyway, thanks for the help, much
appreciated.

Nick.
 
P

Peter Huang

Hi Nick,

If you still have any concern on this issue, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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