See the top rated post in this thread. Click here

Results 1 to 8 of 8

Thread: Microsoft Visual Studio 2010

  1. #1
    Active Member
    Join Date
    2009-06
    Location
    Orlando
    Posts
    64
    Login to Give a bone
    0

    Default Microsoft Visual Studio 2010

    Hello,

    I'm new to the API deal, and I'd like to ask a question, so here it goes:

    Is Microsoft Visual Studio 2010 compatible with Revit 2011?
    In other words, if I compile my code in Microsoft Visual Studio 2010, will the ddl file work with Revit 2011.

    I had a compatibility error with my "Hello World" program for Revit 2010, not sure if the same thing happens in 2011. The Revit 2011 API Developer Guide states that Microsoft Visual Studio 2008 is one of the requirements, what about MVS 2010?

    Thanks in advance for any help given!

  2. #2
    Active Member
    Join Date
    2008-02
    Posts
    58
    Login to Give a bone
    0

    Default Re: Microsoft Visual Studio 2010

    Short answer, yes they'll work together.

    Visual Studio is just an integrated development environment (IDE) which provides you with some useful tools to code with but it's by no means required. All the compilers come with Windows so in theory you could write all your code in notepad and compile by hand. Many developers use alternative IDEs such as XCode, Eclipse or Emacs. Visual Studio is promoted by Autodesk because they have had an intimate relationship with Microsoft, and have built much of their software on the .NET framework which is a Microsoft proprietary code base for Windows development. With that in mind, you can use even older versions of Visual Studio if you configure them correctly, or just use another IDE all together if you have a separate preference. Visual Studio is very good however if you don't mind being tied to closed-source software.

  3. #3
    Active Member
    Join Date
    2009-06
    Location
    Orlando
    Posts
    64
    Login to Give a bone
    0

    Default Re: Microsoft Visual Studio 2010

    I'm getting this error, does anyone know what it means?

    "Could not load file or assembly 'file:///C:\Users\sae\Documents....\Hello World Revit.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and connot be loaded.

  4. #4
    Active Member
    Join Date
    2008-02
    Posts
    58
    Login to Give a bone
    0

    Default Re: Microsoft Visual Studio 2010

    It means you haven't been doing your Windows updates. You'll need to update your .NET framework in order it working since your current version is lower than the version required for the Revit API.

  5. #5
    Active Member
    Join Date
    2009-06
    Location
    Orlando
    Posts
    64
    Login to Give a bone
    0

    Default Re: Microsoft Visual Studio 2010

    Quote Originally Posted by abe.buckingham View Post
    It means you haven't been doing your Windows updates. You'll need to update your .NET framework in order it working since your current version is lower than the version required for the Revit API.
    Ok so you were right about the updates not having been installed; however, installing the updates did not get rid of the error. The error is still the same
    Attached Images Attached Images

  6. #6
    AUGI Addict
    Join Date
    2003-11
    Location
    New Zealand
    Posts
    1,116
    Login to Give a bone
    1

    Default Re: Microsoft Visual Studio 2010

    Doubt it has anything to do with updates. If you're using VS2010 VS can now multi-target. There are primarily 2 major versions of .NET (2.0->3.5) and .NET4.0.

    In your Visual studio project properties make sure you're targeting .NET3.5. Also you must reference the appropriate Revit API assembly. Either RevitAPI.dll for R2010 or RevitAPI.dll & RevitAPIUI.dll for R2011.

    HTH,

    Guy

  7. #7
    100 Club
    Join Date
    2007-10
    Location
    Brisbane
    Posts
    138
    Login to Give a bone
    1

    Default Re: Microsoft Visual Studio 2010

    As guy said, make sure in your visual studio project you are setting your target framework to .NET 3.5 or 2.0. In 2010 it will probably be 4 by default, this is unlikely to work.

    To do this right click on your project in visual studio and go properties, in the application tab there will be 'target framework'.

    If you want to debug your applications with VS2010 and Revit, see my blog post:
    http://blog.rodhowarth.com/2010/04/r...and-revit.html
    Last edited by r.howarth; 2010-07-07 at 06:10 AM.

  8. #8
    Active Member
    Join Date
    2009-06
    Location
    Orlando
    Posts
    64
    Login to Give a bone
    0

    Default Re: Microsoft Visual Studio 2010

    Quote Originally Posted by r.howarth View Post
    As guy said, make sure in your visual studio project you are setting your target framework to .NET 3.5 or 2.0. In 2010 it will probably be 4 by default, this is unlikely to work.

    To do this right click on your project in visual studio and go properties, in the application tab there will be 'target framework'.

    If you want to debug your applications with VS2010 and Revit, see my blog post:
    http://blog.rodhowarth.com/2010/04/r...and-revit.html

    Thanks to Guy and R. Howarth, you guys were right on the money.

    R. Howarth thanks for outlining the steps for me. I can start practicing now!

Similar Threads

  1. 2014: Visual Studio 2010 Express
    By MikeJarosz in forum Revit - API
    Replies: 2
    Last Post: 2014-04-28, 07:58 PM
  2. Install Problems - Microsoft Visual C++ 2010
    By heath.simone in forum Revit - Platform
    Replies: 2
    Last Post: 2012-05-04, 04:38 AM
  3. AutoCAD 2011 .NET Wizards and Visual Studio 2010
    By rollinkuhn in forum Dot Net API
    Replies: 13
    Last Post: 2011-12-20, 12:18 PM
  4. Replies: 4
    Last Post: 2009-08-17, 09:20 PM
  5. Consolas Font Pack for Microsoft Visual Studio 2005
    By Mike.Perry in forum Dot Net API
    Replies: 1
    Last Post: 2006-05-04, 03:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •