发布遇到错误对象引用未设置为对象的实例诊断日志已写入以下位置 [英] publish has encountered an error Object reference not set to an instance of an object A diagnostic log has been written to following location

查看:1518
本文介绍了发布遇到错误对象引用未设置为对象的实例诊断日志已写入以下位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试发布任何项目应用程序时在我的服务器上,我收到了这个错误



发布遇到错误对象引用未设置为对象实例 已写入诊断日志到以下位置 








日志文件:

System.NullReferenceException:
对象引用未设置为对象的实例。


   at Microsoft.VisualStudio.ApplicationCapabilities.Publish.Provider.DefaultPublishTabProvider.InitializeProvider(IVsHierarchy
hierarchy)


   at Microsoft.VisualStudio.ApplicationCapabilities.Publish.Provider.DefaultPublishTabProvider。< CreateViewAsync> d__0.MoveNext()

---堆栈跟踪结束
来自抛出异常的先前位置---


   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)


   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)


   at Microsoft.VisualStudio.ApplicationCapabilities.Publish.Provider.ManagedPublishProvider。< CreateViewAsync> d__1.MoveNext()

解决方案

嗨迈克,


欢迎来到MSDN论坛。


单击"发布"选项卡时是否遇到此问题?如果创建新的ASP.NET Web应用程序并直接单击"发布"选项卡,此问题是否仍然存在?


如果所有ASP.NET应用程序都出现此问题,请尝试以管理员身份重新运行VS 2017安装程序,再修复以修复VS并再次测试。


同时,你可以尝试创建一个像Console应用程序这样的新项目并右键单击项目名称,选择'Publish'来检查其他发布功能是否正常工作。




最好的问候,


萨拉


when i try to publish any project app on my server and i got this error

publish has encountered an error Object reference not set to an instance of an object A diagnostic log has been written to following location 




Log File:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.ApplicationCapabilities.Publish.Provider.DefaultPublishTabProvider.InitializeProvider(IVsHierarchy hierarchy)
   at Microsoft.VisualStudio.ApplicationCapabilities.Publish.Provider.DefaultPublishTabProvider.<CreateViewAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ApplicationCapabilities.Publish.Provider.ManagedPublishProvider.<CreateViewAsync>d__1.MoveNext()

解决方案

Hi Mike,

Welcome to the MSDN forum.

Did you meet this issue when you click the Publish tab? If you create a new ASP.NET web application and directly click the Publish tab, does this issue persists or not?

If this issue happens for all ASP.NET applications, please try to re-run the VS 2017 installer as administrator, More-Repair to repair VS and test it again.

Meanwhile, you can try to create a new project like Console app and right-click the project name, choose ‘Publish’ to check other publish function works fine or not.

Best regards,

Sara


这篇关于发布遇到错误对象引用未设置为对象的实例诊断日志已写入以下位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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