Hi,
I'm trying to add an icon to a custom component but its not happening and I can't figure out why. I'm sure I've managed to do this in the past. Here's my DtsPipelineComponent attribute:
Code Snippet
namespace Jamiet.Ssis{
[DtsPipelineComponent(
DisplayName="MyComponent",
Description="Does some stuff",
ComponentType=ComponentType.Transform,
NoEditor=true,
IconResource="MyComponent.ico"
)
MyComponent.ico is stored in the same folder as my project (i.e. at the same level as the .cs file and the C# project file).
In the application property page I've pointed the icon resource at MyComponent.ico
Everything compiles OK. But I see no icon in my component when I deploy it to the toolbox or use it in a package.
I've also tried changing the attribute to this:
Code Snippet
namespace Jamiet.Ssis{
[DtsPipelineComponent(
DisplayName="MyComponent",
Description="Does some stuff",
ComponentType=ComponentType.Transform,
NoEditor=true,
IconResource="Jamiet.Ssis.MyComponent.ico"
)
Again, it compiles OK, but no icon!
Any ideas what I'm doing wrong?
Thanks
Jamie
Having in no way shape or form done this myself, looking at pg 476 of the wrox professional guide it appears what you are doing is correct (the only difference I see is the closing bracket "]" but I don't believe that is the problem)...
[DtsPipelineComponent(
|||DisplayName="ReverseString",
ComponentType="ComponentType.Transform,
IconResource="Konesans.Dts.Pipeline.ReverseString.ReverseString.ico",
UITypeName="Konesans.Dts.Pipeline.ReverseStringUI.ReverseStringUI, Konesans.Dts.Pipeline.ReverseStringUI, Version=1.1.0.0, Culture = neutral, PublicKeyToken=7b20fe705a17bed2")]
public class ReverseString : PipelineComponent
...
In the project properties for the .ico file, make sure you have Build Action set to Embedded Resource.
Also, you may need to use a fully qualified name for the icon - the full assemby name.[your icon].ico
|||cheers John. I'll give it a bash tonight.
Bothers me that there is no docs around this.
|||
jwelch wrote:
In the project properties for the .ico file, make sure you have Build Action set to Embedded Resource.
Also, you may need to use a fully qualified name for the icon - the full assemby name.[your icon].ico
Hey hey hey. It was the build action bit that I was missing.
Thanks John! Much appreciated!
No comments:
Post a Comment