Closed 5616760 closed 8 months ago
What version of Revit are you using? And when does this exception occur?
revit 2021,
So it looks like there is some incompatibility between some of System.Text.Json dependencies and some of the dependencies of Revit.
I am pretty sure that I have made it work in the past, it is interesting that this problem has come back.
As a quick workaround, you can edit Revit.exe.config
file which is placed right next to Revit.exe
and add to it:
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
有人遇到这个问题吗?一点生成代码就这样:System.lO.FileNotFoundException: 未能加载文件或程序集'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken= b03f5f7f11d50a3a "或它的某一 个依赖项。系统找不到指定的文件。