Open nguyenthanhson1712 opened 3 weeks ago
Revit 2025 use .NET 8.0, so any DLLs/dependencies must be built using .NET 8.0 as well. This Dev extension has not been updated for 2025. Its using .Netframework 4.8 which covers at least 2020-2024 and probably even earlier versions as well.
Revit 2025 use .NET 8.0, so any DLLs/dependencies must be built using .NET 8.0 as well. This Dev extension has not been updated for 2025. Its using .Netframework 4.8 which covers at least 2020-2024 and probably even earlier versions as well.
I tried in Revit version 2022 (pyrevit version 5.0.0) but got the same error as version 2025, should I wait for the bug to be fixed?
did you use latest WIP?
Looks like they were already discussing this issue in this merged pull request.
Try the latest WIP installer: yesterday #2373 came up, and it was solved with #2374 4 hours before you filed the issue.
It may be that some libraries are still missing, let us know if you still got errors
Try the latest WIP installer: yesterday #2373 came up, and it was solved with #2374 4 hours before you filed the issue.
It may be that some libraries are still missing, let us know if you still got errors
Sorry, I missed the information. I uninstalled the old WIP version and reinstalled the WIP version "pyRevit_5.0.0.24236_admin_signed", my C# code worked, but now I have 2 errors.
Thanks for the report, I should have expected incompatibilities with previous versions :sweat_smile:
The first error stems from this line:
It the assembly is not found, a None
object is placed in the list instead of dropping it.
A quick way to solve this is to change the line to the following:
refs = (_get_reference_file(ref_name) for ref_name in ref_list)
return [r for r in refs if r]
Can you please have a try with this code?
For the Console problem:
If it is not already there, try to explicitly add using System;
to your script;
If it is there, try to add System.Console
to the list above the aforementioned line.
Lastly, a little ask: please don't use screenshots when you can copy paste the code; it will help us help you more quickly to have a copy-paste-able minimum reproducible example to test with (that's why I wrote you what it could be done to fix this issue, I'm to lazy to test things myself :rofl: )
✈ Pre-Flight checks
🐞 Describe the bug
I can't run the code test C# of "Test C# Script.pushbutton" Although I got it running on pyrevit version 4.8.16.24121
⌨ Error/Debug Message
♻️ To Reproduce
No response
⏲️ Expected behavior
。
🖥️ Hardware and Software Setup (please complete the following information)
Additional context
。