.NET Framework Matrix

.NET Framework Matrix

Dale.Bartlett
Collaborator Collaborator
5,647 Views
9 Replies
Message 1 of 10

.NET Framework Matrix

Dale.Bartlett
Collaborator
Collaborator

I have a question regarding .NET Framework versions for different releases of Revit (and AutoCAD for that matter).

There appear to be a few aspects to this:

  • The version supported by Revit (in Revit.exe.config)
  • The version installed by Revit
  • The version required by Revit API

I have been unable to find a collated table of these versions (please link me if you know of one). The information I have been able to collect from Revit.exe.config, SDKs, blogs, Autodesk Help, etc. is assembled in the following table. No guarantees. Any corrections and additional information would be helpful.

 

ProductReleaseSupported RuntimeInstalled RuntimeAPI RuntimeVisual Studio Version
Revit20144.0   
Revit2015    
Revit20164.0   
Revit20174.0   
Revit2017 SP2?? 4.6 

Revit

2017.1?? 4.5.2Visual Studio 2015
      
AutoCAD2007  2.0Visual Studio 2005
AutoCAD2008  2.0Visual Studio 2005
AutoCAD2009  2.0Visual Studio 2005
AutoCAD2010  3.5 SP1Visual Studio 2008 SP1
AutoCAD2011  3.5 SP1Visual Studio 2008 SP1
AutoCAD2012  4.0Visual Studio 2010/2012
AutoCAD2013  4.0Visual Studio 2010/2012
AutoCAD2014  4.0Visual Studio 2010/2012
AutoCAD2015  4.5Visual Studio 2012
AutoCAD2016  4.5Visual Studio 2012
AutoCAD2017    



______________
Yes, I'm Satoshi.
0 Likes
Accepted solutions (1)
5,648 Views
9 Replies
Replies (9)
Message 2 of 10

Dale.Bartlett
Collaborator
Collaborator

Maybe something like this for Revit?

 

AutoCAD Versions.png

 




______________
Yes, I'm Satoshi.
0 Likes
Message 3 of 10

matthew_taylor
Advisor
Advisor
Accepted solution

Hi @Dale.Bartlett,

The version of Visual Studio is not important.

I use VS Pro 2013 for versions 2011-2017. You may just need to load additional frameworks.

 

Revit 2011 I build to .NET 3.5

Revit 2012 I build to .NET 4.0"The Revit API has been enhanced to run with the .NET 4.0 runtime. As a result, Visual Studio 2010 with a framework target of .NET 3.5 or 4.0 must be used to debug your addins."

Revit 2013 I build to .NET 4.0

Revit 2014 I build to .NET 4.0

Revit 2015 I build to .NET 4.5 "Revit's API is now built with and requires .NET 4.5 for compilation."

Revit 2016 I build to .NET 4.5

Revit 2017/2017.1 etc:  I build to .NET 4.6 "Revit uses the runtime from .NET 4.6. At a minimum, add-ons will need to target .NET 4.5.2, but .NET 4.6 will also work."

 

I have all of these versions installed, so let me know if there's something you want to know (and tell me where to look).

 

Cheers,

 

-Matt


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 4 of 10

Dale.Bartlett
Collaborator
Collaborator

Hi Matt,

Thanks for the reply. My question comes from trying to debug an older addin. Say someone has Revit 2015 installed, and nothing that would have installed a later .NET framework. They would only have the framework installed with Revit 2015. I used the following link process to determine the framework for Revit versions as noted in my original list.

http://adndevblog.typepad.com/manufacturing/2015/02/which-net-framework-version-is-inventor-using.ht...

"The easiest way to check which .NET Framework version Inventor or other products are using is by looking into their config file. In case of Inventor 2015 it's "C:\Program Files\Autodesk\Inventor 2015\Bin\Inventor.exe.config". There you'll find the <startup> tag. In case of Inventor 2015 it has the following content, which shows it's using v4.5"

The results differ from those you provided (i.e. R2016 Revit.exe.config = <supportedRuntime version="v4.0"/>, yours = 4.5). That prompted me to wonder how to determine the correct version for an addin if the user had not installed any later .NET framework (or SP) than that provided by the original installation. Maybe I am overthinking this but the information available seems a bit scattered. Regards Dale.

 

 




______________
Yes, I'm Satoshi.
0 Likes
Message 5 of 10

matthew_taylor
Advisor
Advisor

Hi @Dale.Bartlett,

Maybe you're overthinking it if you're only using your own projects 'within' Revit. If you're using stuff 'without' Revit also (or are using later version Nuget packages or something), there may be compatibility issues, so it's worth being sure.

The quotes in my first post are from the software development kit (SDK) help files, so, bankable intel' with regards to building for those versions. Version not noted can be assumed to be the same as those prior (in my experience).

 

I only get into this stuff when I have a need, and the SDK has been helpful for this to date.

 

Cheers,

 

-Matt


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 6 of 10

Dale.Bartlett
Collaborator
Collaborator

Thanks Matt, I appreciate the input. Yes I picked up the SDK as being different to the revit.exe.config. Dale




______________
Yes, I'm Satoshi.
0 Likes
Message 7 of 10

c_hanschen
Advocate
Advocate

is there somewhere an updated version of this matrix?

 

I am interested in the overview for version 2018, 2019 and 2020.

when connecting Revit API 2020 I need .net FrameWork 4.7

I want to know if this is also officially supported for 2018 en 2019.

 

Chris Hanschen

The Netherlands

0 Likes
Message 8 of 10

matthew_taylor
Advisor
Advisor

Hi @c_hanschen,

Here are the latest versions to date:

Revit 2018 I build to .NET 4.6 (as for Revit 2017)

Revit 2019 "Revit's API assemblies are built using .NET 4.7. At a minimum, add-ons will need to target .NET 4.7 for Revit 2019."

Revit 2020 I build to .NET 4.7

 

Autodesk change the framework across their program range every two years so they don't get into dll hell. It would take a big deal to disrupt this pattern. So, expect a change in Revit 2021!

 


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 9 of 10

c_hanschen
Advocate
Advocate

@matthew_taylor ,

 

Thanks for your Reply.

Is there also an updated (Revit 2020) official Autodesk website where this info is stored?

 

I tried different combinations of doing it wrong:

- Build to a lower Framework version as 'needed' for the Revit (API) Version

- Build to Revit 2017 (RevitApi.dll and RevitApiUI.dll) and use this DLL in different versions of Revit, 2017, 2018 and 2019

 

All Combinations of above seems to work fine, I don't get any problems at all, I don't even see any differences.

As far as all used commands are supported by the Revit version in use, it does not seem to bother wich version of .net framework and/or Revit Api dll is referenced.

 

I even tried framework 4.5.2 in Revit 2020, no problem at all.

 

So Why should I bother that much?

 

Chris Hanschen

The Netherlands

 

0 Likes
Message 10 of 10

matthew_taylor
Advisor
Advisor

Hi @c_hanschen,

No problem.

The text in parentheses is straight from the SDK for Revit 2019. As for 2020, no. The framework is not mentioned in the Changes and Additions, so it is implied that it hasn't changed.

 

You may be fine without changing the framework but you may never know if an issue manifests because of it.

Say Revit was using System.Linq version 4, and you were using System.linq from version 4.5. They may give you different results, or something you're referencing uses another version. It opens up a set of complications that you can simply avoid by sticking to the recommended framework. Autodesk stick to a system across their range of software to avoid dll hell .

Did you see what just happened with CefSharp? That sort of thing is worth avoiding.

 

 


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?