I have an Excel UDF . It is written in C# and the automation addon has been packaged using the Visual Studio setu up project wizard. The addon loads in the list of automation addons available but the formula does not appear in the Insert function formula dialogue box.
I used Office 2003 and Visual Studio 2008 to build the addin. The client machine has .Net Framework 2.0 installed and does not have any installation of VS.
Should I have to enable the udf specifically somewhere ? This problem appears only when I am packaging the addon to distribute it to a client machine.
Thanks,
The fact that the COM add-in appears in the availale list of automation add-ins would imply that the COM add-in has been successfully registered on the target machine.
Could it be a Trust issue? You can check the level of trust your assembly has using the Microsoft .NET Framework Configuration: http://support.microsoft.com/kb/815147
I suspect you'll need full-trust.
I haven't built add-ins with COM for a while (I can list the alternatives if you like), so let me know if this doesn't fix it and I'll look into it further.
Related
I have developed a VSTO add-in for Excel and created a setup file to install.
Its working fine in office 365/win10, but I want to check how it performs in different office versions such as 2016, 2019 or 365.
How can i do that ? Is there a smarter way to do it within Visual studio or do i need to create virtual pc for each environment and test them one by one.
You can create a VM and test your MSI there for each supported platform/OS/Excel version. There is no smarter way for that.
I was made aware of an interesting situation by my client today. I am sure it is something simple but seems like I can't put my finger on it. Have never faced this issue and Google has not been too helpful.
Problem
On my client's laptop, the Add-In is created with Add-in Express™ for Microsoft® Office and .net. When running the Add-in from VS, the breakpoints do not trigger. I logged in via teamviewer. We created a new test project (Add-in) and added this simple code.
Private Sub AdxExcelAppEvents1_WorkbookOpen(sender As Object, hostObj As Object) Handles _
AdxExcelAppEvents1.WorkbookOpen
MessageBox.Show ("Hello World")
End Sub
I put a breakpoint on AdxExcelAppEvents1_WorkbookOpen and ran. I got the message when I opened a new workbook but the breakpoint did not trigger.
I tested the same code on my laptop and it works just fine.
What has he and I tried
Unregister, Clean + Rebuild, Register
Manually cleaning the Debug folder
Repairing Add-In Express
Uninstalling/ReInstalling Add-In Express
Jumping between frameworks 4.5 and 4.6, 4.7.1
Toggling Tools | Options | Debugging | General require source files to exactly match the original version
Toggling Solution platforms (x86|64|AnyCPU)
Applications
Visual Studio Version: 2019 Pro
MS Office: 2016 Professional Plu 2016
Let me know if you need anything else?
FYI: This has been crossposted at Add-in Express forum I usually do not crosspost but seems like my client is under pressure and has to deliver this project on monday morning.
You can use the method Debugger.Break from System.Diagnostics and observe if you get more information about a plausible unhandled exception. In this case, we get the exception wkernelbase.pdb not loaded and Siddharth found it can be fixed by selecting : Tools->Options->Debugging->Symbols->Select "Microsoft Symbol Servers".
I suppose there's an {excel}.exe.config file in the Office folder. The .config requires all add-ins to use .NET 2.0 (3.0, 3.5).
That would explain the issue: you use .NET 2.0 (3.0, 3.5) while the debugger expects to use .NET 4.0 (4.X).
And yes, Add-in Express is built around the COM Add-in technology, not VSTO Add-in.
I need to work on Project Server using Microsoft.Office.Interop.MSProject.dll from Visual Studio.
Using gacutil.exe I have registered Microsoft.Office.Interop.MSProject.dll and at folder "C:\Windows\assembly" there is entry for MSProject.dll whose processor architecture is MSIL.
I have created Console Application and when I try to create Application instance it gives error:
Class not registered-HRESULT: 0x80040154 exception. As shown in image.
Target platform for this project is x86(32-bit). What could be the reason for the error?
Is it because office is not installed on local machine? Is there any alternative to using PIA without installing Office?
I have tried creating Project Add-in from Visual Studio, it works successfully, but it requires Project Professional to be open, which I want to avoid. Is it possible to avoid opening of Project Professional application in this case?
You need to have the Application (i.e. MS Project) installed on the PC. Interop files sre used for marshalling property or method calls from a managed code to the host application.
I have team members that need to be able to checkin VBA modules/classes created in Excel 2007/2010.
I want to be able to use some TFS functionality, ideally from within the VBA IDE.
I don't want to checkin Excel files as artefacts. Ive seen the MSSCCI provider download from MS.
I don't think in this case the Windows shell extensions from the Power Toys helps because I don't want to have to create an additional process for developers to export and/or import class & module files from their work in VBA project maintenance.
Question: Can someone provide a way to use the MSSCCI provider with Excel 2007 (or even Excel 2010 only)? Do you think this would only be possible with custom VBA addin?
Update:
I've thought about using an approach such as making a custom VBA addin and adding some commands that make basic calls to the TFS client object model.
Just found this post from Codeproject from another question this time looking for the same thing but for SVN rather than TFS.
There is a Visual SorceSafe provider for VBE that comes with Office XP Developer. I used it for many years and still have it installed. It does what you want, but using VSS and not TFS.
Note that the product is not supported, but VBA/VBE has not changed since Office 2000. I used the provider for two years for Excel 2003 development with no problems.
I seem to remember recently an article describing how you can use VBA/VSS with the extra benefit of having the code also "posted" to TFS. Since I no longer professionally code in VBA/VSS, I didn't have a need for the article, but did find the topic interesting.
Office XP Developer has a few other tools that make it worth the time to install.
Access Source Code Control and Team Foundation Server
Today's guest writer is Mike Sullivan - a tester on the Access team
With the release of Visual Studio Team System 2008, we've recently received questions from several customers regarding whether or not Team Foundation Server (TFS) can act as a source code control provider for the Access source code control (SCC) component. The answer is yes!
Although many folks refer to Access’ source code control component as “SourceSafe integration,” that only tells part of the story. SCC integration within Access is fully compatible with any provider that implements the Microsoft Source Code Control Interface (MSSCCI). Although Visual SourceSafe is one of the more widely used MSSCCI providers, there are several other products that implement this interface, including Team Foundation Server 2005 & 2008 as well as IBM ClearCase.
However, MSSCCI support in Team Foundation Server is not native and requires an additional add-in available for download:
MSSCCI Add-in for Team Foundation Server 2005 http://www.microsoft.com/downloads/details.aspx?FamilyId=87E1FFBD-A484-4C3A-8776-D560AB1E6198&displaylang=en
MSSCCI Add-in for Team Foundation Server 2008 http://www.microsoft.com/downloads/details.aspx?familyid=faeb7636-644e-451a-90d4-7947217da0e7&displaylang=en
Of course, to enable SCC functionality from within Access, you’ll also need the Source Code Control add-in. This shipped as a free download as a part of the Access Developer Extensions for Access 2007 and as a separate free add-in for Access 2003:
Access 2007 Developer Extensions http://www.microsoft.com/downloads/details.aspx?FamilyId=D96A8358-ECE4-4BEE-A844-F81856DCEB67&displaylang=en
Access 2003 Source Code Control Add-in http://www.microsoft.com/downloads/details.aspx?familyid=2ea45ff4-a916-48c5-8f84-44b91fa774bc&displaylang=en
If you’re interested in taking this configuration for a whirl, you might want to download the Team Foundation Server Virtual PC image that has been made available by the Visual Studio team. Included on this virtual PC are copies of Visual Studio Team System 2008 and Office 2007 Enterprise SP1 (though Access is not installed by default on this image – you’ll need to go to Add/Remove programs within Control panel and launch setup to install Access). This trial image is good through December 31, 2008.
To get the Virtual PC image working, you’ll also need to install the Access Developer Extensions (the MSSCCI add-in is preinstalled). Since VSS is the default MSSCCI provider on the machine, you’ll need to tweak a registry key to get Access to use Team Foundation instead:
Path: HKEY_LOCAL_MACHINE\SOFTWARE\SOURCECODECONTROLPROVIDER
Key: ProviderRegKey
Value: SOFTWARE\Microsoft\Team Foundation Server MSSCCI Provider
Hopefully those of you curious about support for TFS have had your questions answered!
I published my excel addins with clickonce on vs2010.
It`s prerequisites contains .net framework 4 client,vsto 2010 and installer3.5.
Deploying it on win7 works well,when I deploy it on xp,installing no error occured,
but it(com) cannot loaded when run excel app.
I tried mang mehods,only when I manually installed .net framework 2.0 or 3.0 or 3.5
my addin will appear
I donot know why.
thanks
Here's a dumb question, when deploying are your users installing the .vsto or the setup.exe (aka bootstrap). If they are installing the just the .vsto file they aren't getting any of the pre-reqs. They live in the setup.exe. Also are you installing the PIAs (or are you using the embedded PIAs which is new to 2010)? Win7 machines tend to have the right pre-reqs but when you go back in time on XP they don't.