NAnt + MSBuild (4.0) == MSBuild 启动失败并出现目录未找到错误

发布于 2024-10-11 17:44:29 字数 1829 浏览 5 评论 0原文

我已经在新的基于 VM 的构建服务器 (Win7-64 Pro) 上运行了 CC.Net 和 NAnt(以及 MSBuild)。

CC.Net 可以很好地调用 MSBuild - 但在处理项目范围构建时我遇到了问题。条件语句没有我所需要的。甚至还差得远。

因此,我决定通过使用 NAnt 调用 MSBuild 来处理这些情况,但每次都会失败。当我从命令提示符运行 nant 脚本时,我得到以下信息:

[loadtasks] Failure scanning "C:\nant\bin\extensions\common\2.0\Collection
Gen.dll" for extensions. Could not load file or assembly 'Microsoft.VSDesigner,
Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of
its dependencies. The system cannot find the file specified.
Buildfile: file:///c:/c7/projects/dyndata/dyndata.build
Target framework: Microsoft .NET Framework 4.0
Target(s) specified: build


build:

[loadtasks] Scanning directory "c:\nantcontrib\bin\lib" for extension assemblies
.
     [echo] Building DynData v7.0.7

BUILD FAILED

c:\c7\projects\dyndata\dyndata.build(24,12):
Failed to start MSBuild.
    c:\c7\projects\dyndata\dyndata.build(24,12):
    External Program Failed: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbui
ld.exe (return code was 1)

Total time: 0.4 seconds.

c:\c7\projects\dyndata\dyndata.build(24,12):
Failed to start MSBuild.
    c:\c7\projects\dyndata\dyndata.build(24,12):
    'C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe' failed to start.

        The directory name is invalid

Designer 程序集出现在这台机器上,并且安装了 VS2010 Pro。 构建文件夹是正确的。 框架文件夹是正确的。 无数次搜索 nant/msbuild,但这条消息没有产生任何实质性结果。

这些项目已尝试但未能更改结果:

Nant msbuild 任务与.net 4.0 rc

.NET 项目使用 NAnt/ 构建自动化MSBuild + SVN(虽然我使用的是 Vault)

我尝试构建 nant 代码,以便我可以通过 VS2010 的调试器调试问题,但源项目是一个无法工作的混乱,甚至不会开始构建。

欢迎提出想法:)

Ive got CC.Net and NAnt (and MSBuild) running on a new VM-based build server (Win7-64 Pro).

CC.Net can call MSBuild just fine - but I run into problems there when dealing with project-scope builds. The conditionals just dont have what I need. Not even close.

So I decide to deal with those conditions by calling MSBuild with NAnt, which fails every time. When I run the nant script from the command prompt, I get this:

[loadtasks] Failure scanning "C:\nant\bin\extensions\common\2.0\Collection
Gen.dll" for extensions. Could not load file or assembly 'Microsoft.VSDesigner,
Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of
its dependencies. The system cannot find the file specified.
Buildfile: file:///c:/c7/projects/dyndata/dyndata.build
Target framework: Microsoft .NET Framework 4.0
Target(s) specified: build


build:

[loadtasks] Scanning directory "c:\nantcontrib\bin\lib" for extension assemblies
.
     [echo] Building DynData v7.0.7

BUILD FAILED

c:\c7\projects\dyndata\dyndata.build(24,12):
Failed to start MSBuild.
    c:\c7\projects\dyndata\dyndata.build(24,12):
    External Program Failed: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbui
ld.exe (return code was 1)

Total time: 0.4 seconds.

c:\c7\projects\dyndata\dyndata.build(24,12):
Failed to start MSBuild.
    c:\c7\projects\dyndata\dyndata.build(24,12):
    'C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe' failed to start.

        The directory name is invalid

The Designer assembly is present on this machine, which has VS2010 Pro installed on it.
The build folder is correct.
The framework folder is correct.
Umpteen searches for nant/msbuild and this message have yielded nothing substantive.

These items have been tried and failed to change the results:

Nant msbuild task with .net 4.0 rc

.NET projects build automation with NAnt/MSBuild + SVN (tho I am using Vault)

I tried to build the nant code so I could debug the problem via VS2010's debugger but the source project is an unworkable mess and wont even begin to build.

Ideas are welcome:)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你穿错了嫁妆 2024-10-18 17:44:29

我认为有关 Microsoft.VSDesigner 的第一个错误只是一个警告 - 而不是失败。在我的开发盒和构建服务器上,我安装了 VS2005 和 VS2010 Pro,但没有安装 Microsoft.VSDesigner 版本 7。我安装了版本 8 和 9,但没有安装 7。

看起来“构建”目标正在 nant 中运行,然后失败了。您正在从 nantcontrib 加载任务,然后尝试启动 msbuild。你是如何启动msbuild的?你能发布启动它的 nant 文件的部分吗?你用的是什么版本的nant?使用 -v 和 -debug+ 标志运行 nant 是否显示任何有用的信息?

I think the first error about Microsoft.VSDesigner is just a warning - not a failure. On my developer box and build server I have VS2005 and VS2010 Pro installed and I do not have Microsoft.VSDesigner version 7 installed. I have version 8 and 9 installed but not 7.

It looks like the "build" target is running in nant and then then it fails. You are loading the tasks from nantcontrib then trying to start msbuild. How are you starting msbuild? Could you post the part of the nant file that starts it? What version of nant are you using? Does running nant with -v and -debug+ flags show anything helpful?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文