[GH-ISSUE #25] Skipping an executable #20

Closed
opened 2026-02-25 21:30:28 +03:00 by kerem · 4 comments
Owner

Originally created by @gsmeets on GitHub (Aug 8, 2016).
Original GitHub issue: https://github.com/brutaldev/StrongNameSigner/issues/25

Originally assigned to: @brutaldev on GitHub.

Is there a way to skip one particular executable from being signed?
I have phantomjs inside of a vsix project, but it keeps spitting out 150+ warnings over it every time I compile.

Originally created by @gsmeets on GitHub (Aug 8, 2016). Original GitHub issue: https://github.com/brutaldev/StrongNameSigner/issues/25 Originally assigned to: @brutaldev on GitHub. Is there a way to skip one particular executable from being signed? I have phantomjs inside of a vsix project, but it keeps spitting out 150+ warnings over it every time I compile.
kerem 2026-02-25 21:30:28 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@brutaldev commented on GitHub (Aug 9, 2016):

Unfortunately there is no mechanism to exclude specific files or patterns from the signing process. As a workaround, I can suggest just being more strict about which files/directories you want to include instead.

<!-- gh-comment-id:238467944 --> @brutaldev commented on GitHub (Aug 9, 2016): Unfortunately there is no mechanism to exclude specific files or patterns from the signing process. As a workaround, I can suggest just being more strict about which files/directories you want to include instead.
Author
Owner

@gsmeets commented on GitHub (Aug 9, 2016):

well, I need to bundle that executable in my vsix. So I don't have a choice really I think. How does it determine which files to convert? Can I perhaps add the executable to a solution folder and copy it in a later build step or something similar? Right now it's just included as a file in one of my projects.

<!-- gh-comment-id:238527892 --> @gsmeets commented on GitHub (Aug 9, 2016): well, I need to bundle that executable in my vsix. So I don't have a choice really I think. How does it determine which files to convert? Can I perhaps add the executable to a solution folder and copy it in a later build step or something similar? Right now it's just included as a file in one of my projects.
Author
Owner

@brutaldev commented on GitHub (Aug 9, 2016):

Bundling it in your VSIX installer doesn't mean it needs to get signed. The PhantomJS executable is not a .NET assembly so trying to sign it will fail.

By default all assembly types (exe and dll) will be included recursively in the signing process. However, you can specify in great detail which files you actually want to sign which is recommended for speed.

If you take a look at the readme you'll see that you can use wild patterns in the path you are including, you can also separate multiple paths with pipe | character. You should try and include only the directories with assemblies that actually need to be signed as well as their dependencies.

Let's assume you use a directory called "release" where all the files are that you are signing right now. If you don't have any executables that need signing, you can just include dll's by using the pattern .\release\*\*.dll. That will effectively ignore the PhantomJS executable and any others as well. Ideally you should be more specific though and only sign assemblies that need to be signed. You can provide just these directories such as .\release\*\someframework\v4.*\lib|.\release\anotherframework\net40 separating multiple locations with pipes and making liberal use of wild cards.

I'm not sure what your process is, whether you're using the API, console application or the UI, but at some point you need to point to a directory location you want to sign. You can be quite flexible about what to include and you don't need to just point at a giant directory of files which is also inefficient. Because you can be explicit about what to sign, it's unlikely you will ever need a way to exclude files.

<!-- gh-comment-id:238623710 --> @brutaldev commented on GitHub (Aug 9, 2016): Bundling it in your VSIX installer doesn't mean it needs to get signed. The PhantomJS executable is not a .NET assembly so trying to sign it will fail. By default all assembly types (exe and dll) will be included recursively in the signing process. However, you can specify in great detail which files you actually want to sign which is recommended for speed. If you take a look at the [readme](https://github.com/brutaldev/StrongNameSigner/blob/master/README.md) you'll see that you can use wild patterns in the path you are including, you can also separate multiple paths with pipe `|` character. You should try and include only the directories with assemblies that actually need to be signed as well as their [dependencies](https://github.com/brutaldev/StrongNameSigner/blob/master/README.md#dealing-with-dependencies). Let's assume you use a directory called "release" where all the files are that you are signing right now. If you don't have any executables that need signing, you can just include dll's by using the pattern `.\release\*\*.dll`. That will effectively ignore the PhantomJS executable and any others as well. Ideally you should be more specific though and only sign assemblies that need to be signed. You can provide just these directories such as `.\release\*\someframework\v4.*\lib|.\release\anotherframework\net40` separating multiple locations with pipes and making liberal use of wild cards. I'm not sure what your process is, whether you're using the API, console application or the UI, but at some point you need to point to a directory location you want to sign. You can be quite flexible about what to include and you don't need to just point at a giant directory of files which is also inefficient. Because you can be explicit about what to sign, it's unlikely you will ever need a way to exclude files.
Author
Owner

@gsmeets commented on GitHub (Aug 9, 2016):

Ah okay. Thanks. I just followed the how to and copied in a line in my post build command. Didn't realize that line actually had a file glob pattern in it. :)

<!-- gh-comment-id:238633037 --> @gsmeets commented on GitHub (Aug 9, 2016): Ah okay. Thanks. I just followed the how to and copied in a line in my post build command. Didn't realize that line actually had a file glob pattern in it. :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/StrongNameSigner#20
No description provided.