Error trying to reverse engineer a simple VB.NET project

Hi,
I’ve just downloaded the last trial version of SDE (Sp1 - 03-26-2006) and i’m trying to test it.
The first thing I’ve done is to create a simple class inside a class diagram with a method and generate its code. This works fine. :smiley:

But then I’ve added a new method in the source code and tried to update the model. And this is not working :frowning: .

I’m getting a “Input String was not in a correct format” error message when I use the contextual menu in the source code window “Update UML Model”. If I use the “Update UML Model” menu in the Diagram Navigator it’s not working neither, but I don’t get any message. :?

Any solution?

Thanks in advance.

Sorry, I had forgot to say that the VS.NET version is 2005.

:?

BTW, the default function Generated is:


Public Function Operacion1() As System.Void

End Function 

:?

Sorry, but someone should check the VB.NET code generation. The correct sintax for this is:

Public Sub Operacion1() 

End Sub 

Hi Luis,

Thank you for the post.

Unfortunately we are unable repeat the problem you have. Were you able to repeat the problem from scratch with a new VB.NET project? Could you please also try with other programming language such as C# and let me know if the problem persists?

Besides, the default function we generated does not include ‘As System.Void’. May I know which build you are using (please refer to Help | About SDE-VS) so that we can repeat the same issue? Thank you in advance.

Best Regards,
Jick

Hi Jick,

Firstly thank you very much for your support.

This is what I’m doing, starting from scratch:
· Create a new VB.NET project
· Click “Open SDE-VS” in the contextual project menu. (Here the IDE freezes for 1 minute, and sometimes it crashs.)
· In the message box I select to use the default path for the .vpp file. Sometimes, in order to the message box to appear I must close the Diagram Navigator tab and reopen it from the “View/SDE-VS Windows” menu.
· Again in the project contextual menu select “Update UML Model”. In this case, nothing happens and the Diagram Navigator does not show any new class (the default “Class1” generated with the project).
· Delete the class1.vb file
· In the “Diagram Navigator” add a new Class Diagram and add a new class, with an operation.
· “Update All to Code”. The class code is generated correctly (and now with correctly a Sub instead of the System.void return value :smiley: )
· Add a new method to the code and “Update UML Model” from the editor contextual menu. I get a “Microsoft Visual Studio / Input string was not in a correct format.” error.
· If I try to do it from the project contextual menu nothing happens, but the class model is not updated.
· If now I add a new operation to the class and “update code” the new method is correctly added to the source code, but the one added by hand in code is still not updated into the model.

And with C#:
· Create a new C# project
· Click “Open SDE-VS” in the contextual project menu. (Here the IDE freezes for 1 minute, and sometimes it crashs.)
· In the message box I select to use the default path for the .vpp file.
· Again in the project contextual menu select “Update UML Model”. I think I have something really bad in my computer because I get a message saying “Code Synchronization not Supported / SDE-VS supports only C#, VB.NET and Visual C++”)".
· If I close the IDE and delete the class1.cs file I can continue like in the VB.NET example, with the same results.

Sorry for the long explanation, but I want to be sure that I’m not making any incorrect step.

I have not been able to reproduce today the System.void bug :?

Theese are my computer specifications:
· OS: Windows XP Professional - Spanish Version (Maybe the problems are related with this?)
· Visual Studio.NET 2005 - English version - Version 8.0.50727.42.
· SDE-VS Version: 3.2 (Build Sp1_20060326) - Evaluation license.

I’ve attached the two projects (VB.NET and C#) in case it helps you to reproduce the problem.

Thank you again for your support.
VPTests.zip

Hi Luis,

Thank you very much for the long description. It will be very helpful for us to diagnose the problems. I will forward the information to our engineers. Once there is any feedback, I will post here.

Best Regards,
Jick

Hi Luis,

Firstly, let me summarize the issues you reported so far:

  1. “Microsoft Visual Studio / Input string was not in a correct format.” error
  2. Return value - System.void
  3. Model not being updated by adding new operation in code and then update
  4. Unexpected message - “Code Synchronization not Supported / SDE-VS supports only C#, VB.NET and Visual C++”

According to our record, problem 1 and 3 are fixed. However, we were unable to repeat problem 2 and 4. Could you please update to the latest release and see if there are any other issues? You could run the updater (under $vp-suite-install-dir/bin) to update the tool.

Best Regards,
Jick

Hi Jick,

I’m sorry but after updating I’ve been unable even to open succesfully SDE.

This is what I do:
· Open VS.NET 2005
· Create a new VB.NET project.
· Right-click on the project and select Open SDE.

And that’s all. :frowning: . The splash screens is shown, and I get a “Opening project… " message in the VS.NET status bar, but nothing more. After 1 minute or so waiting, I get the “Code Synchronization not Supported / SDE-VS supports only C#, VB.NET and Visual C++”)” message and VS.NET freezes. Sometimes I don’t get this message but the VS.NET allways freezes.

I’ve attached the created log files.

The SDE version is now: 20060327
hs_err_pid1852.log
vp.log
sdevs.log

Hi Luis,

I am sorry about the failure. I just passed your report to our engineers for checking. Once there is a feedback, I will let you know.

Best Regards,
Jick

Hi Luis,

The problem might be related to the update process. Could you please reinstall the tool? The latest release is just deployed several minutues ago. You could download it from the download page.

Sorry for any inconvenience it may cause you…

Best Regards,
Jick

Hi Jick,

The synchronization is working now :stuck_out_tongue: . I’ve uninstalled SDE, installed the new version and updated.

But I can’t create diagrams in a new project :frowning: . I can open any existing VB.NET project with a .vpp file, but if I create a new project and try to “Open SDE” the IDE freezes and after a minute I get the “Code Synchronization not Supported / SDE-VS supports only C#, VB.NET and Visual C++)” message and VS.NET hangs up.

This is what I do:
· Create a new DLL project.
· Click “Open SDE-VS”.
· SDE is loaded (the splash screen is shown) and a “Loading project” text is shown in the status bar. But nothing more happens.

But it works if I do this:
· Create a new DLL project.
· In the project directory create manually a “vppproject” directory and copy an existing .vpp file.
· Rename the .vpp file as the project name.
· Click “Open SDE-VS” in VS.NET.
· It works :smiley:

Then I suppose the problems come when trying to create the .vpp file :?:

It’s a little annoying, but at least I can try the product 8) (What brings me more questions, but I’ll put them in another thread)

I’ve attached the generated log files.

Thanks for you help.
sdevs.log
vp.log

My response was too fast, I think :frowning:

Code synchronization is working “almost” everytime, but there are times when it does not work.

Worst of all is that sometimes the UML classes disappear from it’s class diagram (but they are somewhere, because you can select them in the secuence diagram). But even worst, sometimes is the code what disappears :shock: . And without any warning, nor message, output… nothing.

I’m sorry, but this is something that should never happen. In a project with 50+ classes and 5 people working on them you must “trust” your modeling tool to let it modify your code. And you can’t trust it if code is deleted without any warning. :!:

:frowning:

I’ve attached some log files. Maybe they could help you to solve this problem.

Thanks for your attention :slight_smile:
sdevs.log
vp.log

Hi Luis,

Where was the VP project came from? A project may contain code synchronization data, if you copied a project from one VS project to another VS project, the data therefore does not match with the destination VS project and may cause synchronization problem.

Best Regards,
Jick

Hi Luis,

Regarding the problem of showing “Code Synchronization not Supported / SDE-VS supports only C#, VB.NET and Visual C++)”, please try reset the layout perspective and restart SDE-VS. Here are the steps:

  1. Select Tools > Manage Perspectives… from the menu.
  2. Select the current perspective from the list and press the Reset button.
  3. Click Yes when you are prompted for restart the SDE-VS.

Hope this helps.

Best Regards,
Jick

Hi Luis,

By the way, would it produce another hs_err_pidXXXX.log file everytime you failed to create a SDE project?

Best Regards,
Jick

Hi Jick,

Yes, you’re right. The .vpp file was created during one of my first tests on a diferent project. In any case, is there a way to disable “code deletion” and set it to “code comment”? I’ve seen that deletion can be disabled, but the alternative is “let the source code as it is”. Too, I think the code generation and the reverse engineer process should generate a detailed report with the result (Class1 created, Class2.OneMethod commented, etc…)

Regarding the problem of showing “Code Synchronization not Supported / SDE-VS supports only C#, VB.NET and Visual C++)”, please try reset the layout perspective and restart SDE-VS. Here are the steps:

  1. Select Tools > Manage Perspectives… from the menu.
  2. Select the current perspective from the list and press the Reset button.
  3. Click Yes when you are prompted for restart the SDE-VS.

I’ve done this, but the problem persists. I’m unable to start SDE in a new project without a .vpp file already created. I’ve attached the generated log files.

By the way, would it produce another hs_err_pidXXXX.log file everytime you failed to create a SDE project?

Not in these tests, but it’s generated sometimes. In the zip file attached I’ve added two of these files.
These files are sometimes generated after the “Code Synchronization not Supported” message, and other times after a VS.NET IDE crash. Allways during the process to create the .vpp file.

Hope this helps.

Luis.
vpLogFiles.zip

Hi Jick,

You’re right. This .vpp file comes from one of my firsts test with SDE (when it could open correctly :wink: ). So it’s normal that the process fails to synchronize correctly. In any case, is there a way to set a “comment source code” instead of “delete source code”?. I think this is more secure that simply delete the code.

Regarding the problem of showing “Code Synchronization not Supported / SDE-VS supports only C#, VB.NET and Visual C++)”, please try reset the layout perspective and restart SDE-VS. Here are the steps:

  1. Select Tools > Manage Perspectives… from the menu.
  2. Select the current perspective from the list and press the Reset button.
  3. Click Yes when you are prompted for restart the SDE-VS.

I’ve done this and then closed SDE and VS.NET, but it’s not working anyway. When I try to open SDE it loads, and all the windows are show (after reseting the Perspectives), but the IDE stop responding with the status “Loading project…”. After a while a get the “Code synchronization not supported message” or, other times, the IDE crashes. I’ve attached related log files.

I’ve tried to uninstall and reinstall the product, but the problem persists.

Any solution?

Thanks.
vpLogFiles.zip

Hi Jick,

You’re right. This .vpp file comes from one of my firsts test with SDE (when it could open correctly :wink: ). So it’s normal that the process fails to synchronize correctly. In any case, is there a way to set a “comment source code” instead of “delete source code”?. I think this is more secure that simply delete the code.

Regarding the problem of showing “Code Synchronization not Supported / SDE-VS supports only C#, VB.NET and Visual C++)”, please try reset the layout perspective and restart SDE-VS. Here are the steps:

  1. Select Tools > Manage Perspectives… from the menu.
  2. Select the current perspective from the list and press the Reset button.
  3. Click Yes when you are prompted for restart the SDE-VS.

I’ve done this and then closed SDE and VS.NET, but it’s not working anyway. When I try to open SDE it loads, and all the windows are show (after reseting the Perspectives), but the IDE stop responding with the status “Loading project…”. After a while a get the “Code synchronization not supported message” or, other times, the IDE crashes. I’ve attached related log files.

I’ve tried to uninstall and reinstall the product, but the problem persists.

Any solution?

Thanks.
vpLogFiles.zip

Sorry for the multi-posts. My connection is not very stable today :?

Hi Luis,

Thank you for your detailed reply. I have forwarded your reply to our engineers. I will also discuss with our developers your suggestion about “comment source code” and showing a report.

Thank you once again! :smiley:

Best Regards,
Jick