Hi,
I have a routine which creates a new ribbon in Revit with a load of add on that I've written - this works really well in Revit 2016, 2017 and 2018.
Looking at the Build properties, it states that the target framework is .Net 4.5.2 - I've never changed this.
I build my ribbon using conditional compilation symbols which allows me to specify different version of the Revit DLL files depending on what version of Revit I want to compile for - this works well and allows me to have one set of codings that can be complied for different versions of Revit.
So that all worked well until I started with Revit 2019 - when I compile I get this error:
The primary reference "RevitAPIUI" could not be resolved because it has an indirect dependency on the assembly "EssentialsUIAPI, Version=19.0.0.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETFramework,Version=v4.7" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5.2".
I don't quite understand this error, but believe it means that I'm not using the right version of the .net framework. I'm using 4.5.2 and need 4.7
So if I install 4.7, will this stop me compiling code for the earlier versions of Revit (2016, 2017 and 2018?).
Is there a way to use 4.5.2 for 2016, 2017 and 2018 and use 4.7 for 2019 - I can't believe that I'll have to maintain two sets of code for each .net version?
I'd appreciate some advice on this.
Thanks.