Solved

register tlb

Posted on 2013-11-08
7
299 Views
Last Modified: 2013-11-11
SET GACUTIL="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe"
SET REGASM="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm.exe"

%REGASM% $(TargetFileName) /tlb:MobizSalesApplication.tlb
%GACUTIL% /i $(TargetFileName)


Is there any use of adding these last 2 lines below while registering a COM object on build. Only reason I ask is when I am signed inas admin and omit these last 2 lines and build the application the tlb is created and along with the dll. Is it necessary...I am using .net framework 3.5 and 2010 vs studio

Although I get an error when adding them as admin and hitting build.


%REGASM% $(TargetFileName) /tlb:MobizSalesApplication.tlb
%GACUTIL% /i $(TargetFileName)
0
Comment
Question by:Moizsaif123
  • 4
  • 3
7 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 39633400
The first two lines only create two environment variables--they don't actually execute anything. The last two lines are actually attempting to register the type library. Without them, you're not really doing anything.

If you are getting an error when you run the last two lines, then something is wrong. Make sure you have the SDK installed on the machine which you are running the script on. Try locating those two files from within Explorer or a command prompt. If you cannot find the files, then that is why your script fails.
0
 
LVL 4

Author Comment

by:Moizsaif123
ID: 39635377
How is it that when im building the application using administrator when ommit 2 last lines both dll and tlb get updated
0
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39635381
What do you mean by "updated"? The files will still get built. That's what Visual Studio does. The two lines you show are for installing the type library so that is accessible to COM.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 4

Author Comment

by:Moizsaif123
ID: 39635388
in vs studio 2010 under build there is an option register for com interop wont this do the job.attached image

thx for the help

correct file attached now
53591.png
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 39635797
It should, yes.
0
 
LVL 4

Author Comment

by:Moizsaif123
ID: 39637797
I have included a screenshot on the err im receiving on build the application. I have access to the application folder from my account so I am not sure about this error.
access-denied-err.docx
0
 
LVL 4

Author Comment

by:Moizsaif123
ID: 39637849
How do I register the dll manually from DOS prompt if I am able to do it manually also it will help. Thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now