发布我的项目时出错 [英] Bug while publishing my project

查看:82
本文介绍了发布我的项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一个简单的项目。我在发布时收到错误



错误是:



1.无法发布因为项目未能构建

2.SignFile任务意外失败。

System.ArgumentNullException:值不能为空。

参数名称:path1
(String path1,String path2,String path3)

at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.GetPathToTool()

at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignPEFile(X509Certificate2 cert,Uri timestampUrl,String path,ResourceManager resources,Boolean useSha256)

at Microsoft.Build.Tasks .Deployment.ManifestUtilities.SecurityUtilities.SignFile(X509Certificate2 cert,Uri timestampUrl,String path)

at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignFile(String certThumbprint,Uri timestampUrl,String path)

at Microsoft.Build.Tasks.SignFile.Execute()

at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

在Microsoft。 Build.BackEnd.TaskBuilder。< executeinstantiatedtask> d__20.MoveNext()





我收到此错误



我清理了解决方案然后我构建并重建应用程序,通过单击项目发布。也尝试从菜单发布仍然得到相同的错误





提前谢谢

解决方案

可能VS很困惑。



做一个干净的,因为你已经准备好

关闭VS.

再次打开它。

做另一个清洁,然后重建所有。



希望它会自行解决。

如果还没有 - 那么你必须开始玩愚蠢的bug并移除整个代码并再次尝试直到它工作。


好的,通过这样做你的名称不会出现在设置中,但如果您只想发布,它就可以。



1.右键单击项目名称(例如:wpfapplication1)并选择礼节

2.选择签名

3.取消选中签署clickonce清单(这将使设置作为未知发布者运行)

4.选中登录程序集并选择new,并在其中输入名称

I have done a simple project. I am getting error while publishing

Error is:

1. cannot publish because a project failed to build
2. The "SignFile" task failed unexpectedly.
System.ArgumentNullException: Value cannot be null.
Parameter name: path1
at System.IO.Path.Combine(String path1, String path2, String path3)
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.GetPathToTool()
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignPEFile(X509Certificate2 cert, Uri timestampUrl, String path, ResourceManager resources, Boolean useSha256)
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignFile(X509Certificate2 cert, Uri timestampUrl, String path)
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignFile(String certThumbprint, Uri timestampUrl, String path)
at Microsoft.Build.Tasks.SignFile.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<executeinstantiatedtask>d__20.MoveNext()


I am getting this error

I cleaned solution then I build and rebuild application, published by clicking project - publish. Also tried publishing from menu still getting same error


Thanks in advance

解决方案

Probably VS has got confused.

Do a Clean, as you have allready
Close down VS.
Open it again.
Do another Clean, then rebuild all.

Hopefully, it will have sorted itself out.
If it hasn't - then you have to start playing silly buggers and remove whole swathes of code and trying again until it works.


Ok, by doing this your name won't appear in setup, but if you want just to be able to publish, it will do.

1. Right click Project name (ex: wpfapplication1) and select proprieties
2. Select signing
3. Uncheck "sign the clickonce manifest" (this will make the setup run as unknown publisher)
4. Check "sign in assembly" and select new, and put name there


这篇关于发布我的项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆