You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my system, sn is not recognized as a command, so I have to use the full path to the sn.exe. The strong name tool is located in different locations unter C:\Program Files (x86)\Microsoft SDKs\Windows\. My system is a standard Win7 Professional installation with only VS2015 and VS2017 installed. So I can't assume to that sn is a recognized command on other systems.
I don't know if an Roslyn-Analyser is allowed to call an external programs. I know that analysers get scanned when I upload them to the market place. But it should be possible to call sn.exe, if I know the correct location of sn.exe.
The path to the assembly that should be referenced, is part of the Roslyn project object. Thus I can get it easily, but the file might not exists yet (either the project itself was just created or cleaned recently). So I can't guarantee that I can retrieve the public key at all.
I don't know if I installed Windows SDKs by myself or if they got installed via Windows Update or Visual Studio. So I currently can't assume that the program is installed on every system where the analyser runs.
Due to this blog post, I can retrieve these path by locking in the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\
My registry:
But my Microsoft SDKs folder shows more installed SDKs, so looking at the registry is no foolproof way the get the path to the strong name tool.
The only solution I see is, to make the path to sn.exe configurable within the extension. If the path is not configured, you can't use this extensions for signed assemblies. But I don't like tools that have to be configured before I can use them. Furthermore I can't see a reliable way to retrieve the public key, if the *.dll not exist yet.
Maybe you have some ideas how to solve the problem.
Please add support for strong named projects.
The text was updated successfully, but these errors were encountered: