<?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 Visual Studio Reporting many errors after Changing the Reference Files to 2022 version in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11859685#M12956</link>
    <description>&lt;P&gt;Hey Forum, (and maybe Mr.&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5661631"&gt;@naveen.kumar.t&lt;/a&gt;&amp;nbsp;in perticular as I've seen many great solutions from him),&lt;BR /&gt;&lt;BR /&gt;I have created a Revit add-in using the RevitAPI.dll and RevitAPIUI.dll files as references from the Revit 2020 folder.&amp;nbsp; Working well for Revit up to 2021, but not for Revit 2022.&amp;nbsp; I understand there have been some API changes in Revit 2022.&amp;nbsp; So in order to update my add-in for Revit 2022, i removed the references, and added the version 2022 .dll files.&amp;nbsp; I got a few errors in my code because of the API changes, but I was perfectly able to fix those.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;When I build my solution, this is where the trouble starts:&amp;nbsp; I get errors, many errors, pretty much all of them saying:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;CS0234 The type or namespace name 'Revit' does not exist in the namespace 'Autodesk' (are you missing an assembly reference?)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;this error shows 594 times, with different things missing, but all of them being types or namespaces that are absolutely available.&amp;nbsp; When I double click the error, the class it is in opens, and the error disappears.&amp;nbsp; I can do this for all of them, but building the solution still fails, and when I save and close the class-files in VS, then build the solution again, all the errors come back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's probably a single setting or line that I need to change, but I cannot figure out what that is.&amp;nbsp; Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2023 14:48:16 GMT</pubDate>
    <dc:creator>LucasJonnedeJong</dc:creator>
    <dc:date>2023-03-30T14:48:16Z</dc:date>
    <item>
      <title>Visual Studio Reporting many errors after Changing the Reference Files to 2022 version</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11859685#M12956</link>
      <description>&lt;P&gt;Hey Forum, (and maybe Mr.&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5661631"&gt;@naveen.kumar.t&lt;/a&gt;&amp;nbsp;in perticular as I've seen many great solutions from him),&lt;BR /&gt;&lt;BR /&gt;I have created a Revit add-in using the RevitAPI.dll and RevitAPIUI.dll files as references from the Revit 2020 folder.&amp;nbsp; Working well for Revit up to 2021, but not for Revit 2022.&amp;nbsp; I understand there have been some API changes in Revit 2022.&amp;nbsp; So in order to update my add-in for Revit 2022, i removed the references, and added the version 2022 .dll files.&amp;nbsp; I got a few errors in my code because of the API changes, but I was perfectly able to fix those.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;When I build my solution, this is where the trouble starts:&amp;nbsp; I get errors, many errors, pretty much all of them saying:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;CS0234 The type or namespace name 'Revit' does not exist in the namespace 'Autodesk' (are you missing an assembly reference?)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;this error shows 594 times, with different things missing, but all of them being types or namespaces that are absolutely available.&amp;nbsp; When I double click the error, the class it is in opens, and the error disappears.&amp;nbsp; I can do this for all of them, but building the solution still fails, and when I save and close the class-files in VS, then build the solution again, all the errors come back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's probably a single setting or line that I need to change, but I cannot figure out what that is.&amp;nbsp; Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 14:48:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11859685#M12956</guid>
      <dc:creator>LucasJonnedeJong</dc:creator>
      <dc:date>2023-03-30T14:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Studio Reporting many errors after Changing the Reference Files to 2022 version</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11860762#M12957</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9632428"&gt;@LucasJonnedeJong&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check the target .NET Framework used in the project, for R2020 it would be Net Framework 4.7.&lt;/P&gt;&lt;P&gt;For Revit 2021 - Revit 2023 the target Framework should be Net Framework 4.8&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on the actual code used in you're project of the Revit API used Net 4.7 could work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Michel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quick Reference of Frameworks per Revit version.&lt;/P&gt;&lt;P&gt;Revit 2017-2018 =&amp;gt; .Net 4.6&lt;/P&gt;&lt;P&gt;Revit 2019-2020 =&amp;gt; .Net 4.7&lt;/P&gt;&lt;P&gt;Revit 2021-2023 =&amp;gt; .Net 4.8&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 21:26:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11860762#M12957</guid>
      <dc:creator>TripleM-Dev.net</dc:creator>
      <dc:date>2023-03-30T21:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Studio Reporting many errors after Changing the Reference Files to 2022 version</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11861291#M12958</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3633270"&gt;@TripleM-Dev.net&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp; It did seem like that helped, but I now have different errors.&amp;nbsp; This time I have 580 errors pointing at xaml files of the WPF windows that the app uses, saying that "The type '[wpf-window or wpf window control]' already contains a definition for '[controlname]' or a control is implemented more than once.&amp;nbsp; &amp;nbsp;something seems to be double.&amp;nbsp; But I can not actually find something double.&amp;nbsp; &amp;nbsp;Any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 03:55:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11861291#M12958</guid>
      <dc:creator>LucasJonnedeJong</dc:creator>
      <dc:date>2023-03-31T03:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Studio Reporting many errors after Changing the Reference Files to 2022 version</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11862532#M12959</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9632428"&gt;@LucasJonnedeJong&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have setup a multiversion Solution for R2017-R2023 in which I setup everything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;For R2022 API I have references to: (with Copy Local = false), these should all be from the R2022 API!&lt;/U&gt;&lt;/P&gt;&lt;P&gt;- AdWindows.dll&lt;/P&gt;&lt;P&gt;- RevitAPI.dll&lt;/P&gt;&lt;P&gt;- RevitAPIIFC.dll (optional I think, depending of used code)&lt;/P&gt;&lt;P&gt;- RevitAPIUI.dll&lt;/P&gt;&lt;P&gt;- UIFramework.dll&lt;/P&gt;&lt;P&gt;- Xceed.Wpf.AvalonDock.dll (optional, related to the Revit tabs)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Also check if the following are referenced of the .NET:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;PresentationCore / PresentationFramework / System.Xaml / System.Xml&lt;/P&gt;&lt;P&gt;WindowsBase / WindowsFormIntegration&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Michel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 13:00:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11862532#M12959</guid>
      <dc:creator>TripleM-Dev.net</dc:creator>
      <dc:date>2023-03-31T13:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Studio Reporting many errors after Changing the Reference Files to 2022 version</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11862833#M12960</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3633270"&gt;@TripleM-Dev.net&lt;/a&gt;&amp;nbsp;Michel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked the references, I did not have WindowsFormsIntegration in there, but after adding it, the problem is not gone.&amp;nbsp; It looks very much like my WPF Windows are called twice/double, but I cannot seem to find the class or code where that happens.&amp;nbsp; Cleaning/Rebuilding/Restarting do not help.&amp;nbsp; &amp;nbsp;Next I think I'll create a WPF test window, to see if it is accepted without throwing errors.&amp;nbsp; Any other suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 14:34:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11862833#M12960</guid>
      <dc:creator>LucasJonnedeJong</dc:creator>
      <dc:date>2023-03-31T14:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Studio Reporting many errors after Changing the Reference Files to 2022 version</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11863620#M12961</link>
      <description>&lt;P&gt;Nope, the test window had the exact same issue:&amp;nbsp; it is somehow called twice, as each control is already there when it is called, and there is an ambiguity between the control and the same control again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 19:43:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11863620#M12961</guid>
      <dc:creator>LucasJonnedeJong</dc:creator>
      <dc:date>2023-03-31T19:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Studio Reporting many errors after Changing the Reference Files to 2022 version</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11868894#M12962</link>
      <description>&lt;P&gt;Alright, so in the end it turned out that my obj, bin and packages folders were included in the project, which caused the wpf windows to be called twice.&amp;nbsp; The solution is working now, thanks all!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 17:37:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/visual-studio-reporting-many-errors-after-changing-the-reference/m-p/11868894#M12962</guid>
      <dc:creator>LucasJonnedeJong</dc:creator>
      <dc:date>2023-04-03T17:37:10Z</dc:date>
    </item>
  </channel>
</rss>

