VSTO Development - major improvements in VS2010 / .NET 4.0?

I am trying to explain to my bosses why we should use VS2010 for the upcoming VSTO Excel Workbook application. I did not use VSTO before, but I used VBA. Since 2010, around the corner, I wanted to read about the improvements made to see if 2010 is worth using to develop this application.

So far I have read 2 major improvements: ease of deployment , as well as debugging / com interop ...

I'm just wondering if there is anything else that I did not know about, or if someone here is really developing in VSTO, and used 2010 and both 2008 and could help me sort out the information.

The main concern of my bosses is to deploy the .NET 4.0 runtime on Citrix servers here ... however it seems that with 3.5 we would have to deploy the VSTO and PIA runtime etc ... So there really wouldn’t be a deployment easier since 2010 because installing only version 4.0 is better than installing "VSTO Runtime" as well as PIA etc.? Or is there something I am missing? Anyone here deploying a VSTO application in an enterprise and can talk about it?

In addition, I am also trying to use C # for VB.NET for this application. Does anyone know any key reasons why (except for my bias over syntax preferences) would it be better to use C # for VB for this? Any key features not having VB VSTO development? I read about VSTO Power Tools , and one of them describes combining LINQ classes of the Excel object model - however, it says "C # class set" ... Does anyone know if they literally mean C # - so this will not work with VB.NET, or do they just mean that the code is written in C #? Has anyone ever used these power tools with a VB? I'm going to download and play with him now, but any help again is much appreciated

Thanks so much for any info.

+4
source share
3 answers

Deploy VSTO 3.0 on Enterprise:

There is nothing special about this. I would definitely recommend that you use your company's packaging system, such as Altiris or SCCM for deployment. When packing, make sure that you add the CustomInclusionList project (and configure it in accordance with the MSDN docs) +, do not necessarily sign your assemblies if you have a code signing certificate.

If in a locked environment you need packaging technology so that the package is installed as an administrator. Otherwise, deployment will be a nightmare. Be careful when receiving packages to re-create the package created by Visual Studio. You need to make sure that all registry keys are saved, user actions, etc. You will probably be introduced into hive hccu, which means that users will not be able to remove the add-on itself (unless they are an administrator).

Please note that if users receive an invitation when opening an office application with the request "Do you want to install / not install this addin, etc.", then the custominclusionlist project is not configured properly or you will not be given a registry key.

In Citrix:

It seems to be working fine. The main thing is that citrix servers are fully updated to the latest Office build with all prequistes installed prior to deployment. This is trivial if you have a well-preserved correction system. Because the other defendant said nothing to Citrix. It will work, must be installed in HKCU to avoid any problems.

PowerToys for VSTO:

Yes, it's cool. They work equally well with either VB or C #. they are agnostics of the language, I think that you only refer to the fact that they were written in C #. When deploying, make sure you add the Extensions assembly either locally or in the GAC. it will not be installed for users, even if they already have the PIA Office 2007 component installed.

When using C # over VB.net:

No comments! yes, I would go to C #, although some complain that its more verbose than VB for VSTO projects, I think most of this is a legacy. Look for really bad methods that have 30 optional arguments, you have several ways to deal with this now. Write the extension method yourself or use most of the time in the Excel.Extensions and Word.Extensions namespaces. You can also write overloads in a static helper class and call methods such as Open, only with the parameters that you are going to use. Ultimately, you must make a decision based on what most programmers are better at, and as a result, your strength lies in the programmer’s resource organizations. You may be a C # guru, but if the other 9 guys are VB.net wizs, then it makes sense to do projects on VB.net. still try to convert them, but the real solution with techlead / manager is not related to the monkeys of code.

+2
source

I have not used VS2010 for Office development yet, but I used VS2008 for Word addins and Ribbon as well, I used VB.NET.

All deployments depend on how strictly protected you are. I was on the USAF website, and it required the highest security settings that required signed assemblies, and some hacks with C ++ to make everything work fine, due to limitations in VSTO and Office. I heard that they fixed most of the problems in the new version.

Another problem that I discovered was that at that time there were no books for VS2008 / Office / Addins, which complicated the situation. The network is also cluttered with examples in various versions of VSTO, Visual Studio, which make it difficult to find working examples.

VB has / has an advantage because it supports optional parameters. C # gets them, not sure if it was 4.0 that they get them. If you have code in VBA or VB, I would recommend staying with VB. Power tools will work with both languages.

Regarding the deployment of .NET4.0 on Citrix; I don’t see that this is a problem, but I think you need to log in with this special installer profile.

You can create a small prototype to try ...

+2
source

I partially got the VSTO add-on to work with Outlook 2007 running from Citrix XenApp5 togheter with RES PowerFuse. The supplement is downloaded by Outlook and is visible and active from the security center. One of the important things that I learned is that you have to create a custom installation, since you need to install the application on the local HKLM machine for the Citrix environment in order to pick up the Office application. This looks like supported by Office 2010 , and there is a fix for Office 2007 for this hotfix (KB976811 is available through KB976477).

The problem I'm still facing is that non-user views are loaded by Outlook when working with Citrix. Addin is a WPF application built on top of the PRISM library.

+2
source

Source: https://habr.com/ru/post/1305458/


All Articles