You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# ASP.NET Core, React.js and Office UI Fabric React sample task pane web projects for Visual Studio 2019
1
+
# ASP.NET Core, React.js and Office UI Fabric React sample task pane web projects for Visual Studio 2019
2
2
3
-
This sample shows how to add Office UI Fabric React to an Excel Web Add-in project in Visual Studio 2019. You can build great cross-platform UI using the style and controls of Office UI Fabric React. This sample uses [React.js](https://reactjs.org/), [Office UI Fabric React](https://github.com/OfficeDev/office-ui-fabric-react), and the [React project template with ASP.NET Core](https://docs.microsoft.com/aspnet/core/client-side/spa/react). The template is equivalent to creating both an ASP.NET Core project and a standard create-react-app (CRA) React project to act as a UI, but with the convenience of hosting both in a single app project that you can build and publish as a single unit. To develop an add-in from the template, you can either add a Web API to the ASP.NET Core project or you can develop the project as a single-page React add-in. Since the project uses React as the UI, you should not attempt to use UI features of ASP.NET Core.
3
+
This sample shows how to add Office UI Fabric React to an Excel Web Add-in project in Visual Studio 2019. You can build great cross-platform UI using the style and controls of Office UI Fabric React. This sample uses [React.js](https://reactjs.org/), [Office UI Fabric React](https://github.com/OfficeDev/office-ui-fabric-react), and the [React project template with ASP.NET Core](https://docs.microsoft.com/aspnet/core/client-side/spa/react). The template is equivalent to creating both an ASP.NET Core project and a standard create-react-app (CRA) React project to act as a UI, but with the convenience of hosting both in a single app project that you can build and publish as a single unit. To develop an add-in from the template, you can either add a Web API to the ASP.NET Core project or you can develop the project as a single-page React add-in. Since the project uses React as the UI, you should not attempt to use UI features of ASP.NET Core.
4
4
5
-
We'd like to hear about your experience with this sample and using ASP.NET Core with Office UI Fabric React and Office Add-ins. Just submit a new issue in this repo to let us know if you have any questions or suggestions.
5
+
We'd like to hear about your experience with this sample and using ASP.NET Core with Office UI Fabric React and Office Add-ins. Just submit a new issue in this repo to let us know if you have any questions or suggestions.
6
6
7
7
## Sample Web Projects
8
8
@@ -11,39 +11,40 @@ We'd like to hear about your experience with this sample and using ASP.NET Core
11
11
12
12
## Applies to
13
13
14
-
-Office 365
14
+
-Microsoft 365
15
15
- Visual Studio 2019
16
16
17
17
## Prerequisites
18
18
19
19
- Visual Studio 2019 (16.3 Preview 3 or newer) and the following Workloads and Optional Components installed:
20
+
20
21
- ASP.NET and web development
21
22
- Node.js development
22
23
- Office/SharePoint development
23
-
- Net Core 2.2 Runtime (individual component)
24
+
- Net Core 3.1 Runtime (individual component)
24
25
25
26
- Node.js, install from https://nodejs.org
26
27
27
-
>**Note:** Visual Studio 2019 can be downloaded from https://visualstudio.microsoft.com/downloads/
28
+
>**Note:** Visual Studio 2019 can be downloaded from https://visualstudio.microsoft.com/downloads/
28
29
29
30
## Solution
30
31
31
-
Solution | Author(s)
32
-
---------|----------
33
-
Add ASP.NET Core with Office UI Fabric React to your Office Add-in | Microsoft
|Add ASP.NET Core with Office UI Fabric React to your Office Add-in | Microsoft|
34
35
35
36
## Instructions
36
37
37
38
### Create a new Office Web add-in project
38
39
39
40
1. Start Visual Studio 2019.
40
41
2. Choose **Create a new project**.
41
-
3. Type "Excel" into the search box at the top of the dialog.
42
+
3. Type "Excel" into the search box at the top of the dialog.
42
43
4. Choose the Excel Web Add-in template, then choose **Next**.
43
44
5. Give the new project a name on the **Configure your new project** page and use the default values for the remaining fields and then choose **Create**.
44
45
6. On the choose the add-in type page, select **Add new functionalities to Excel**. Then choose Finish.
45
46
46
-
### Add the ASP.NET Core React.js web project to the solution
47
+
### Add the ASP.NET Core React.js web project to the solution
47
48
48
49
1. Download or clone this repo. This will create a **PnP-OfficeAddins** folder.
49
50
2. In Visual Studio, right-click the solution in **Solution Explorer** and choose **Add > Existing Project**.
@@ -52,29 +53,30 @@ Add ASP .NET Core with Office UI Fabric React to your Office Add-in | Microsoft
52
53
5. Select the add-in project in Solution Explorer. It will have the name you gave the project when you created it and a Manifest entry under it (i.e. ExcelWebAddin1).
53
54
6. Press F4 to view the **Properties** window for the project (if it is not already visible).
54
55
7. Change the **Web Project** property to the name of ASP .NET Core web project you just added to the solution.
55
-
**Note:**: The ASP.NET Core web project must be on the same local drive as the Excel Web Add-in project.
56
+
**Note:**: The ASP.NET Core web project must be on the same local drive as the Excel Web Add-in project.
56
57
8. In the **Solution Explorer** open the manifest.xml file under the Office Add-in project (the project only contains a manifest file). Copy and save the <Id> that has the GUID for your project.
57
-
9. Copy the contents of the manifest.xml file in the ASP.NET Core project and replace all of the contents in the maninfest file in the Web Add-in project (i.e. ExcelWebAddin1Manifest.xml) with it.
58
+
9. Copy the contents of the manifest.xml file in the ASP.NET Core project and replace all of the contents in the manifest file in the Web Add-in project (i.e. ExcelWebAddin1Manifest.xml) with it.
58
59
10. Press F5 to debug the Office Web Add-in project.
59
60
60
-
> **Note:** npm install should run and install the packages prior to building the ASP.NET Core web project but you may need to watch the output window for errors. If errors occur, please try running npm install from the ./ClientApp folder.
61
+
> **Note:** npm install should run and install the packages prior to building the ASP.NET Core web project but you may need to watch the output window for errors. If errors occur, please try running npm install from the ./ClientApp folder.
61
62
62
63
## Known Issues
63
64
64
65
1. If you are using Visual Studio 2019 Update 3 on Windows 10 version 1903 or later and Office version 16.0.11424.10000 or later, there is a known issue that effects your ability to hit breakpoints in JavaScript files. For more information and instructions on how to work around this please see https://developercommunity.visualstudio.com/content/problem/740413/office-development-inconsistent-script-debugging-b.html
65
66
66
-
2. The ASP.NET Core web project must be on the same local drive as the Office Manifest project. If it is not you will see the error "Property value is not valid" when trying to switch the Web Project property.
67
+
2. The ASP.NET Core web project must be on the same local drive as the Office Manifest project. If it is not you will see the error "Property value is not valid" when trying to switch the Web Project property.
67
68
68
69
## Feedback
69
-
Fill out this form to let us know your experience with this sample: [Developing with the ASP.NET Core + Fabric React Office Add-in sample](https://forms.microsoft.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR9Kwcf15u95EqS7NUgPuo5xUN0dYSFdQNVhFRDBaMjI1SDNXNFlKSkFNMC4u)
70
70
71
+
Fill out this form to let us know your experience with this sample: [Developing with the ASP.NET Core + Fabric React Office Add-in sample](https://forms.microsoft.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR9Kwcf15u95EqS7NUgPuo5xUN0dYSFdQNVhFRDBaMjI1SDNXNFlKSkFNMC4u)
| 2.0 | May 14, 2020 | Upgraded from .NET Core 2.2 to 3.1 |
77
79
78
-
### Disclaimer ###
80
+
### Disclaimer
79
81
80
-
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
82
+
**THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
0 commit comments