<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using the WebViewer2 package - Version issues in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12941602#M3058</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;I have just built in 2025 support for my plugin and hit on a specific issue with running Microsoft.Web.WebView2.&amp;nbsp; Digging deeper into the problem and trying all sorts of "fixes" I found that there seems to be a version dependency (I know that as of 2023, AutoCAD is dependent on&amp;nbsp;Microsoft Edge WebView2 runtime being installed).&lt;BR /&gt;My 2024 version (.Net Framework) has worked all along but I've discovered ONLY if I have Microsoft.Web.WebView2 version 1.0.1020.30 installed.&amp;nbsp; If I install an older or newer version of Microsoft.Web.WebView2 then the plugin will complain that it cannot find 1.0.1020.30.&lt;BR /&gt;So, 2025 must have a similar issue as it gives a more generic error about a&amp;nbsp;Microsoft.Web.WebView2.Wpf dependencies not being found.&lt;BR /&gt;If this is the case, is it possible to override this and target any version in my plugin?&amp;nbsp; Or, alternatively, how can I determine what version of the runtime AutoCAD 2025 is targeting so I can target the same version?&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Aug 2024 08:34:24 GMT</pubDate>
    <dc:creator>grahamcook</dc:creator>
    <dc:date>2024-08-06T08:34:24Z</dc:date>
    <item>
      <title>Using the WebViewer2 package - Version issues</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12941602#M3058</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;I have just built in 2025 support for my plugin and hit on a specific issue with running Microsoft.Web.WebView2.&amp;nbsp; Digging deeper into the problem and trying all sorts of "fixes" I found that there seems to be a version dependency (I know that as of 2023, AutoCAD is dependent on&amp;nbsp;Microsoft Edge WebView2 runtime being installed).&lt;BR /&gt;My 2024 version (.Net Framework) has worked all along but I've discovered ONLY if I have Microsoft.Web.WebView2 version 1.0.1020.30 installed.&amp;nbsp; If I install an older or newer version of Microsoft.Web.WebView2 then the plugin will complain that it cannot find 1.0.1020.30.&lt;BR /&gt;So, 2025 must have a similar issue as it gives a more generic error about a&amp;nbsp;Microsoft.Web.WebView2.Wpf dependencies not being found.&lt;BR /&gt;If this is the case, is it possible to override this and target any version in my plugin?&amp;nbsp; Or, alternatively, how can I determine what version of the runtime AutoCAD 2025 is targeting so I can target the same version?&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 08:34:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12941602#M3058</guid>
      <dc:creator>grahamcook</dc:creator>
      <dc:date>2024-08-06T08:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WebViewer2 package - Version issues</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12941717#M3059</link>
      <description>&lt;P&gt;Just for completeness, here is the code and error I get in AutoCAD 2025 (on line that calls CoreWebView2Environment.CreateAsync).&amp;nbsp; This is the code behind of a xaml file that simply contains a WebView2 control:&lt;BR /&gt;&lt;BR /&gt;Unable to load DLL 'WebView2Loader.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)'&lt;BR /&gt;&lt;BR /&gt;The runtime folder does exist in the root of my plugin containing all the different platform builds of the loader dll.&amp;nbsp; The same code works in AutoCAD 2024 (with specific version of webview2) and Revit 2022-2025.&amp;nbsp; Just AutoCAD 2025 not working which is frustrating!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using Microsoft.Web.WebView2.Core;
using System;
using System.Windows;
using System.Windows.Controls;

namespace ArtisanCore.WPFControls
{
    /// &amp;lt;summary&amp;gt;
    /// Interaction logic for WebControl.xaml
    /// &amp;lt;/summary&amp;gt;
    public partial class WebControl : UserControl
    {
        /// &amp;lt;summary&amp;gt;
        /// 
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="objIdOrUrl"&amp;gt;The objectId of the plant item we need to show characteristics for OR a complete URL&amp;lt;/param&amp;gt;
        public WebControl(string objIdOrUrl)
        {
            InitializeComponent();

            try
            {
                InitializeAsync();

                if (objIdOrUrl.StartsWith("https"))
                {
                    Wv.Source = new Uri(objIdOrUrl);
                }
                else
                {
                    // use the objIdOrUrl to determine teh url...
                    Wv.Source = new Uri(enter url here);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error:\r\r" + ex.Message, "Web Load Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }

        // called from Window Constructor after InitializeComponent()
        // note: the `async void` signature is required for environment init
        async void InitializeAsync()
        {
            var userDataFolder = Session.Current.AppDataFolderACAD;

            // must create a data folder if running out of a secured folder that can't write like Program Files
            var env = await CoreWebView2Environment.CreateAsync(null, userDataFolder);

            // NOTE: this waits until the first page is navigated - then continues
            //       executing the next line of code!
            await Wv.EnsureCoreWebView2Async(env);
        }
    }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 06 Aug 2024 09:51:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12941717#M3059</guid>
      <dc:creator>grahamcook</dc:creator>
      <dc:date>2024-08-06T09:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WebViewer2 package - Version issues</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12944466#M3060</link>
      <description>&lt;P&gt;The issue with AutoCAD 2024 loading only one version of the WebView2 control was a user error which has been sorted.&lt;BR /&gt;&lt;BR /&gt;But the problem still persists with getting WebView2 to run in AutoCAD 2025.&lt;BR /&gt;&lt;BR /&gt;Hoping that someone might be able to shed light on this as it is preventing us from issuing a 2025 version of our plugin.&amp;nbsp; I attach a very simple Visual Studio solution that contains 2 identical projects in regards to their functionality.&amp;nbsp; They each have one command,&amp;nbsp;TestWebView2, which demonstrates the problem.&amp;nbsp; It simply loads a WPF form with a WebView2 control and loads the google home page.&amp;nbsp; One for 2024 that works fine, and one for 2025 (upgraded to Core of course).&amp;nbsp; 2025 version will crash AutoCAD.&lt;BR /&gt;&lt;BR /&gt;As I said previously, I have successfully upgraded several Revit AddIns to 2025 that use the WebView2 control with no problems but have hit a dead end regarding AutoCAD 2025.&amp;nbsp; Have tested on 2 systems and both result in a crash.&lt;BR /&gt;&lt;BR /&gt;Any insight would very much be appreciated?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 13:53:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12944466#M3060</guid>
      <dc:creator>grahamcook</dc:creator>
      <dc:date>2024-08-07T13:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WebViewer2 package - Version issues</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12944504#M3061</link>
      <description>&lt;P&gt;Are you an ADN member? If not, &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1937895"&gt;@moogalm&lt;/a&gt; might be able to take a look at it.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 14:08:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12944504#M3061</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2024-08-07T14:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WebViewer2 package - Version issues</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12944512#M3062</link>
      <description>&lt;P&gt;Yes, I have a ADN membership.&amp;nbsp; I'll could request support via that then and post back any findings.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 14:11:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12944512#M3062</guid>
      <dc:creator>grahamcook</dc:creator>
      <dc:date>2024-08-07T14:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WebViewer2 package - Version issues</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12944525#M3063</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1070920"&gt;@grahamcook&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yes, I have a ADN membership.&amp;nbsp; I'll could request support via that then and post back any findings.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;They're a bit slower than the forums, but you will definitely get an answer.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 14:17:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12944525#M3063</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2024-08-07T14:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WebViewer2 package - Version issues</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12946093#M3064</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14801"&gt;@Ed__Jobe&lt;/a&gt;&amp;nbsp;for mention,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1070920"&gt;@grahamcook&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to build you application explicitly for Win-x64 runtime, WebView components provided native C++ build dlls for all platforms like x64, Unix etc.&lt;BR /&gt;In the *.csproj file, add&amp;nbsp; &lt;CODE&gt;win-x64&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; &amp;lt;PropertyGroup&amp;gt;
   &amp;lt;TargetFramework&amp;gt;net8.0-windows&amp;lt;/TargetFramework&amp;gt;
   &amp;lt;OutputType&amp;gt;Library&amp;lt;/OutputType&amp;gt;
   &amp;lt;GenerateAssemblyInfo&amp;gt;false&amp;lt;/GenerateAssemblyInfo&amp;gt;
   &amp;lt;AssemblySearchPaths&amp;gt;D:\ArxSdks\Arx2025\inc;$(AssemblySearchPaths)&amp;lt;/AssemblySearchPaths&amp;gt;
   &amp;lt;UseWPF&amp;gt;true&amp;lt;/UseWPF&amp;gt;      
   &amp;lt;ImportWindowsDesktopTargets&amp;gt;true&amp;lt;/ImportWindowsDesktopTargets&amp;gt;
   &amp;lt;CopyLocalLockFileAssemblies&amp;gt;true&amp;lt;/CopyLocalLockFileAssemblies&amp;gt;
   &amp;lt;Platforms&amp;gt;x64;AnyCPU&amp;lt;/Platforms&amp;gt;
   &amp;lt;RuntimeIdentifier&amp;gt;win-x64&amp;lt;/RuntimeIdentifier&amp;gt;
 &amp;lt;/PropertyGroup&amp;gt; &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="moogalm_0-1723096088466.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1395675i2909A60534DE8855/image-size/medium?v=v2&amp;amp;px=400" role="button" title="moogalm_0-1723096088466.png" alt="moogalm_0-1723096088466.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 05:51:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12946093#M3064</guid>
      <dc:creator>moogalm</dc:creator>
      <dc:date>2024-08-08T05:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WebViewer2 package - Version issues</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12946199#M3065</link>
      <description>&lt;P&gt;Thank you &lt;SPAN&gt;Madhukar&lt;/SPAN&gt;!&lt;BR /&gt;I did try that before posting to the forums through the project properties UI.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="graham_0-1723099023754.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1395685iDDE4F7B997CFC08F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="graham_0-1723099023754.png" alt="graham_0-1723099023754.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But that didn't add the&amp;nbsp;RuntimeIdentifier tag (just the PlatformTarget tag).&amp;nbsp; Adding that in manually as in your example resolved the issue.&lt;BR /&gt;I don't understand why my Revit 2025 AddIn's don't need the same tag, they just work off the bat.&lt;BR /&gt;Anyway, it's now working and we can move forwards so thank you and thank you &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14801"&gt;@Ed__Jobe&lt;/a&gt;&amp;nbsp; for asking &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1937895"&gt;@moogalm&lt;/a&gt;&amp;nbsp;to look into!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 06:51:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12946199#M3065</guid>
      <dc:creator>graham</dc:creator>
      <dc:date>2024-08-08T06:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WebViewer2 package - Version issues</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12946232#M3066</link>
      <description>&lt;P&gt;Revit probably ships with WebView2Loader.dll. I know that Revit has an intrinsic dependency on WebView2, so your app doesn't get a chance to probe your debug folder; it finds it in the Revit install folder.&lt;/P&gt;
&lt;P&gt;On the other hand, AutoCAD has no dependency on WebView2 as an in-process module, probably due to its unopinionated architecture, which delegates decision-making to users or developers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 07:04:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12946232#M3066</guid>
      <dc:creator>moogalm</dc:creator>
      <dc:date>2024-08-08T07:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WebViewer2 package - Version issues</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12947069#M3067</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1937895"&gt;@moogalm&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14801"&gt;@Ed__Jobe&lt;/a&gt;&amp;nbsp;for mention,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1937895"&gt;@moogalm&lt;/a&gt;&amp;nbsp; ...and thanks for supporting the forums!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 14:19:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-the-webviewer2-package-version-issues/m-p/12947069#M3067</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2024-08-08T14:19:57Z</dc:date>
    </item>
  </channel>
</rss>

