Solved

register tlb

Posted on 2013-11-08
7
316 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 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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