-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebView2 in WPF VSTO Addin does not load #505
Comments
Have you checked out the other VSTO issues? In particular: Was WebView2 working in your VSTO before docking it in the UserControl? I also noticed you are using the Source property rather than EnsureCoreWebView2Async. That does implicit initialization and will create a default UserDataFolder where the code lives, which will be in C:\Program Files... and the Runtime won't have write permissions, so will fail. You need to specify a UserDataFolder somewhere else, using EnsureCoreWebView2Async, or CoreWebView2CreationProperties with Source property. |
Thanks @champnic Appreciate the quick response. Certainly, this worked for me:
Wondering about what should be the workaround while deploying to Production? |
This isn't a workaround per se, it's just a necessary part of writing the VSTO with WebView2. That said, you should probably pick a different location for the UserDataFolder (besides C:\temp) before deploying to production, to make it less accessible and unique to your VSTO. Potentially somewhere in the AppData folder? |
I'm going to close this issue. If you'd like me to reopen please let me know with extra details, or open a new issue if you run into something else. Thanks! |
Hey @abhinovpankaj - what is the error you get when trying the "C:\temp" folder? |
webview just wont display the page. |
@abhinovpankaj do you have a sample app you would be able to share that reproduces this issue? Thanks! |
https://github.com/point5nyble/OutlookPopup Git repo with the source code. it's an Outlook Add-on project. It's the withLicensing__ branch . Thanks |
Did you get chance to check on this? |
Environment: Visual Studio 2017 Community
NuGet: Microsoft.Web.WebView2, 0.9.628-prerelease
Net Framework: 4.6.2
Project type: VSTO Outlook Addin
Reference: https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/wpf
WebView2 does not load any URL inside the control while docked in UserControl of VSTO Addin project
XAML page:
XAML.cs page:
Addin.cs page:
Outlook Custom Task Pane view:
Can someone look into this issue?
Thanks
The text was updated successfully, but these errors were encountered: