Visual Studio – Pro Tip – Track Active Item in Solution Explorer

Visual Studio Pro Tip

Every time I’m on a new installation of Visual Studio or a new VM (I often quickly ‘generate’ a new VM in order to test things in a clean environment) the first thing I run into is that I just don’t know what’s the file I’m working on and do be more specific, where the file lives in the folder structure of the solution.

Visual Studio has a solution for this, ever since Visual Studio 2005, and it is called Track Active Item in Solution Explorer.

You can find the option in Visual Studio 2017 by going into Tools->Options and search for Solution Explorer. This will give you a couple of entries, now select General under Projects and Solutions and there you have it:

VSTrackActiveItem

You also can go to it directly by going into Tools->Options->Projects and Solutions->General.

If you think this s*cks, just turn it off by unchecking the checkbox before “Track Active Item in Solution Explorer”.

I prefer to check the option to enable it so each time I select a file in one of the tabs, Visual Studio will jump to the location where it is kept in the Solution Explorer!

Advertisements

Office Development – Word Add-in in Visual Studio ‘in action’

Yesterday in my blogpost I showed you the instructions to perform to create your first Word Add-in not by command line tools like I showed earlier, but by using Visual Studio 2017. So here it is:

Boot up your Visual Studio IDE and select File, new Project. In the New Project Dialog select on the left hand of the dialog the tree item Add-ins under the Office/SharePoint node. On the right hand you get options to build Add-ins for Excel, Word, Outlook, PowerPoint and SharePoint.

 FirstVSAddin01

They still call it Web Add-in, if you ask me this name is a bit outdated. I believe the Add-ins are called just Office Add-ins (with the capital A). There was a time these things were called “Apps for Office”. The name used today on the http://dev.office.com website is:

Apps for Office

Where were we? …. Oh, yes … Creating a new project. Name your new project any name you would like to give it, I opted for MyFirstWordAddin. Change the folder if you want to store it somewhere else other than the default project output path and click OK to start creating your project. If all goes well you’ll see the following ‘progress’ bar appearing on your screen.

FirstVSAddin02

It takes a couple of minutes to finish, but when it does it will open a code window like this:

FirstVSAddin03

And another tab was created to show you some helpful links to continue:

FirstVSAddin04

Now it is time to hit F5, the “Visual Studio Compile-Run-Debug Experience”. As we have seen ancient times ago the Office Dev team really tried to hide all the difficult stuff for you and it will create for you the security context to be able to actually run the Word Add-in without going through the hassle I described in other posts creating the Add-in using the command line tools like Yeomen.

The only dialog might get to see in between is this one:

Cert1

A one time only trust entry for your self-signed Localhost certificate. You’ll notice if you create a second project this dialog won’t show again as you already trusted it for your first project. Click Yes otherwise your Add-in won’t be trusted to run. It will create the security context and an instance of Word is created and installed the just created Add-in.

On the top right hand in the Ribbon in the Home Tab a button appears in the Commands Group with some easy instructions. You’ve seen as similar button and instructions on the command line Add-in we created a while ago.

FirstVSAddin05

Click the button to have the Task pane appearing on the right hand. The sample Task pane wants you to select a couple of words in the document and if you press the Highlight button it will calculate the word with the most characters and highlights the word.

FirstVSAddin06

That is all there is to it … no fancy pansy difficult stuff to get around creating certificates and trusting the certificates. It is all done for you by the Visual Studio tooling. Impressive!

Beware however, you are not ready for production – just like the command line Add-in tools, the certificate is self signed, you are not running the ‘ web app’ in a shared (public) location to be able to access from anywhere and anytime. It is still ‘demo-ware’. Hopefully over time we will reach the golden moment of creating ‘production-ware’ Smile

To be continued …

 

 

 

Office Development – Word Add-in – Using Visual Studio

Office Development - Visual Studio

A while ago, not too long, I showed you how to start developing your Word Add-in from scratch using nothing but command line tools. Check my blog archives for the last couple of weeks if you missed that. Today we are looking at the same process but now using Visual Studio.

Where to begin? According to the page: https://dev.office.com/getting-started/addins going through the process of steps you select Word as Add-in host, and Visual Studio as tools to build your Add-in will finally show you the following screen:

image

It is already hopelessly outdated, mentioning to install the Office Developer Tools for Visual Studio 2013 or 2015 while Visual Studio 2017 has been around for quite some time.

The process however is still unchanged for the most part, I will show it in practice in a later blog, but if you follow the three steps you are basically already there, where without Visual Studio and just using the command line tools we had to go through a large series of requirements and certificate fixes to make that work.

Apparently Visual Studio takes a lot of this out of your hands and is doing all that for you. Not completely fair, because with Visual Studio you also need to go through the installation process. I want to find out what this all is and put that in a blog post as well

To be continued …

Week 7 SDN Cast News and Party Time!

SDNCast 40

It’s party time! There was even more than one party, a lot to celebrate this week! Obviously, starting with our own fortieth SDN Cast and that’s a number worth mentioning.

But there is more. In 1997, twenty years ago now, Visual Studio was released and this week there was announced that the upcoming version “Visual Studio 2017” will be released starting March 7th in an online event by Microsoft and local events will be organized at various locations around the world between March 7 and April 30th. Look for it in the links below to see if there are any events in your area to go to. We will obviously spend some attention as well on our next SDN Event – March 17, with some sessions in this area.

And we’re not there yet, five years after the first release of Visual Studio Microsoft changed direction by releasing Visual Studio .NET and as the name reveals, birth of .NET. The new way of programming with the new .NET framework. Until that time everyone was working with MFC -Microsoft Foundation Classes- libraries or other technologies. There was a big change in the way we were going to develop and brought many new features, think of the Roslyn language services. This allowed all sorts of new benefits where we haven’t seen the end of it.

A lot of attention for the past, but there is a lot of interesting new stuff to come in the near future. We are looking forward to the release of Visual Studio 2017.

Where can you find SDN Cast 40?
https://youtu.be/zL3CIJTK2sk

Subscribe to our YouTube channel so you won’t miss a single episode. Usually we are broadcasting live on Thursday evening 8PM GMT+1 in the winter but it might change depending on how things go that week. If you want to be sure you better subscribe to our channel on YouTube or go to http://www.sdncast.nl to discover when our next show will be planned. It will show you when the next show is starting.

News of the week

Visual Studio 2017 is coming on March 7
https://launch.visualstudio.com/
https://launch.visualstudio.com/local-events/

TFS 2017 Update 1 RC2
https://blogs.msdn.microsoft.com/bharry/2017/02/13/tfs-2017-update-1-rc2/

Join Us: Visual Studio 2017 Launch Event and 20th Anniversary
https://blogs.msdn.microsoft.com/visualstudio/2017/02/09/visual-studio-2017-launch-event-and-20th-anniversary/

E3 Now open to public, anyone can register 
https://www.e3expo.com/show-info/3197/access-has-been-granted/

Microsoft shares open source system for training drones, other gadgets to move safely on their own

https://blogs.microsoft.com/next/2017/02/15/microsoft-shares-open-source-system-training-drones-gadgets-move-safely

Microsoft cloud services will be compliant with new General Data Protection Regulation for EU when it takes effect in 2018

https://blogs.microsoft.com/on-the-issues/2017/02/15/get-gdpr-compliant-with-the-microsoft-cloud

Announcing UWP Community Toolkit 1.3

https://blogs.windows.com/buildingapps/2017/02/10/announcing-uwp-community-toolkit-1-3

Rider Early Access Program
https://www.jetbrains.com/rider/download/

Building Single Page Applications on ASP.NET Core with JavaScriptServices
https://blogs.msdn.microsoft.com/webdev/2017/02/14/building-single-page-applications-on-asp-net-core-with-javascriptservices/

Welcoming Jon Galloway as the new Executive Director of the .NET Foundation
https://dotnetfoundation.org/blog/welcoming-jon-galloway-as-the-new-executive-director-of-the-net-foundation

Happy 15th Birthday .NET!
https://blogs.msdn.microsoft.com/dotnet/2017/02/13/happy-15th-birthday-net/

Events

Upcoming events

Visual Studio 2017 Launch, March 7-8 – Online
https://launch.visualstudio.com/

Visual Studio 2017 Local Events, March 7 – April 30th
https://launch.visualstudio.com/local-events/

SDN Event 1 – Zeist – March 17, 2017
https://www.sdn.nl/EVENTS/17-maart-2017
You can already register, so put it in your scheduler and register!

Microsoft Tech Summit – Amsterdam, March 23-24, 2017
https://www.microsoft.com/en-us/techsummit
https://www.microsoft.com/nl-nl/techsummit/amsterdam.aspx

Build – May 10-12, 2017 – Seattle
http://build.microsoft.com

Techorama – May 22-24, 2017 – Antwerpen, Belgium
http://techorama.be/

NDC Oslo – June 12-16 2017 – Oslo
http://ndcoslo.com

SDN Event 2 – Zeist – June 23, 2017
www.sdn.nl

Ignite 2017 – September 25-29 – Orlando
https://ignite.microsoft.com

SDN Event 3 – Zeist – October 6
www.sdn.nl

We hope you like to watch our SDN Casts. We try to keep up with the news in about an hour a week. You hear what is new and get fun demos on technology and Software Development that you can use in your daily job.

Don’t forget to Subscribe to our channel as we can get a better URL to remember our channel if we reach the number of subscribers needed to add this and make your and our lives a bit easier! And if you haven’t heard if you are the number 100 Subscriber you get something in return! Subscribe: https://www.youtube.com/channel/UC3oE_YPB4AJVQSInC-yy3pw?sub_confirmation=1

Go to the website and check when our next broadcast will be!
http://www.sdncast.nl.

%d bloggers like this: