Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Non-default assemblies not parsed in Managed C++
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Drolevar
New Member

Ukraine
4 Posts

Posted - Feb 17 2005 :  04:44:26 AM  Show Profile
I use 10.1.1293.

I have found out, that for some reason non-default assemblies are not parsed. If I add, for example, Microsoft.Office.Interop.Excel to references, it is not parsed. So there is no syntax highlighting, completion, etc. If I choose rebuild and reload this project again, I see that the default assemblies are parsed, but not non-default.
This problem does not exist in C# projects.

What can that be?

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Feb 17 2005 :  5:54:25 PM  Show Profile
using .NET 2003 on a winXP pro machine with MS Office 2000 installed i don't seem to have the option to add this reference to a managed C++ project.

there are quite a list of references available to me, but how do i know which ones are non-default?

zen is the art of being at one with the two'ness
Go to Top of Page

Drolevar
New Member

Ukraine
4 Posts

Posted - Feb 21 2005 :  03:46:26 AM  Show Profile
I have Office 2003. It contains PIA's in it distribution. But .NET should be installed first to install PIAs. Also PIAs for Office XP are available from Microsoft.
When you add a reference to COM library 'Microsoft Excel 11.0', the reference to the corresponding PIA is added automatically.
If no PIA is installed, the assemblies are generated from the type library.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Feb 21 2005 :  6:22:21 PM  Show Profile
i have officially passed the limits of my .NET knowledge

using a C# project in .NET 2003 i have added the COM library 'Microsoft Excel 9.0' as a reference. i now have Excel in the references section of the solution explorer.

i have discovered by double clicking on this that i get something called "Object Browser". this is listing "interop.excel" as the top item. since i have other items who's names start with "system" i guessed that "interop" is a namespace, and that i should be able to get a suggestion when typing "interop.excel" into my C# code.

this is not working. i am getting regular beeps from the IDE when i try to get suggestions after typing "interop."

am i even close to going about this the right way? you may have to provide me with fairly detailed instructions, since i don't really have any experience with .NET programming.

zen is the art of being at one with the two'ness
Go to Top of Page

Drolevar
New Member

Ukraine
4 Posts

Posted - Feb 22 2005 :  06:15:12 AM  Show Profile
For the first the namespace is Microsoft.Office.Interop.Excel.
For the second, for C# code completion for these assemblies works OK. I was talking about Managed C++ projects. So the steps are:
  • Create a Managed C++ project.
  • Add a reference to Microsoft Excel 11.0 in a COM tab.
  • Try to use code completion: Microsoft.Office.Interop.Excel. You'll see that after each word you have no list of members. While if you repeat the same steps for a C# project, they'll be displayed.

Note, that for Excel 2000 (9.0) there are no PIAs, so the appropriate assemblies will be generated from type library.

Edited by - Drolevar on Feb 22 2005 06:17:21 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Feb 23 2005 :  5:46:50 PM  Show Profile
i started with C# deliberately, since if i cannot get it to work there then i cannot report that it does not work in managed C++

i don't have access to Office 2003 at the moment, so installing it is not an option, so i will have to see how far i can get with Office 2000.

i don't yet know enough about .NET yet to understand your comments about PIA's *shrug*

trying this example in C# Microsoft. gives me three suggestions "CSharp", "VisualBasic" and "Win32"

this is with the 'Microsoft Excel 9.0' reference added. i am getting the same suggestions at this point with VAX enabled or disabled.

doing the same test in a managed C++ project and this type typing Microsoft:: i am getting the same three suggestions with VAX enabled or disabled.

it looks like i cannot reproduce this with Office 2000 *sigh*

can you try disabling VAX and see if this makes any difference to what you are seeing? in C# VAX does not produce the completion listboxes, it only enhances them. so the content of these listboxes is down to the IDE.

it is possible that you have run into an IDE bug, but since i am not getting anywhere reproducing this i cannot be sure.

zen is the art of being at one with the two'ness
Go to Top of Page

hfann
Junior Member

Canada
12 Posts

Posted - Feb 24 2005 :  11:28:52 AM  Show Profile
To get Intellisense for these assemblies, use #using <> to add the assembly in any source file. This forces VAX to parse the file. Once VAX parsed the file, you can delete the line.

I use this method to get 3rd party .NET components parsed by VAX. I even created a .h file with #using <> because VAX will lose the information when it clears its cache/temp files once in a while.


Herbert
-----
http://www.fannsoftware.com
Go to Top of Page

Drolevar
New Member

Ukraine
4 Posts

Posted - Feb 25 2005 :  03:58:25 AM  Show Profile
Thanks, Herbert.

This helped. I just wonder why this is not done automatically (when an assembly is added to references).
Could you explain Feline what's the problem? It seems that she(he?) does not understand me.

Edited by - Drolevar on Feb 25 2005 08:37:38 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 01 2005 :  3:44:40 PM  Show Profile
i think one of the biggest problems is that i do not have Office 2003 installed, so what you are describing simply will not happen for me *sigh*

as far as i can tell i have followed the instructions correctly but the namespaces you are referencing are simply not showing up. unless i can find some other references to add that exhibit this behaviour i am going to have to get Office 2003 installed to see this.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 04 2005 :  3:16:45 PM  Show Profile
progress has been made

i now have MS Office 2003 Standard installed on a win2k machine. using a C# project where this should work (since i still want to see it work) i have added the COM reference "Microsoft Excel 11.0"

when i added this reference to a new C# windows project 3 new references were added in the References folder in solution explorer:

  • Excel

  • Microsoft.Office.Core

  • VBIDE


when i type into the cs file i get:
Microsoft.Office.
just fine. however at this point the only available namespace is Core

i have looked through the list of available COM references to add, but i am not seeing anything that sounds like it will make Microsoft.Office.Interop. available to me.

i already had .NET 2003 including C# installed on this machine before i installed Office 2003 so it should have installed all of the required files to make this work.

do you know what reference i am still missing? i know this is difficult, but unless i can lay out the steps to produce the problem for the developers they are going to have a hard time reproducing it.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 28 2005 :  10:45:01 AM  Show Profile
*looks for a wall to head butt*

i have done some more research on this, but i am still not getting anywhere useful. the MSDN page:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/odc_oxppias.asp

seems to hold basic information about this. so i have downloaded and installed the Office XP PIA's. using a win2k test system (a VM Ware machine) with .NET 2003 installed i have unpacked and installed these PIA's.

i used the included batch file to install all of the PIA's, since this was the simplest option. however i cannot find any of the COM references listed in the document when i try to add them as references to a project in the IDE.

so next i installed MS Office 2003 to see if this would help. the MSDN page does list Office XP (which i do not have on hand) as a requirement.

having installed Office 2003 the expected Office XP PIA's are still not showing up, but i can see the Office 2003 COM references. so i have added the Word object.

in the Object Browser (found via double clicking on one of the references added to the C# project i am using) i can see the top level objects:

* interop.word
* office

which is nice, but intellisense does not allow me to add a using reference to Microsoft.Office.Interop let alone any sub namespace.

i am running out of things to try. can anyone point me in the right direction here?

the original bug report says that intellisense works in C#, but not in managed C++. i have never been able to get this to work in C#, so i am not getting very far.

what i am seeing does not match what the MSDN page, or the readme file say i should be seeing *sigh*

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 02 2005 :  12:12:00 PM  Show Profile
i have kept this thread in the back of my mind for a while now. recently i came across the following article on using the Office PIA's

http://www.codeproject.com/csharp/FasterExcelAccessTOC.asp

which lead me to:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=3456

even following the instructions in the second article i am not getting anywhere. i have installed Office 2003 including the PIA's, i rebooted the machine, i have added the reference to the project, and the line:

using Microsoft.Office.Interop;

in a C# project fails to compile, since this is an unknown namespace. unless someone can point me in the right direction i am going to let this one be, since on one currently seems that interested in it.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000