2

我有这个问题:

Error   23  The "AssemblyInfo" task could not be loaded from the assembly AssemblyInfoTask, Version=1.0.51130.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Could not load file or assembly 'AssemblyInfoTask, Version=1.0.51130.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available.  CustomActions

有什么建议吗?

更新 #1在我的 PC 中从 SVN 复制项目后出现问题。项目是用VS 2005编写的。我已经安装了VS 2005。

更新 #2为 VS2005 安装了 SP1,它仍然无法正常工作。

更新 #3我已经像这样更改了项目文件中的行**

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

<!--  <Import Project="$(SolutionDir)eService.VersionNumber.targets" />
-->

它开始工作。因此,正如我所见,问题出在 eService.VersionNumber.targets 文件中。一切都在另一台电脑上工作,文件存在。

4

1 回答 1

0

尝试转到 Visual Studio 中的解决方案资源管理器,然后打开引用文件夹。
在那里,您应该会发现 AssemblyInfoTask 旁边有一个警告标志。
单击 AssemblyInfoTask 引用并检查属性窗口。在那里,您可以找到 Visual Studio 查找程序集的路径。
确保 AssemblyInfoTask 程序集位于 Visual Studio 正在查找的位置,或者删除引用并使用新的正确路径再次添加它。
如果这是一个项目参考,您需要确保该项目在您的解决方案中并且构建顺序正确。

于 2010-08-18T15:22:55.453 回答