Solved

register tlb

Posted on 2013-11-08
7
328 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 75

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 75

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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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 75

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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

710 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