In Windows 7, vs references com to build a compilation error.

Source: Internet
Author: User

The project referencesC ++WrittenComComponent, previously inWindows Server 2008 r2 + vs 2010No problem. Use it after reinstalling the system.Windows 7 + V. S. 2010, Compilation error:

 

Error1 cannot register assembly "E: \ workfolder \ cardmanagement \ sourcecode \ cardmw \ rare. card. libary \ bin \ debug \ rare. card. libary. DLL "-Access denied. please make sure you're running the application as administrator. access to the registry key 'HKEY _ classes_root \ rare. card. libary. mifareonehelper 'is denied. rare. card. libary

 

Solution:

If you compile project-properties-Register for com InterOPIf the preceding check box is removed, a running error may occur.

Solution: UseRegasmManual registration

Win7Must be run as the Administrator; otherwise, the registration will not succeed.

C: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ regasm.exe

If not, restartVS, Select to run as administrator, You can automatically register

In fact, there is another work und, which can be opened directly in the Start Menu Using the Administrator identity.VSYou can do it, but it is a little troublesome to open it every time.

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.