![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am develloping a .net application using excel automation. Me and my colleague are having trouble with the excel reference. When i add the reference and he does a get-latest, the excel reference is not found and the app wont compile. If he add it again and i do a get latest i have the same problem. we are running the same version of excel. Now, i thought that this problem should be solved by referencing the office PIA rather the COM object directly. I have yet to test that, but i'd like for someone to comment on that approach. Also, my dev environement is running Excel 2003 while production environnement are running Excel 2002. So which PIA should i install and how can i be sure that this will work on production... Any feedback and comment on this will be appreciated. |
#3
| |||
| |||
|
|
On Sep 4, 2:56 pm, R... (AT) newsgroups (DOT) nospam Reminewsgroupsnos... (AT) discussions (DOT) microsoft.com> wrote: I am develloping a .net application using excel automation. Me and my colleague are having trouble with the excel reference. When i add the reference and he does a get-latest, the excel reference is not found and the app wont compile. If he add it again and i do a get latest i have the same problem. we are running the same version of excel. Now, i thought that this problem should be solved by referencing the office PIA rather the COM object directly. I have yet to test that, but i'd like for someone to comment on that approach. Also, my dev environement is running Excel 2003 while production environnement are running Excel 2002. So which PIA should i install and how can i be sure that this will work on production... Any feedback and comment on this will be appreciated. I am assuming that by "get latest" you are referring to getting from sourcesafe, right? First (not to be flip but....) make sure that after you add the reference you check in the project file? <g I wouldn't add the PIA directly. I would either add the COM reference or use the toolbox to add through com. VS is "smart" enough to use the PIAs when applicable. That being said, I just added the Excel 11 COM object, and my project now includes VBIDE, Microsoft.Office.Interop.Excel, and Microsoft.Office.Core as references. All from the GAC. |
#4
| |||
| |||
|
|
Yes of course the reference was added prior to the check in. Do you think my problem is caused by the missing PIA and that installing the PIA will solve the problem? "Doug Semler" wrote: On Sep 4, 2:56 pm, R... (AT) newsgroups (DOT) nospam Reminewsgroupsnos... (AT) discussions (DOT) microsoft.com> wrote: I am develloping a .net application using excel automation. Me and my colleague are having trouble with the excel reference. When i add the reference and he does a get-latest, the excel reference is not found and the app wont compile. If he add it again and i do a get latest i have the same problem. we are running the same version of excel. Now, i thought that this problem should be solved by referencing the office PIA rather the COM object directly. I have yet to test that, but i'd like for someone to comment on that approach. Also, my dev environement is running Excel 2003 while production environnement are running Excel 2002. So which PIA should i install and how can i be sure that this will work on production... Any feedback and comment on this will be appreciated. I am assuming that by "get latest" you are referring to getting from sourcesafe, right? First (not to be flip but....) make sure that after you add the reference you check in the project file? <g I wouldn't add the PIA directly. I would either add the COM reference or use the toolbox to add through com. VS is "smart" enough to use the PIAs when applicable. That being said, I just added the Excel 11 COM object, and my project now includes VBIDE, Microsoft.Office.Interop.Excel, and Microsoft.Office.Core as references. All from the GAC |
#5
| |||
| |||
|
|
On Sep 4, 3:46 pm, R... (AT) newsgroups (DOT) nospam Reminewsgroupsnos... (AT) discussions (DOT) microsoft.com> wrote: Yes of course the reference was added prior to the check in. Do you think my problem is caused by the missing PIA and that installing the PIA will solve the problem? "Doug Semler" wrote: On Sep 4, 2:56 pm, R... (AT) newsgroups (DOT) nospam Reminewsgroupsnos... (AT) discussions (DOT) microsoft.com> wrote: I am develloping a .net application using excel automation. Me and my colleague are having trouble with the excel reference. When i add the reference and he does a get-latest, the excel reference is not found and the app wont compile. If he add it again and i do a get latest i have the same problem. we are running the same version of excel. Now, i thought that this problem should be solved by referencing the office PIA rather the COM object directly. I have yet to test that, but i'd like for someone to comment on that approach. Also, my dev environement is running Excel 2003 while production environnement are running Excel 2002. So which PIA should i install and how can i be sure that this will work on production... Any feedback and comment on this will be appreciated. I am assuming that by "get latest" you are referring to getting from sourcesafe, right? First (not to be flip but....) make sure that after you add the reference you check in the project file? <g I wouldn't add the PIA directly. I would either add the COM reference or use the toolbox to add through com. VS is "smart" enough to use the PIAs when applicable. That being said, I just added the Excel 11 COM object, and my project now includes VBIDE, Microsoft.Office.Interop.Excel, and Microsoft.Office.Core as references. All from the GAC What, exactly, do you mean by "missing PIA?" The PIAs should have been installed when you installed both Office and VS2005, or are you on VS 2K3?? Also, if you are adding a reference via the "Browse" rather than from the GAC or COM object, you need to ensure that the "browse to.." directory is exactly the same on both machines. You can do this by either: Mounting a network drive to the same location on all developer PCs Using the same location on all PCs (local copy) Including the required "3rd party" assemblies in a subdir of the project and using that subdir (the subdir will be project relative in this case). Check your project file with notepad to see where the "hintpath" is for the assembly. You may be surprised... |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |