Team System Developer Center >
Visual Studio Team System Forums
>
Team Foundation Server - Build Automation
>
Error building ComVisible library in TFS Build Server
Error building ComVisible library in TFS Build Server
- I have a solution with 24 projects that we have been building in TFS Build Server successfully for quite a while. We just added a new project to the solution that builds a ComVisible dll containing a ComVisible class called UploadParams. Now when we build on build server, I get the following error:
C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3019,9): error MSB3216: Cannot register assembly "f:\tfsbuild\Comm\STARs10Server\Binaries\Release\STAR.Common.Upload.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\STAR.Common.Upload.UploadParams' is denied.
I need to build this dll as part of the team build but I don't need to register the dll on the build server. How can I make it build as ComVisible while preventing the attempt to register the COM library?
Regards,
Dale
Answers
- Hi Dale,
The Task in "C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3019,9)" is
It seems that you checked RegisterForComInterop in Build Tab of Project Property Page. You can uncheck it for the Configuration and Platform used in Team Build.<Target Name="UnmanagedRegistration" Condition="'$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'" DependsOnTargets="$(UnmanagedRegistrationDependsOn)" > <RegisterAssembly Assemblies="@(_OutputPathItem->'%(FullPath)$(TargetFileName)')" TypeLibFiles="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')" AssemblyListFile="@(_UnmanagedRegistrationCache)" CreateCodeBase="true" Condition="!Exists('@(_UnmanagedRegistrationCache)')"/> <ItemGroup> <FileWrites Include="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')"/> </ItemGroup> </Target>
Best Regards,
Ruiz
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi- Marked As Answer byDale At Work Saturday, October 31, 2009 12:17 AM
All Replies
- Hi Dale,
The Task in "C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3019,9)" is
It seems that you checked RegisterForComInterop in Build Tab of Project Property Page. You can uncheck it for the Configuration and Platform used in Team Build.<Target Name="UnmanagedRegistration" Condition="'$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'" DependsOnTargets="$(UnmanagedRegistrationDependsOn)" > <RegisterAssembly Assemblies="@(_OutputPathItem->'%(FullPath)$(TargetFileName)')" TypeLibFiles="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')" AssemblyListFile="@(_UnmanagedRegistrationCache)" CreateCodeBase="true" Condition="!Exists('@(_UnmanagedRegistrationCache)')"/> <ItemGroup> <FileWrites Include="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')"/> </ItemGroup> </Target>
Best Regards,
Ruiz
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi- Marked As Answer byDale At Work Saturday, October 31, 2009 12:17 AM
- Thank you, Ruiz. It seems so obvious now. That fixed it.
Dale


