Netoffice Hello World - c#

I used VSTO a couple of years ago with Visual Studio to do some nice little addins for outlook. But I can't justify the cost of VS to do some part time projects. As a result I have installed the free version of VS and downloaded a promising office addin tool called NetOffice.
I am ok at c# but can't find a hello world example that includes setting up the environment to work.
I have VS express installed but don't know what to do with the NetOffice assemblies etc to get a simple example working.
I looked through the documentation and found a reference to "Netoffice Developer Toolbox" which set up projects for people who are not using the full version of VS. That sounded like exactly what I was after so I downloaded that also.
When I run the app NetOffice.DeveloperToolbox.exe I get a lot of errors, it does eventually load but tabs are missing and nothing seems to work.
Start up error is:
An attempt was made to load an assembly from a network location which
would have caused the assembly to be sandboxed in previous versions of
the .NET Framework. This release of the .NET Framework does not enable
CAS policy by default, so this load may be dangerous. If this load is
not intended to sandbox the assembly, please enable the
loadFromRemoteSources switch. See
http://go.microsoft.com/fwlink/?LinkId=155569 for more information. |
NotSupportedException | Void .ctor()
Following the link in the error message takes you to a page that has this description:
If you were directed to this topic because of an error message in the
Visual Studio project error list or a build error, see How to: Use an
Assembly from the Web in Visual Studio.
I didn't know i was referencing anything in the web so don't know what to do next.
Can anyone tell me what I need to do to get NetOffice working or if they have found/written a tutorial to getting it sorted IE a hello world tutorial?
Thanks in advance for your help.

you try to start a .net assembly from a network location.
this is forbidden from net policies(normaly)
move the toolbox folder to your hd and everything is okay.
NetOffice contains examples/tutorials for each office product in the release package. you find a lot of example online too directly from the main page(netoffice.codeplex.com) anyway, NetOffice is a 1:1 wrapper, this means if you already know the office object model from VBA or PIA(VSTO), you are ready to use NetOffice(you can use existing PIA code in NetOffice).

Related

Rhino 6, rhcommon_c, rhinocommon.dll could not be loaded issue

I got some Release files from a .net solution in order to try it on two machines(Windows 11 and Windows 10) and the problem I am facing occurs when I try to run the exe file where I get this exception:
Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'rhcommon_c': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
So, I have been reading, trying, and similar for a couple of days, and still nothing. I have followed the official documentation steps(installing rhino 6 c++ SDK, templates in Visual studio, Visual Studio SDK, setting up a firewall, etc and besides that, I have installed Rhino 6) and still nothing.
Finally, I wanted to try the official sample app:
https://github.com/mcneel/rhino-developer-samples/tree/7/rhino.inside/dotnet/SampleHelloWorld
and I get the same exception.
Is there anything I am missing?
UPDATE ON rhinocommon.dll
Rhino common is composed of the following:
RhinoCommon.dll - This is a pure .NET DLL that plugins can reference and use to work with Rhino.
RhinoCommon.xml - This is an XML file that contains SDK documentation comments specific to RhinoCommon.dll. Programming development environments like Visual Studio and MonoDevelop use this XML file to display tooltips and other helpful information while the developer writes code.
rhcommon_c.dll and monomanager.rhp - These are C++ shared libraries compiled for specific target platforms (Win64 and macOS). These libraries are used by RhinoCommon, but should never be directly accessed by plugin developers.
All .NET plugins that ship with Rhino for Windows, including the Python interpreter, reference RhinoCommon and the term common is meant to be just that: an SDK that can be used across Rhino platforms.
so, basically, what should I do just in order to try out a release version of solution?

Error while building C# project in VS Community (Dependancies Exchange)

This is my first question here. I'm working on a Windows 8.1 with Visual Studio Community (Update 2). I'm building a small service in C# for my company that parses emails from an Exchange web service. In my solution, there are 2 projects: one built from scratch where I create the service and deal with emails, and the other one is a "Visual Studio Installer" that creates a small .exe to install the service with with all its dependencies.
The first project uses Microsoft.Exchange.WebServices.Auth and Microsoft.Exchange.WebServices libraries to communicate and parse emails from an exchange web service. These two dependencies are coming from NuGet. Both projects are built with the 4.5 .Net Framework. The installer has one main output which is the service project and has 4 dependencies:
Microsoft .NET Framwork.dll
Microsoft.Exchange.WebServices.Auth.dll
Microsoft.Exchange.WebServices.dll
System.net.HTTP.dll
The service works pretty well and I'm happy with it. I tried to update my code this week to see how I can write in the Windows journal. The issue is that since this week (30/05/2016) I can't regenerate my solution. I can build the first project (service one) and there are no issue but for the second one (installer), 4 warnings show up (both appear twice in DEBUG mode and 3 times in RELEASE mode):
WARNING: Unable to find dependency
'MICROSOFT.IDENTITYMODEL.EXTENSIONS' (Signature='69C3241E6F0468CA'
Version='2.0.0.0') of assembly
'Microsoft.Exchange.WebServices.Auth.dll'
WARNING: Unable to find dependency 'MICROSOFT.IDENTITYMODEL'
(Signature='31BF3856AD364E35' Version='3.5.0.0') of assembly
'Microsoft.Exchange.WebServices.Auth.dll'
These warnings explain the fact that the installer don't appear anymore in the DEBUG and RELEASE folder. I reverted the code I wrote and the error is the same. I also tried to create a new solution with the same project as 4.5 Framework basis and with an empty project but with the same dependencies I have the same warnings.
Do you guys have (had?) the same warnings?
I found a solution to my problem. My solution was saved directly on a remote hard drive. When I built the soution, .net framework was not found (my error). I re-create localy my solution and it works. Hope it will helps others.
Perhaps, I don't know why from one day to another .net was not found. Maybe Windows update has crashed during an update.

Building game playable on one machine but not another

I've built my first XNA game and when I go to the build folder and execute the exe it works fine, however when I send the game to a friend of mine, he is unable to play the game and it crashes on startup.
I've tested this on several machines, and they all seem to suffer from the same issue.
Is there something I need to do to get it builded correctly and working on other machines?
btw. I did make sure I copied over the content folder from the output directory too, so its not missing its contents.
Chances are you will need to make sure the other computers have both the .NET and XNA Framework's installed. If you do a quick search on Google, you should be able to find the packages that you need, depending on what versions of the runtime's you are using.
For example, here are links to the downloads for the .NET Compact Framework 3.5 and the XNA Framework 4.0.
Note that this may not be all the prerequisites that you need.
It would be nice if you could provide a more detailed description of what kind of crash it is :) Do they get some kind of error message?
Are you using any third party libraries in the build?
Also, the machines that should run the game will need the correct version of the .NET framework, as well as a more specific XNA framework install.
Have you tried letting the users install the XNA Framework Redistributable?
http://www.microsoft.com/download/en/details.aspx?id=20914
See if that fixes the crash :)
There's a good bet that the person doesn't have the right version of the .NET framework or the right version of the XNA redistributable.
My first thought is to try publishing your game with ClickOnce (full disclosure: that's a link to my site, but I think it's still relevant).
That makes it easy for both you and the people you share it with to get the right libraries to run your game. To clarify, the other person does not need to install Visual Studio, Visual C# Express, or XNA Game Studio. There's lightweight redistributable libraries that they need instead, which ClickOnce will figure out for you.
My second suggestion is that it is possible your machine is capable of handling the HiDef profile, while everyone else that you've shared your game with can only handle the Reach profile. If that's your problem, you can change it to build for the Reach profile and fix that problem. That's discussed here, half way through the tutorial: http://rbwhitaker.wikidot.com/xna-project-template
If neither of these suggestions help, please post any sort of stack trace or error message they're getting so that we can try to help you further.

debug tool for Windows Embedded Standard 7

I am building WES 7 OS by running our C# application to see which package I need to add to. Most of the time I can get enough information from the error by viewing the System Event. Then I can add right package to the Answer file to create the OS image. But sometime I cannot find enough information from the System Event Viewer.
Is there any tool (debugger?) I can use to trace which file\library\dll is missing which cause our application crash during the runtime? I cannot install Visual Studio on that testing machine.
thanks,
Dependency Walker is a fantastic tool for this: http://www.dependencywalker.com/
It used to be included with the SDK, but I'm not sure if it is anymore. In any case, I'm sure the one on the dependencywalker.com site is more up-to-date.

Unable to load dll error

i am working project in c# Visual studio 2009,i am using c++ dll in my project and also i call that dll through my function . In my system the project run successfully.but in other system not in single system more than system i checked it shows exception like unable to load dll. i am check that dll in dependency walker it shows msvcr71.dll is missing.how i get this.?i need better solution for this
The problem is that your native C++ DLL depends on the library msvcr71.dll. This is not part of the standard windows installed hence you must take some action to get it onto the target machine.
The simplest way to do this is to just copy the DLL around with your application. The following KB article covers this.
Documentation on msvcr71.dll
http://msdn.microsoft.com/en-us/library/abx4dbyh(VS.71).aspx
You're probably missing something in your installation of the SDK (or Visual Studio). I would recommend a Repair or Reinstall.
look on msdn for info about redistributables - this tell you what you need to install on a non dev box to make things work
This is not programming related. You are missing a dll file on your target system. Download and put in "windows/System32" and it should run.

Categories