all groups > visual studio .net setup > may 2006 >
You're in the

visual studio .net setup

group:

Add TLB file to deployment project


Add TLB file to deployment project Oleg.Ogurok NO[at]SPAM gmail.com
5/31/2006 11:12:33 AM
visual studio .net setup:
Hi there,

I have a class library project that exposes itself to COM.
I'm trying to deploy it.

I'm wondering why when I add a "Primary output from MyComProject
(Active)", only .dll is added as part of the output. When MyComProject
is compiled, the output folder (bin\Release) contains both .dll and
..tlb files. Shouldn't .tlb be included as part of primary output too?

..tlb is a required file. COM interop won't work without it on the
target machine, i.e. COM will not see it.

I've manually added the .tlb to the setup project, and things started
working on the target machine.

However, now I have another issue. My solution is under Source Safe
2005. VS.NET automatically checks .tlb file into the repository every
time I check in. This makes the .tlb under bin\Release read-only, and
next time I try to compile the project, I get:

Error 1 Cannot register assembly
"C:\Development\MySolution\MyComProject\bin\Release\MyComProject.dll" -
access denied. Access is denied. (Exception from HRESULT: 0x80070005
(E_ACCESSDENIED)) MyComProject

Any ideas/suggestions are gladly appreciated.

-Oleg.
Re: Add TLB file to deployment project Phil Wilson
6/1/2006 9:02:29 AM
Primary output isn't well-defined I guess, but in the case of building a Dll
it really does mean the Dll, it just means the Dll, not any associated COM
stuff. The tlb is being built by regasm anyway, I assume, running at the end
of the build.

How are you checking in to SourceSafe? I know there are options to name the
files, and there's no point in checking in something that's generated by a
build anyway.
--
Phil Wilson
[Microsoft MVP-Windows Installer]

[quoted text, click to view]

Re: Add TLB file to deployment project Oleg.Ogurok NO[at]SPAM gmail.com
6/1/2006 10:17:42 AM

I don't specifically check the file in.
I have a setup project that's under the same solution, so every project
is under source control.
Somehow, when I add the .tlb file to the deployment project (in File
System Editor), Visual Studio 2005 checks it in for you. And since
adding a file in File System Editor only adds a link to the actual
file, the tlb file under bin\Release of MyComProject gets checked in.

-Oleg.

[quoted text, click to view]
AddThis Social Bookmark Button