Passwords 每次开发人员从TFS解决方案中提取分支时都必须重新输入PFX密码?

Passwords 每次开发人员从TFS解决方案中提取分支时都必须重新输入PFX密码?,passwords,clickonce,pfx,strong-named-key,Passwords,Clickonce,Pfx,Strong Named Key,我的解决方案中有11个DLL必须使用PFX证书(非常大的企业应用程序使用Click Once安装)。证书工作正常,除非每次有人从不同的开发人员/工作站拉下TFS分支时,证书密码无效,并且他们收到: 错误:无法导入以下密钥文件:CertificateName.pfx。密钥文件可能受密码保护。要更正此问题,请尝试再次导入证书,或使用以下密钥容器名称手动将证书安装到强名称CSP:VS_key_DB583A44F66CCF4B AssemblyName 强制他们为所有11个程序集重新输入相同的密码。对于

我的解决方案中有11个DLL必须使用PFX证书(非常大的企业应用程序使用Click Once安装)。证书工作正常,除非每次有人从不同的开发人员/工作站拉下TFS分支时,证书密码无效,并且他们收到:

错误:无法导入以下密钥文件:CertificateName.pfx。密钥文件可能受密码保护。要更正此问题,请尝试再次导入证书,或使用以下密钥容器名称手动将证书安装到强名称CSP:VS_key_DB583A44F66CCF4B AssemblyName

强制他们为所有11个程序集重新输入相同的密码。对于这个非常耗时的繁琐问题,什么是解决方案/修复方案


我知道从不同的工作站输入相同的密码会使用本地值生成不同的密钥,但我确信我不是第一个出现此问题的人。

通过阻止.pfx文件被检入并从TFS中带下来解决了此问题。出现了三种可能的解决办法:

  • 禁止模式策略使用服务器TFS电动工具

    stackoverflow.com/questions/274142/planded-patterns-check-in-policy-in-tfs-2010

    msdn.microsoft.com/en-us/library/gg475890%28v=vs.100%29.aspx

  • TFS“隐形”

    stackoverflow.com/questions/29808807/how-to-clope-directories-in-tfs-command-line

  • .tfignore(所选解决方案)

  • 最后,我发现,.tfignore是最好的解决方案。.tfignore是通过在挂起的更改页面的排除部分选择“检测到的更改链接”,然后从pfx文件的快捷菜单中选择按扩展名忽略(*.pfx)自动生成的

    .tfignore被引入到映射工作区的根目录中,因此在下一次从TFS提取时,此规则将立即应用到每个开发人员的工作区

        ################################################################################
    # This .tfignore file was automatically created by Microsoft(R) Visual Studio.
    #
    # Local items matching filespecs in this file will not be added to version
    # control. This file can be checked in to share exclusions with others.
    #
    # Wildcard characters are * and ?. Patterns are matched recursively unless the
    # pattern is prefixed by the \ character.
    #
    # You can prepend a path to a pattern to make it more specific. If you do,
    # wildcard characters are not permitted in the path portion.
    #
    # The # character at the beginning of a line indicates a comment.
    #
    # The ! prefix negates a pattern. This can be used to re-include an item after
    # it was excluded by a .tfignore file higher in the tree, or by the Team
    # Project Collection's global exclusions list.
    #
    # The / character is interpreted as a \ character on Windows platforms.
    #
    # Examples:
    #
    #  # Excludes all files ending in .txt in Alpha\Beta and all its subfolders.
    #  Alpha\Beta\*.txt
    #
    #  # Excludes all files ending in .cpp in this folder only.
    #  \*.cpp
    #
    #  # Excludes all files ending in .cpp in this folder and all subfolders.
    #  *.cpp
    #
    #  # If "Contoso" is a folder, then Contoso and all its children are excluded.
    #  # If it is a file, then only the "Contoso" in this folder is excluded.
    #  \Contoso
    #
    #  # If Help.exe is excluded by a higher .tfignore file or by the Team Project
    #  # Collection global exclusions list, then this pattern re-includes it in
    #  # this folder only.
    #  !\Help.exe    
    #
    ################################################################################
    
    *.pfx