Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 353
  • Last Modified:

register tlb

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
Moizsaif123
Asked:
Moizsaif123
  • 4
  • 3
1 Solution
 
käµfm³d 👽Commented:
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
 
Moizsaif123Author Commented:
How is it that when im building the application using administrator when ommit 2 last lines both dll and tlb get updated
0
 
käµfm³d 👽Commented:
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.

 
Moizsaif123Author Commented:
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
 
käµfm³d 👽Commented:
It should, yes.
0
 
Moizsaif123Author Commented:
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
 
Moizsaif123Author Commented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now