홀덤사이트Paris Sportif CryptoTous Les Sites De Paris Sportifs BelgiqueMeilleur Casino En Ligne BelgiqueCasino Sans Documents
Visio C# Automation Samples with NuGet  
Thursday, June 21, 2012 at 9:25AM
saveenr

Because I have been seeing the occasional requests for C# sample code (via sites like StackOverflow), this week I explored how we can use NuGet to make live much simpler. So I've published a new NuGet package called VisioCSharpSamples.

WALKTHROUGH

First, install NuGet: http://nuget.org/ 

Second, create an simple C# project in Visual Studio 2010 or Visual Studio 2012. The screenshots below show Visual Studio 2012 RC. In this case, let's pick a simple console application.

If you examine the Solution Explorer, you'll see the expected result.

Snap034

Now select Tools > Library Package Manager > Package Manager Console

Snap035

One the console loads, ensure that the Package source is pointing to the official NuGet feed

Snap036

 

Then type in the following:

Install-Package VisioCSharpSamples

You'll see that the latest version of the samples is installed

Snap037

Let's look at the Solution Explorer to confirm what happened.

Snap038

 

Notice that a reference to Microsoft.Office.Interop.Visio was added.

Also, there is a folder called VisioCSharpSamples that contains several C# code files.

Currently, there's a static class called Samples that contains some static methods. The simplest is called HelloWorld found in the HelloWorld.cs file.

Snap039

Of course, you can now simply call HellWorld() from your program and quickly get started transforming this hello world into something more complex.

QUICK SUMMARY

 

 

 

 

Article originally appeared on viziblr (http://viziblr.com/).
See website for complete article licensing information.

Other interesting websites