VB.net VS2013 office.interop.excel suddenly not found? [duplicate] - vb.net

This question already has answers here:
Can I still use Microsoft.Office.Interop assemblies with office 2013?
(5 answers)
Closed 6 years ago.
I loaded up a current application project to implement some updates to the code and all of a sudden my program won't compile.
I've already got versions of this program in use which work just fine.
The issue seems to be with the Microsoft office object library. I have checked my references and it is shown as checked.
Yet VS2013 now cannot find the library. I have removed and re-added the library with no effect.
No other libraries seem to be affected.
Any ideas?

I managed to fix it.
I added the DLL files for interop.excel and interop.outlook manually by going to properties --> References --> add --> Browse --> locate the dll library.
I used this MSDN page to figure out where they were and this worked.
Thanks to all who offered help!

Related

How do I use the Microsoft.InteropFormTools?

I need to use the WinForms RichTextBox as an ocx in VB6.
Some years ago, there was an automatically wrapper tool (or at least a helper), the Microsoft.InteropFormTools.
Somebody even developed if further for VS2019:
https://github.com/hurcane/Microsoft.InteropFormTools.InteropFormProxyGenerator
I managed to compile it.
It now shows up in VS2019:
But I do not see any template or how to go on:
There is no template.
I have posted this question in the github project, but I am afraid it's dead.
Thank you for any help!

Get VB code from published file? [duplicate]

This question already has answers here:
Extract VB.NET code from exe file
(6 answers)
Closed 6 years ago.
I published a vb program but then I edited the code and saved it but the code does not work. I need to get the code back from the published application but I am not sure how. Please help.
The files are I can find are:
name.exe.config.deploy
name.exe.deploy
name.exe.manifest
You must search for a .Net Reflector app
ILSpy
dotPeek
JustDecompile
DisSharper
Mono Cecil
Kaliro
Dotnet IL Editor (DILE)
Common Compiler Infrastructure
Red Gate Reflector

WFA won't open on other computers

I recently programmed a Windows Form Application on one laptop, however, when I attempt to run the executable on my client's PC it won't open. There are no error messages generated, it just won't open.
The only thing in use that wasn't built into VS2015 was Telerik UI for winforms and the application is a standalone exe.
Any suggestions?
I finally got this sorted a couple of days ago. After a LOT of fiddling about I realised that it was indeed to do with the references. After consulting the Telerik Documentation (as Chris suggested) I realised that, indeed, the dlls were stored in the GAC (something I'd never heard of) and not actually automatically packaged with the software. So I editted the program file options so that they were included and problem solved! Thank You all for your help and sorry the original question was so badly written, I had no idea what data it would have been relevant to include

Visual Studio Winforms App Cannot See Reference on Build/Rebuild [duplicate]

This question already has answers here:
Visual Studio 2010 suddenly can't see namespace?
(7 answers)
Closed 8 years ago.
This should be a simple one... but it confounds me. I am trying to test a third-party assembly using a very simple winforms app. I add a reference to it in the project. I then add an Imports (this is VB.Net) statement. I continue on to call a method in a static class within the assembly within Form1_Load. All of this is almost too much information...
Before attempting to build the solution the imports statement is fine. The call to the method is fine (and by fine I mean visual studio "sees them." When I build the solution it throws the error "'[NAMESPACE]' is not declared. It may be inaccessible due to its protection level."
I have tried removing the assembly to a more public directory. In the reference properties copy local is true.
Any ideas? I am at my wits-end over this silly problem.
I figured this out. By default my projects were targeting Framework 4 Client Profile" If I switched to the regular Framework 4... it works fine :-)

C# Visual Studio: How to have multiple developers on a solution that references Office?

When I add a reference to Office COM Library, I to go:
References
Add Reference
Select the COM tab
Select Microsoft Office 12.0 Object Library
And magically named reference appears:
Microsoft.Office.Core
The Project.csproj file shows the details of the reference:
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>4</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
i check the project into source control, and now nobody else can build the solution; they do not have Office 12, they only have Office 11.
Another guy checks out the .csproj file, deletes the reference to:
Microsoft Office 12.0 Object Library
and re-adds the COM reference as:
Microsoft Office 11.0 Object Library
After that, and new reference appears in the Solution:
Microsoft.Office.Core
and the Project.csproj file shows the details of the reference:
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>3</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
Note: Readers who read the question will understand the problem. It's the same type library, but version 2.3 as opposed to version 2.4.
The project is then checked into source control, and now developers with Office 2007 (and Office 2000 for that matter) cannot build it, because Visual Studio cannot resolve the reference to:
{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}\2.3\0\primary
We obviously need a version independant way to reference Office.
How do we reference the version of Office that the developer building it on his machine has intsalled?
How do we have multiple developers work on a solution that references Office?
Note: This question is identical to, but fundamentally different from, another Stackoverflow question How to use Office from Visual Studio C#?
That question deals with the entire set of problems from trying to use Office from Visual Studio. This question only focuses on one specific problem.
Abstract your code so that ALL of the code that touches Office is in a separate project. Then you can have two projects - one for Office 11 and one for Office 12. Then reference both projects from your application. If the classes both implement a common interface, then you can use a factory pattern to instantiate the appropriate one and use the features without having to recompile.
You might be able to use late binding for this.
Have a look here: http://www.hanselman.com/blog/BackToBasicsVarDim.aspx
or here: http://support.microsoft.com/kb/302902
late bind to whichever type library is present, and code against the older interfaces - if youre using the v11 interfaces, you should be ok when you ve got v12 on a machine.
If you abstract the interface to a separate project you can then then use vb.net and its built in late binding support to provide the functionality and manage resources.