English 中文(简体)
Cannot found sn.exe to sign 大 会
原标题:Cannot find sn.exe to sign Assembly
  • 时间:2009-10-08 06:06:37
  •  标签:

我查阅了<代码>C:Program filesMicrosoft.NET,我看得见任何<代码>SN.exe。

我已经安装了“NET”3.5个操作时间;没有足够时间?

最佳回答

你们需要安装Windows SDK 6.0a,而不仅仅是运行时间。

如果你安装了VS2008,就会发现它已经安装了,并且n。 这里是:

C:Program filesMicrosoft SDKsvilv6.0ABinsn.exe

否则,如果你没有安装VS2008,你可以单独下载SDK的here

SDK没有档案。 SDK目前的版本是6.1,或许在释放时将其删除。

问题回答
  • open command prompt
  • type cd
  • type dir /s sn.exe
  • 你们将获得这样的产出。

    <编码> 驱动C的批量没有标签。

    <编码> 页: 1

Directory of C:Program filesMicrosoft SDK Windowsv6.0Ain

11/07/2007  12:01 PM            95,728 sn.exe
              1 File(s)         95,728 bytes

You found the directory :)
if not, there is no sn.exe in your system. Install SDK then.

www.un.org/spanish/ga/president (And I ve +1 d Q and the receiveded A, and is not disputing their Merit in any way so 请说明,如果它没有在你的案件中适用的话)

请注意:SN.exe在实践中很少需要——上的线路。 Microft.<lang>.targets , 驱动汇编者[和AL.exe 等]所有[有效]采用 符号Assembly .proj文档中的旗帜在编造者的关键部分被计及有条件通过。 这样,它就可以在单一意义上完成所有工作(主要是出于紧迫原因)。

这一逻辑还涉及<代码>.snk和.pfx之间的区别。 钥匙(密码受到保护,并秘密进入关键集装箱)。 根据哪一种形式,则有<代码>。 KeyContainerName or KeyOriginatorFile propertysol by Microsoft.Common.targets in the RuntimeDirectory - search for ResolveKeySource.

如果你需要填写是因为你刚刚改写了大会,那么通常应当保留同样的模式,即:Mono.Cecil和工具 a la PostSharp(我假设,未经确认)一般也采用同样的论据和(或)可以在线签署。


Microsoft.Common.targets excerpt

<Target Name="ResolveKeySource" 
  Condition="$(SignManifests) ==  true  or $(SignAssembly) ==  true ">

  <ResolveKeySource ...
    KeyFile="$(AssemblyOriginatorKeyFile)"
    CertificateFile="$(ManifestKeyFile)"
    SuppressAutoClosePasswordPrompt="$(BuildingInsideVisualStudio)">
      <Output TaskParameter="ResolvedKeyFile" PropertyName="KeyOriginatorFile" ..."/>
      <Output TaskParameter="ResolvedKeyContainer" PropertyName="KeyContainerName" ... "/>

Microsoft.CSharp.targets excerpt

    <Csc  ...
          KeyContainer="$(KeyContainerName)"
          KeyFile="$(KeyOriginatorFile)" />

就完整性而言,这里是如何从方案上推断与你正在编纂的目标相关的SDK道路的(经4年测试,但同样的做法有可能回到2.0,即Microsoft.Common.targets。 一段时间以来,已经处理了这一数据:

<Target Name="ResolveSNToolPath" Condition="  true  ==  $(SignAssembly)  ">
    <PropertyGroup>
      <_SdkToolsBinDir Condition="    ==  $(_SdkToolsBinDir)  ">$(TargetFrameworkSDKToolsDirectory)</_SdkToolsBinDir>
      <SNToolPath Condition="    ==  $(SNToolPath)  ">$(_SdkToolsBinDir)SN.exe</SNToolPath>
    </PropertyGroup>
    <Error Condition="  true  ==  $(SignAssembly)  AND !EXISTS(  $(SNToolPath)  )"
      Text="In order to resign the assembly, this package requires access to the SN.EXE tool from the Windows Platform SDK, which was not found.

The location derived was &quot;$(SNToolPath)&quot;.

Please either:
1) supply a correct path to your SDK Tools bin directory containing SN.EXE by setting %24(_SdkToolsBinDir) or %24(TargetFrameworkSDKToolsDirectory)
OR
2) supply a correct complete path to your SN.EXE signing tool by setting %24(SNToolPath)" />
  </Target>

从整体上看,你将如何利用这一进程的产出来管理SN。

<Target Name="ResignMyAssembly" Condition="$(SignAssembly) ==  true ">
  <Exec Condition="  $(KeyContainerName)  !=    " 
    Command="&quot;$(SNToolPath)&quot; -Rca &quot;@(MyAssembly)&quot; &quot;$(KeyContainerName)&quot; " />
  <Exec Condition="  $(KeyContainerName)  ==    " 
    Command="&quot;$(SlpsSdkProtectSnTool)&quot; -Ra &quot;@(MyAssembly)&quot; &quot;$(KeyOriginatorFile)&quot; " />

For VS2017 path was changed to: C:Program Files (x86)Microsoft SDKsWindowsvXinNETFX X.X.X Tools.

<>Simply>:

在窗户(浏览B8.1A.路面的改动)上,改为=和;

C:Program Files (x86)Microsoft SDKsWindowsv8.1AinNETFX 4.5.1 Tools

www.un.org/Depts/DGACM/index_french.htm

sn -i D:XXMYProject.UI.apiMYProject.Gatewaymy_certificate.pfx VS_KEY_AD6FD8AFB39B6C43

如果其密码受到保护,而不是它想要打上纸张的话。

Nope,与你一样,认为SDK需要:

FYI, 运行时间本身不设C:Program filesMicrosoft.NET——其所有档案都[仅]在<条码>下生活:WindowsMicrosoft.NETvXXX

VS2019的道路是C:Program 文件(x86)Microsoft SDK Windowsv10.0AinNET 4.7.2 工具x64sn.exe

现在仍然无法及时使用甚高频指挥系统。 它向我发出类似信息。

** Visual Studio 2017 Developer Command Prompt v15.8.9 ** Copyright (c) 2017 Microsoft Corporation

[vcvarsall.bat] 初步环境:x64

C:Program Files (x86)Microsoft Visual Studio2017Community>where sn.exe INFO: Could not find files for the given pattern(s).





相关问题
热门标签