Visual Studio template using .NET Core + Fabric React for Office Add-ins

Microsoft 365 Developer · Intermediate ·🏗️ Systems Design & Architecture ·6y ago

Key Takeaways

This video demonstrates how to use a Visual Studio template to build a .NET Core Office Add-in with Fabric React, leveraging the latest tools and frameworks for modern Office Add-in development.

Full Transcript

[Music] I'm Silvio Quora I'm a program manager on the office add-ins developer experience team and I'm here to talk to you about modernizing the visual studio templates so taking a step back the goal of the developer experience team is to help developers be successful building office add-ins using modern tools and frameworks now that doesn't mean that we will support all frameworks in existence we've tried this we tried it a couple years ago we had samples across the different frameworks available and we noticed that a year later they were out of day and there we just didn't have the bandwidth to keep up with all the different frameworks so we've pivoted a little bit and we decided that we will start by going deep on a few of the frameworks that we'll reach and impact the most amount of people so what does that mean for visual studio and visual studio today we support net framework and fabric j/s we will continue to support that because I think that's one of our core scenarios now what we're looking into you is how do we fit into the dotnet core story so if you're a.net developer you're aware that there's been a lot of buzz around dotnet core and so we took a step back and said okay what's our story here how do you start building off of the momentum so we've kind of put together and what I'll be demoing today is a template that leverages dotnet core and fabric reacts and our goal is that this is kind of the first step in in modernizing our visual studio templates and supporting more developers who are in visual studio it is a journey so we would love your feedback we would love you to get involved in the discussion and help make sure make sure that we're going after the right frameworks and building the right experience for you but today we are starting with this we are starting with dotnet core and fabric react so I will hop right into demo actually so today this sample is in our PMP repo it's live today so you can go and try it after the call or whatever works for you there are a few prerequisites the first is Visual Studio 2019 you can be an update 3 or newer so if you're in the preview version of Visual Studio you're fine if you are in the non preview version make sure that you have update 3 and then you need to have the following components installed so you need the dotnet component the node.js component office and SharePoint as well as the net core 2.2 runtime once you have those and nodejs installed on your machine getting started is pretty much similar to how you get started with add-ins today you're going to open visual studio click create new project search Excel and then make sure that you're creating the web add in not the VST Oh at it you from here you can call it whatever you want and that make sure you select add new functionalities to excel not the insert content into spreadsheet so that will start creating the template and then to add dotnet core and fabric react you actually need to clone the PNP repo and so if you open a command prompt go to where you want to create your project and then type then git clone and the URL and that will download the the project onto your local drive and you want to make sure that you download it onto the same local drive that Visual Studio created your project so for me it's easy I only have one drive they all get downloaded to the same place but if you're using multiple drives like a C Drive and a D Drive make sure that you're installing both projects to the same place so all right my add-in has been created so from here this is the original atom that is in visual studio today to add the dotnet Korn react piece you want to right-click the solution go down to add and then add existing project then you want to navigate to where you downloaded the pnp repo so for me it was in downloads you can see it right here I'd go to samples here's the dotnet core react choose the language that you are more comfortable with I'm comfortable with typescript so I'm going to choose that and then I'm gonna go ahead and include the project you can see the project was included here I'm actually gonna go ahead and build this now so it can be installed and then be integrated with the original add-in and actually I will pause right here just to call out something that you may notice so this is the original web atom project you can see the structure here below the new dotnet core react has a slightly different structure and so where you'll find the code is in this client app folder if you expand public you'll see the task pane styling as well as the tasks pane code and then in source you will see the index that's the SX file and in components you'll see the app dot CSX file and this is where most of your JavaScript code will end up going so you can see the default we always changed the color of the range to yellow and so that code lives in the App tsx all right so I think my project has finished building and double-check yes that looks right so what you're gonna do next is you're going to link both your dotnet corn react template and your added manifest so to do that you want to go to excel web add in five or whatever your project was called and you'll see down here in the properties pane web project so here you want to change this to your dotnet core and react template you want to associate yes we do we want to link the two together and that will update the manifest and do a couple other linkings then the final step in this to link the two projects is to go into your manifest copy this ID and then you want to update the manifest in your SP dotnet core templates so if I go here you can see the same ID make sure you change that and then you're actually going to take this whole manifest and replace your old one let me flip back one more time here we go just control a replace the whole thing save and that is the last step but your atom should now be a dotnet core and react atoms so to watch it I'm just gonna go ahead and hit f5 here we go and you see Excel is gonna load it's loading the add-ins we're still working on some of the performance here now using dotnet core and how do we optimize this to be as fast as the previous templates so that is something that we're aware of and are continuing to work on so I'll just give it a second Erica's awesome okay so adding loaded successfully you'll see the show task pane button again we're aware of the performance there's something I'm still working on but awesome cool it loaded I select a range here I hit run it changes to yellow if I go back to visual studio to my solution Explorer and my Oh app dot TSX file yeah I can actually change this to you let's say wand you clean go ahead and do that open Excel again open Excel again change and you can see it's up to date and this is using that's pretty much it this is using.net core and and react is you still get the same functionality with office j s there are a few extra steps because this is still in preview and something that we wanted to test out and make sure that it's a project type that people would want and use and ah see this is where you guys come in so let me switch back to the presentation here ok it so like I mentioned in the beginning this is a journey this is a conversation we would love your feedback and love for you to get involved if you're a.net developer and have opinions or things that you want to see in the experience please come talk to us and so these are kind of our two action items go try out the dotnet core and react template that's in the PNP repo let us know your thoughts let us know what you think and how it works for you and then if you have additional opinions or additional feedback that you want to give us sign up for an interview and come come talk to us about how you use dotnet with office add-ins and what you expect to see and what we what you would like to see from a platform that's pretty much it for me [Music]

Original Description

This demo is taken from the Office Add-ins community call from February 12, 2020. In the demo, Sylvia Okafor, Program Manager takes you through a step-by-step process using a Visual Studio template that leverages .NET Core and Fabric React. Yuu can build a .NET Core Office Add-in and leave feedback in the Git repo: https://aka.ms/Office.NETCoreReactAddins AND Sign up for an interview on .NET support for Office Add-ins: https://calendly.com/officeaddinsdevx/aspnetsupport For more demos and full community call recordings, visit https://aka.ms/M365DevYouTube
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Microsoft 365 Developer · Microsoft 365 Developer · 0 of 60

← Previous Next →
1 Adaptive Cards community call-February 2019
Adaptive Cards community call-February 2019
Microsoft 365 Developer
2 PowerApps community call-February 2019
PowerApps community call-February 2019
Microsoft 365 Developer
3 Microsoft Graph community call-March 2019
Microsoft Graph community call-March 2019
Microsoft 365 Developer
4 Office Add ins community call-March 2019
Office Add ins community call-March 2019
Microsoft 365 Developer
5 PowerApps community call-March 2019
PowerApps community call-March 2019
Microsoft 365 Developer
6 Microsoft Teams community call-March 2019
Microsoft Teams community call-March 2019
Microsoft 365 Developer
7 Using React and Office UI Fabric React Components
Using React and Office UI Fabric React Components
Microsoft 365 Developer
8 Build Microsoft Teams customization using SharePoint Framework
Build Microsoft Teams customization using SharePoint Framework
Microsoft 365 Developer
9 Microsoft Graph community call-April 2019
Microsoft Graph community call-April 2019
Microsoft 365 Developer
10 Using Change Notifications and Track Changes with Microsoft Graph
Using Change Notifications and Track Changes with Microsoft Graph
Microsoft 365 Developer
11 Office Add Ins community call-April 2019
Office Add Ins community call-April 2019
Microsoft 365 Developer
12 Adaptive Cards community call-April 2019
Adaptive Cards community call-April 2019
Microsoft 365 Developer
13 Microsoft Teams community call-April 2019
Microsoft Teams community call-April 2019
Microsoft 365 Developer
14 Getting Started with Microsoft Graph and Application Registration
Getting Started with Microsoft Graph and Application Registration
Microsoft 365 Developer
15 Getting Started with Microsoft Graph and the Directory API
Getting Started with Microsoft Graph and the Directory API
Microsoft 365 Developer
16 Getting Started with Microsoft Graph and Microsoft Teams
Getting Started with Microsoft Graph and Microsoft Teams
Microsoft 365 Developer
17 Getting Started with Microsoft Graph Explorer
Getting Started with Microsoft Graph Explorer
Microsoft 365 Developer
18 Getting Started with Microsoft Graph
Getting Started with Microsoft Graph
Microsoft 365 Developer
19 Getting Started with Microsoft Graph and Mail API
Getting Started with Microsoft Graph and Mail API
Microsoft 365 Developer
20 Getting Started with Microsoft Graph and Office 365 Groups
Getting Started with Microsoft Graph and Office 365 Groups
Microsoft 365 Developer
21 Getting Started with Microsoft Graph and the Calendar API
Getting Started with Microsoft Graph and the Calendar API
Microsoft 365 Developer
22 Getting Started with the Microsoft Graph Toolkit
Getting Started with the Microsoft Graph Toolkit
Microsoft 365 Developer
23 Getting Started with Microsoft Graph and JavaScript SDKs
Getting Started with Microsoft Graph and JavaScript SDKs
Microsoft 365 Developer
24 Getting Started with Microsoft Graph and .NET SDKs
Getting Started with Microsoft Graph and .NET SDKs
Microsoft 365 Developer
25 Discover how businesses can be more productive with Microsoft 365 integrations
Discover how businesses can be more productive with Microsoft 365 integrations
Microsoft 365 Developer
26 Adaptive Cards community call-May 2019
Adaptive Cards community call-May 2019
Microsoft 365 Developer
27 Office Add-ins community call-May 2019
Office Add-ins community call-May 2019
Microsoft 365 Developer
28 Why We Built on Microsoft Teams
Why We Built on Microsoft Teams
Microsoft 365 Developer
29 Microsoft Teams community call-May 2019
Microsoft Teams community call-May 2019
Microsoft 365 Developer
30 Microsoft Graph community call-June 2019
Microsoft Graph community call-June 2019
Microsoft 365 Developer
31 Build Angular SPA's with Microsoft Graph - June 2019
Build Angular SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
32 Office Add -ins community call-June 2019
Office Add -ins community call-June 2019
Microsoft 365 Developer
33 Build Android native apps with the Microsoft Graph Android SDK - June 2019
Build Android native apps with the Microsoft Graph Android SDK - June 2019
Microsoft 365 Developer
34 Build MVC apps with Microsoft Graph - June 2019
Build MVC apps with Microsoft Graph - June 2019
Microsoft 365 Developer
35 Authenticate and connect with Microsoft Graph - June 2019
Authenticate and connect with Microsoft Graph - June 2019
Microsoft 365 Developer
36 Microsoft Graph data connect - June 2019
Microsoft Graph data connect - June 2019
Microsoft 365 Developer
37 Change notifications with Microsoft Graph - June 2019
Change notifications with Microsoft Graph - June 2019
Microsoft 365 Developer
38 Build iOS native apps with the Microsoft Graph REST API - June 2019
Build iOS native apps with the Microsoft Graph REST API - June 2019
Microsoft 365 Developer
39 Build Node.js Express apps with Microsoft Graph - June 2019
Build Node.js Express apps with Microsoft Graph - June 2019
Microsoft 365 Developer
40 Smart UI with Microsoft Graph - June 2019
Smart UI with Microsoft Graph - June 2019
Microsoft 365 Developer
41 Leveraging the Microsoft Graph API from the SharePoint Framework - June 2019
Leveraging the Microsoft Graph API from the SharePoint Framework - June 2019
Microsoft 365 Developer
42 Build UWP apps with Microsoft Graph - June 2019
Build UWP apps with Microsoft Graph - June 2019
Microsoft 365 Developer
43 Build React SPA's with Microsoft Graph - June 2019
Build React SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
44 Getting Started with Microsoft Graph and Batching
Getting Started with Microsoft Graph and Batching
Microsoft 365 Developer
45 Getting Started with Microsoft Graph and Change Notifications
Getting Started with Microsoft Graph and Change Notifications
Microsoft 365 Developer
46 Getting Started with Microsoft Graph and Consent Permissions
Getting Started with Microsoft Graph and Consent Permissions
Microsoft 365 Developer
47 Getting Started with Microsoft Graph and Education
Getting Started with Microsoft Graph and Education
Microsoft 365 Developer
48 Getting Started with Microsoft Graph and Financials
Getting Started with Microsoft Graph and Financials
Microsoft 365 Developer
49 Getting Started with Microsoft Graph and Excel
Getting Started with Microsoft Graph and Excel
Microsoft 365 Developer
50 Getting Started with Microsoft Graph and Data Connect
Getting Started with Microsoft Graph and Data Connect
Microsoft 365 Developer
51 Getting Started with Microsoft Graph and Intune
Getting Started with Microsoft Graph and Intune
Microsoft 365 Developer
52 Getting Started with Microsoft Graph and Notifications
Getting Started with Microsoft Graph and Notifications
Microsoft 365 Developer
53 Getting Started with Microsoft Graph and OneNote
Getting Started with Microsoft Graph and OneNote
Microsoft 365 Developer
54 Getting Started with Microsoft Graph and OneDrive
Getting Started with Microsoft Graph and OneDrive
Microsoft 365 Developer
55 Getting Started with Microsoft Graph and Open Extensions
Getting Started with Microsoft Graph and Open Extensions
Microsoft 365 Developer
56 Getting Started with Microsoft Graph and Paging
Getting Started with Microsoft Graph and Paging
Microsoft 365 Developer
57 Getting Started with Microsoft Graph and Schema Extensions
Getting Started with Microsoft Graph and Schema Extensions
Microsoft 365 Developer
58 Getting Started with Microsoft Graph and Security API
Getting Started with Microsoft Graph and Security API
Microsoft 365 Developer
59 Getting Started with Microsoft Graph and Query Parameters
Getting Started with Microsoft Graph and Query Parameters
Microsoft 365 Developer
60 Getting Started with Microsoft Graph and Reporting API
Getting Started with Microsoft Graph and Reporting API
Microsoft 365 Developer

This video teaches how to build a .NET Core Office Add-in with Fabric React using a Visual Studio template, and demonstrates the steps to create and configure the project.

Key Takeaways
  1. Create a new project in Visual Studio using the Excel web add-in template
  2. Install the required components, including .NET Core and Node.js
  3. Clone the PnP repo and add the .NET Core and React project to the solution
  4. Build and link the .NET Core and React project to the Office Add-in manifest
  5. Test and deploy the Office Add-in
💡 The video demonstrates how to leverage the latest tools and frameworks, including .NET Core and React, to build modern Office Add-ins, and highlights the importance of testing and feedback in the development process.

Related Reads

📰
Platform Team Topology and Operating Models
Learn about platform team topology and operating models to improve your organization's efficiency and scalability
Medium · DevOps
📰
MCP Series (08): Enterprise Governance — Registry, Routing, and Observability
Learn to implement enterprise governance in MCP series with registry, routing, and observability to manage multiple servers efficiently
Dev.to · WonderLab
📰
Where is the hosts file on Mac, Windows, and Linux?
Learn the location of the hosts file on Mac, Windows, and Linux to edit and configure network settings
Dev.to · Locahl
📰
Presentation: The Rust High Performance Talk You Did Not Expect
Learn how Rust's performance capabilities and compile-time safety can improve delivery velocity and reduce engineering overhead in high-performance caching services
InfoQ AI/ML
Up next
Forget Fable 5: Build Your SaaS with Opus 4.8! #shorts
Income stream surfers
Watch →