本文介绍了Publicize.exe(v4.0.30319)与NullReferenceException崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有单元测试访问程序集A的私有方法。


当我尝试使用团队构建编译单元测试项目时,它会失败并在日志中显示:


  C:\Program Files\MSBuild\Microsoft\VisualStudio \v10.0 \TeamTest \ Microsoft.TeamTest.targets(14,5):错误:对象引用未设置为对象的实例


当我转到构建服务器时,我从微软错误报告中发现了这一点。


异常: NullReferenceException

消息:对象引用未设置为对象的实例。

堆栈跟踪:

  在Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(AppDomain域,ShadowerOptions选项)

  在Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(ShadowerOptions选项)

  在Microsoft.VisualStudio.TestTools.BuildShadowReferences.BuildShadowTask.Execute()


 


我正在使用MSBuild 4.0并且测试项目在vs 2010定位4.0框架访问VS2010上针对3.5框架的程序集A.


 


谢谢




JY

解决方案

I have Unit test accessing private method of assembly A.

When I try to compile the unit test project using team build, it fails and has this in log:

 C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\TeamTest\Microsoft.TeamTest.targets(14,5): error : Object reference not set to an instance of an object

When I go to the build server, i found this from microsoft error reporting.

Exception: NullReferenceException
Message: Object reference not set to an instance of an object.
Stack Trace:
   at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(AppDomain domain, ShadowerOptions options)
   at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(ShadowerOptions options)
   at Microsoft.VisualStudio.TestTools.BuildShadowReferences.BuildShadowTask.Execute()

I'm using MSBuild 4.0 and the test project is in vs 2010 targeting 4.0 framework accessing assembly A on VS2010 targeting 3.5 framework.

Thanks


JY

解决方案


这篇关于Publicize.exe(v4.0.30319)与NullReferenceException崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 23:57