How to handle warnings when Visual Studio references com

Source: Internet
Author: User

According to a comment in the mdsn article about tlbimp for 2.0, you can't fix this problem w/o running tlbimp yourself.

It was easy to reproduce your problem using vs. I also reproduced it running tlbimp manually from a vs comment prompt:

Tlbimp c: \ winnt \ system32 \ activeds. TLB/out: InterOP. activeds. dllthe fix was to use the/silent Switch

Tlbimp c: \ winnt \ system32 \ activeds. TLB/silent/out: InterOP. activeds. dllas pointed out in the comment in the msdn article, the com reference becomes. net Assembly reference to the InterOP assembly you built yourself.

I'm not a vs expert, but I made this work by adding a prebuild to project:

"$ (Devenvdir )\.. \.. \ SDK \ V2.0 \ bin \ tlbimp "C: \ winnt \ system32 \ activeds. TLB/namespace: activeds/silent/out: "$ (projectdir) InterOP. activeds. DLL "built it once so I 'd have a DLL to add a reference with the Browse tab. added a reference to the InterOP. activeds. DLL in my project root and then built again. you may want to do this some other way, like with an external make file via a C ++ project. this is more of a POC.

Note a funny difference in msbuild vs, $ (devenvdir) has a trailing backslash but msbuild does not.

 

Refer:

Http://msdn.microsoft.com/en-us/library/tt0cf3sx%28VS.80%29.aspx

Http://stackoverflow.com/questions/269063/lots-of-build-warnings-when-com-objects-activeds-or-msxml2-are-referenced

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.