Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

register tlb

Posted on 2013-11-08
7
Medium Priority
?
345 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 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
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 …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

705 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