启动ClickOnce设置时出现此错误.它说'不能继续.该应用程序格式不正确.
编辑:这发生在Visual Studio 2013 Update 4(2013.4)之后
这是我创建文件的方式:
mage -New Application -ToFile "$BinSingleEscape\Release\$ProductNameFile.exe.manifest" -Name "$ProductName" -Version $Version -FromDirectory "$BinSingleEscape\Release" -IconFile "Icon.ico" -SupportURL "$SupportUrl" -UseManifestForTrust true -Publisher "$PublisherCompany" -TimestampUri http://timestamp.verisign.com/scripts/timstamp.dll
mage -Sign "$BinSingleEscape\Release\$ProductNameFile.exe.manifest" -CertHash "d00...66f" -TimestampUri http://timestamp.verisign.com/scripts/timstamp.dll
mage -New Deployment -Install true -AppCodeBase "$Version\$ProductNameFile.exe.manifest" -Name "$ProductNameFile" -Publisher "$PublisherCompany" -AppManifest "$BinSingleEscape\Release\$ProductNameFile.exe.manifest" -ProviderUrl "$InstallUrl/$ProductNameFile.application" -Version $Version -ToFile "$BinSingleEscape\Deploy\$ProductNameFile.application" -SupportURL "$SupportUrl" -TimestampUri http://timestamp.verisign.com/scripts/timstamp.dll
mage -Sign "$BinSingleEscape\Deploy\$ProductNameFile.application" -CertHash "d00...66f" -TimestampUri http://timestamp.verisign.com/scripts/timstamp.dll
Run Code Online (Sandbox Code Playgroud)
错误的详细信息:
ERROR SUMMARY
Below is a summary of the errors, details of these errors are …Run Code Online (Sandbox Code Playgroud) 有没有办法默认为每个项目激活Visual Studio 2012的代码分析功能?并且,如果可能,默认情况下将规则设置为"Microsoft All Rules".
每次创建新项目时,我都必须在项目属性中手动激活"在构建时启用代码分析",并且必须将规则设置为所有规则.有时我会忘记这样做,并且必须解决更多问题.如果它默认激活我可以防止.
纯方法定义为" 不进行任何可见的状态更改 ".
如果一个参数为null或抛出异常,我的方法是编写日志消息.它还是纯净的吗?写入记录器是否有明显变化?
这是代码:
/// <summary>
/// Formats with invariant culture - won't throw an exception.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="args">An object array that contains zero or more objects to format.</param>
/// <returns>A copy of format in which the format items have been replaced by the string representation of the corresponding objects in args.</returns>
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "CyanCor.Core.Logging.Log.ExceptionPrevent(System.String,System.String,System.Int32,System.String)", Justification = "It is for the logger (riedl)")] …Run Code Online (Sandbox Code Playgroud) 对于自动化网站部署的小工具,我想生成.htaccess和.htpasswd文件.如何在代码中为密码创建哈希值?