Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

64bit VSTA - how to use web reference?

4 REPLIES 4
Reply
Message 1 of 5
gregor.vilkner
591 Views, 4 Replies

64bit VSTA - how to use web reference?

Hi there, I am trying to use a web service reference in a VSTA module on a 64bit machine. Nothing fancy - just signing up to a service. This works fine in 32bit, but on the 64bit machine it won't compile, giving me the "An attempt was made to load an assembly with an incorrect format: C:\...\RevitAPI.dll." message for the revitapi.dll.

 

any advice would be greatly appreciated. thanks and kind regards,

 

Gregor

4 REPLIES 4
Message 2 of 5
Moustafa_K
in reply to: gregor.vilkner

Hi although this post is very old but i am now also facing same issue. is it possible to share with us how did you over ride this?

-----------------------------------------------------
Moustafa Khalil
Message 3 of 5
rosalesduquej
in reply to: Moustafa_K

Hi Mostafa,

 

Yes really old question, But I guess there are a couple of questions you can clarify with us. 

What version of Revit are you using? Do you have the correct .Net Framework installed for the DLL you are using? 

Which version of Windows? It seems like if you use Revitapi.dll that comes from a 32-bit Revit installation and try to debug with 64 bit will cause this problem. Just like any other DLL's which don't match that criteria. 

 

Check this post, it is not Revit related, but it is to the problem you are getting. 

http://stackoverflow.com/questions/13373297/sgen-an-attempt-was-made-to-load-an-assembly-with-an-inc...

 

Cheers,



Jaime Rosales D.
Sr. Developer Consultant
Twitter | AEC ADN DevBlog
Message 4 of 5
Moustafa_K
in reply to: rosalesduquej

thanks for your response.

I am writting addins for revit 2014--->2016 

Windows 8.1 X64

frame work 4.5

 

server:

Windows 8.1 x64

IIS 8.5.9600.16384

 

 

actually it is not about debugging it is about building. i tested the building without a webreference and works fine. but with refrencing a web reference it won't compile.

 

I have check the post you send but it is not clear how it has been resolved.

 

Edit:

my be the reason is on adding a web reference it generate a code compatible with .NET Framework 2.0??!!

 


-----------------------------------------------------
Moustafa Khalil
Message 5 of 5
rosalesduquej
in reply to: Moustafa_K

Hi,

 

So I did another search and Found one interesting post http://stackoverflow.com/questions/2158106/web-reference-vs-service-reference

 

might help you out? I see a comment at the end where it says, that it is better to use a service reference since it's newer and will be easier to maintain overtime. maybe something to consider. 

 

Hope it helps, Cheers,



Jaime Rosales D.
Sr. Developer Consultant
Twitter | AEC ADN DevBlog

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community