Groups | Blog | Home
all groups > dotnet interop > november 2007 >

dotnet interop : VSTO 3.0, Outook 2007 and Publish



M O J O
11/22/2007 7:26:00 AM
Hi,

I'm using VS2008.

I trying to create an Outlook 2007 add-in.

After making a very small and simple Outlook test add-in, I wan't to try
an publish it, so I use the Publish feature of VS2008.

But when my clients installs the add-in, it is not showing up in Outlook
2007. Hmmmm ... is it because of security issues (which I thoght the
publish feature solved!)?

Thanks!

jialge@online.microsoft.com
11/22/2007 8:21:24 AM
Hello M O J O,

From your post, my understanding on this issue is: you are trying to
publish a Outlook 2007 add-in in Visual Studio 2008, but the add-in does
not show after it is installed. If I'm off base, please feel free to let me
know.

I tried the following test, but it fails to reproduce the issue. Please
check my steps and see if there is anything different from yours.

Step1. Create a Outlook 2007 add-in by File->New->Visual
C#->Office->2007->Outlook Add-in.
Step2. Add the line of code: MessageBox.Show("just for test"); in
ThisAddIn_Startup method.
Step3. Compile the project by Build->Build Solution
Step4. Publish the project by Build->Publish OutlookAddin1. In the Publish
Wizard, I set the "Location to publish this application" to "d:\", and set
the default installation path to empty. Then click Finish.
Step5. After the add-in is published successfully, I go to the d:\ and
click on the setup.exe to install the add-in.
Step6. I open my Outlook 2007 program and see that a message box "just for
test" is shown in start up.

Is it possible that some exception occurred in your startup event handler
and the add-in is disabled by your Outlook? To check if the add-in is
disabled, please go to Outlook program->Help->Disabled Items.

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
M O J O
11/22/2007 10:43:51 AM
Hi Jialiang,

Thanks for helping me out here!!

I restarted my project and followed your description and ....

THIS IS AWSOME!!!!!!!!!!!! IT WORKS!!!!!!!!!!!!

No more struggling with caspol - hell this is a giant step forward for me!!!

One thought though ..... in my "real" add-in, I have a appsetting (in
the app.settings file) which stated the database server, that the add-in
should use ...

<appSettings>
<add key="DefaultSqlServer" value="mypc"/>
</appSettings>

.... but when I devellop, I want it to be my test-database-server/mypc
and when I publish, I want it to be my production-database-server. How
do I do this without having to alter the app.setting file all the time
before publishing?

Thanks again!!! This is very exciting!!

:o)

Best regards,
M O J O


Jialiang Ge [MSFT] skrev:
[quoted text, click to view]
M O J O
11/22/2007 10:45:55 AM
Hi Jialiang,

Thanks for helping me out here!!

I restarted my project and followed your description and ....

THIS IS AWSOME!!!!!!!!!!!! IT WORKS!!!!!!!!!!!!

No more struggling with caspol - hell this is a giant step forward for me!!!

One thought though ..... in my "real" add-in, I have a appsetting (in
the app.settings file) which stated the database server, that the add-in
should use ...

<appSettings>
<add key="DefaultSqlServer" value="mypc"/>
</appSettings>

.... but when I devellop, I want it to be my test-database-server/mypc
and when I publish, I want it to be my production-database-server. How
do I do this without having to alter the app.setting file all the time
before publishing?

Thanks again!!! This is very exciting!!

:o)

Best regards,
M O J O


Jialiang Ge [MSFT] skrev:
[quoted text, click to view]
jialge@online.microsoft.com
11/22/2007 10:47:19 AM
Hello M O J O,

You may try to add two keys in the app settings:
one is for test path, another is for real server path.

<appSettings>
<!--<add key="DefaultSqlServer" value="test path"/>-->
<add key="DefaultSqlServer" value="server path"/>
</appSettings>

Then use <!-- --> to comment one of them. When you are developing, we may
comment the server path; When you are going to publish the add-in, comment
the test path. Will it make it a little bit convenient?

Sincerely,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
M O J O
11/22/2007 11:57:31 AM
Hi Jialiang,

That was what I was afraid of ... that means I have to remember to
comment it out and if I forget, I will have many angree users.

Isn't there another workaround?

Thanks!

M O J O

Jialiang Ge [MSFT] skrev:
[quoted text, click to view]
jialge@online.microsoft.com
11/26/2007 5:59:17 AM
Hello M O J O,

I do not find any other workaround for it.

If it were a web application developed in VS 2005, we could use Web
Deployment Projects http://msdn2.microsoft.com/en-us/library/aa479568.aspx
to customize the publish action, and replace the sections of the config
file according to the server environment. But in Windows application or
VSTO 3.0 application, there is currently no extension that allows us to
customize the publish action. Therefore, we need to always remember to
manually comment the test path in the config file when we do the
publishing. We feel sorry that the current Visual Studio tool cannot meet
your request. Please feel free to submit your concern in
http://connect.microsoft.com/VisualStudio. The Visual Studio product
members will carefully check customers' concerns and try to improve the
products.

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

jialge@online.microsoft.com
11/28/2007 1:57:16 AM
Hi M O J O,

If you need further assistance, feel free to let me know. I will be more
than happy to be of assistance.

Have a great day!

Sincerely,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button