VTSO Code doesn't compile on new laptop with Office2021/VS2022 - visual-studio

I wrote an Outlook plug-in to help me manage the spam I receive through my mail server.
It was written for Outlook 2016 using Visual Studio 2019. My old laptop took a nosedive and crashed, refusing to power on afterward.
On the new laptop, I've upgraded to Visual Studio 2022 and Outlook 2021.
Now I'm getting a weird compiler error.
Error CS0115 'AddIn.CreateRibbonExtensibilityObject()': no suitable method found to override
Here's the referenced code:
protected override IRibbonExtensibility CreateRibbonExtensibilityObject()
{
return new ContextMenus();
}
The Microsoft.VisualStudio.Tools.Applications.Runtime is version 10.0.0.0.
I'm wondering if there's something I forgot to install, perhaps?

To understand whether you have got everything required for Office add-ins development with VS2022 you can try creating a new add-in project. If it does work correctly then you have got everything set up on your side. Now you can compare the newly created add-in project with a migrated one to find what is wrong with your migrated solution.
Anyway, you may find similar threads over the internet:
Microsoft add-in code build error --ThisAddIn.RequestComAddInAutomationService()': no suitable method found to override.
Error in once functioning C# project - no suitable method found to override

Related

Unable to open designer for DevExpress version 8.2 in Visual Studio

I've inherited an old project which uses Devexpress 8.2.4 - so i went and installed an appropriate DXperience Subscription v8.2.4. Now, when I try to open the designer through Visual Studio 2019, I get a:
"This method explicitly uses CM policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40/LegacySecurtyPolicy configuration switch. Please see http://go.microsoft.com/fwlink/?LinkID=155570 for more information."
Then I tried to open the project in VS 2010, and upon attempt at opening the designer, same CAS policy error happens.
After editing the VS2010 DevEnv configuration file (and respective config file for VS 2019), as Thomas suggested in his answer here, my Visual Studio 2019 just started crashing during start, and my Visual Studio 2010 successfully started but it then crashed upon trying to select the designer object.
Yes, I'm trying to get this designer for Devexpress 8.2 to run in either IDE - I just need to get it to work so I can hopefully add a QR Code(is this even possible in v8.2.4???).
I just don't know how to access designer to actually graphically update the report. I did some Devexpress projects myself but using v19 and newer, but I'm having trouble now, opening this designer for old Devexpress 8.21.
Any help would be appreciated as this HAS to be done by tomorrow.
Also, if v8.2.4 doesn't support QR Code (an XRBarCode object), what would be an alternative for adding that QR Code functionality? Would I have to upgrade to newer versions - would that break something?
Thanks!

Xamarin - The name 'Resource' does not exist in the current context

I've googled till I'm blue in the fingers trying to find a resolution to this issue. I've tried several things but nothing helps. I've got Xamarin and Visual Studio 2015 Enterprise. I had everything working on a previous PC a few months back. Now I have a new one and am just now getting Xamarin set up. I have a few demo and self hacked solutions I was working with. Now all of them give me the above error message. I've made sure the namespace is correct in all modules. The solutions are really small. Nothing fancy at all. Basically Hello World stuff so I'm at a failure to figure out why it fails now. Case in Point: The Hello World that is failing is one HelloWorld.cs file and a few PNGs in the Resources tree along with a main.xml.
If anyone could shed some light I would be most grateful.
I just updated (through VS) Xamarin. Now the older solutions I had won't load. If I create a new solution, I've got the same Resource does not exist error. Xamarin appears to be broken. I've worked with it in the past and had no problems like these.
I resolved it. My Xamarin version was not updated. I updated it by going to
Programs & Features => Microsoft Visual Studio Enterprise 2015, click on change/modify. Now in Visual Studio Popup under Cross Platform Mobile Developement update the C#/.NET (Xamarin v__). After updating this error gets resolved.
For me I didn't required to install Visual Studio 2017.
Also Thanks Martin for your suggestion, your answer can also workaround but it is not necessary to install 2017 just need to upgrade Xamarin version to work with VS 2015.
This bug currently arises with Visual Studio 2015. See this thread and this thread on the Xamarin Forums. Apparently the only workarounds now is to install Visual Studio 2017 or downgrade to older version of Xamarin. There is also an opened bug report for this, so it hopefully should get resolved soon.

Can't launch outlook in visual studio through TFS add-in

I am using visual studio 2013 with Team foundation Server add-in. Opening up a TFS task/bug item, there is a outlook icon button, which allow me to open up outlook new email with the TFS item title.
my visual studio runs in administrator mode.
I have two office versions installed (office 2013 and office 2016.)
Each time when I switch office versions, I will do a repair for the office version. and most time I was using office 2013 and everything works fine including open outlook through TFS add-on.
today, suddenly I couldn't open outlook through the TFS add-on, the error is
Unable to cast COM object of type 'Microsoft.Office.Interop.Outlook.ApplicationClass' to interface type 'Microsoft.Office.Interop.Outlook._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063001-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
I repaired office 2013, but didn't work.
some one knows other possibilities of the issue?
thanks.
The root issue is that the Version reference for the TypeLib created by the Outlook installation is pointing to a incorrect value.
The root issue is that their is a problem with the Outlook
installation Common Object Model (COM) interface where the version
referencefor the TypeLib entry set by the Outlook installation is
pointing to a incorrect value/version or that version does not point
to a correct location. If you continue to have issues
then you may beed to reinstall Microsoft Outlook. Repairing the
Outlook installation does not fix this issue so a reinstall is
suggested.
Just following the steps mentioned in below article to fix that: https://www.fieldstonsoftware.com/support/support_gsyncit_8002801D.shtml
Just verify that with Regedit.exe, check below keys:
HKEY_CLASSES_ROOT\Interface\{00063001-0000-0000-C000-000000000046}\TypeLib
HKEY_CLASSES_ROOT\TypeLib\{00062FFF-0000-0000-C000-000000000046}
Verify if the type library (GUID should be {00062FFF-0000-0000-C000-000000000046}) is indeed properly registered, using the correct type library version number.
Andy's post is right. you can follow the instructions to find out the issue.
Office 2016 registry key is 9.6, on my machine, even I uninstalled office 2016, the registry key 9.6 still exists at
Computer\HKEY_CLASSES_ROOT\TypeLib{00062FFF-0000-0000-C000-000000000046}
After deleting it, TFS office add-on works fine now. I think the add-on is trying to use the latest version and it causes the issue.

Error message in VS2013 Ultimate edition

I'm getting the following error message
Cannot access a disposed object. Object name: 'MarshalingWindowFrame'.
This message came when I tried to load a SLN file into VS2013.
What is the reason?
I am using VS2013 Ultimate with Update 4 on Windows8.1 pro x64 bit OS (8GB RAM, 500GB HDD)
If you get that when opening a solution, either an addon is bugging out or (worse, but less likely) you found a bug in VS itself. Try safe mode and see if that helps.
If however you get the error when opening a form rather than the solution itself (remember opening a solution loads the various forms), there's a bug in an user control that's trying to access a disposed object. Remember that user controls run as binaries when hosted in VS, so make sure you put actual code inside guards that require you not to be in design mode.
Was that project created in the earlier versions or in the Visual Studio 2013 Preview? Because, if you update this project from Visual Studio 2013 Preview, you have to check the update procedure (http://blogs.msdn.com/b/lightswitch/archive/2013/08/12/upgrading-your-lightswitch-projects-raghuveer-gopalakrishnan.aspx) first, perhaps it can give some hints why this happens.

Error: The project type is not supported by this installation

I'm trying to open a silverlight project in Visual Studio 2008 and getting this error.
The project type is not supported by this installation.
Let me tell you I did installed:
VS2008
SP1
Silverlight Tools 3
Silverlight SDK
Silverlight
And they were installed in the sequence they are mentioned here. Still I'm getting the same error.
Adding some more details which might be helpful in identifying the cause:
When I try to create a new silverlight project it gives me error "Object reference not set to an instance of an object". And shows "...project creation failed."
I tried unistalling all of the things and installing them again. It really took a lot of time but didn't solved my problem.
Any help appreciated.
Open the project.csproj file with another editor, delete whatever you find between
<ProjectTypeGuids></ProjectTypeGuids>
I've had the same error when I tried to open a solution which required VB.NET, despite everything (to my knowledge) being C#.
If you've done a full install of VS then try this solution: http://andrewgunn.blogspot.com/2008/03/silverlight-project-type-is-not.html
Let us know how it goes.
Do you know who the silverlight project was created by? If so, then contact them and ask them if they used VS 2008 or if they used VS 2010 beta 1/2 (VS 2010 has a lot more and better support for silverlight so it's probable)
If they used VS 2010, then just go to the microsoft website and download you a copy... it's free(right now)
(and if you'll be doing much silverlight development, I'd recommend downloading it anyway. It has code completion for XAML!)
run devenv /setup

Resources