VS 2008专业版,智能设备的.NET C#项目 - 建设缓慢 [英] VS 2008 Professional, Smart Device .NET C# project - slow build

查看:306
本文介绍了VS 2008专业版,智能设备的.NET C#项目 - 建设缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有VS 2008专业版和智能设备的.NET C#项目。我总共有100〜CS文件。构建需要很长的时间,我必须等待连接约。 1分钟(60秒)我每次编译项目。我有酷睿i3,4GB内存,7200转硬盘。

I have VS 2008 Professional and a Smart Device .NET C# project. I have ~100 cs files in total. The build takes a very long time, I have to wait for linker approx. 1min (60s) every time I compile the project. I have Core i3, 4GB RAM, 7200rpm disk.

什么原因造成这一点,我怎么能优化构建?任何Visual Studio选项?

What causes this and how can I optimize the build? Any Visual Studio options?

推荐答案

如果您按照从汉斯帕桑特的评论的建议和设置的MSBuild诊断输出会给出一个更清晰只是什么抽空图片。如果你发现你的版本是挂在授权编译器(LC.exe),那么这可能是由于它试图调用服务器和超时。你可以改变你的machine.config解决这个 -

If you follow the advise from Hans Passant's comment and set MSBuild to diagnostic output it will give a clearer picture of just what is taking the time. If you find that your build is hanging on the Licensing Compiler (LC.exe) then this could be due to it trying to call a server and timing out. You can resolve this by altering your machine.config -

编辑c:\windows\microsoft.net\framework\v2.0.50727\config\ machine.config中,并添加以下项:

edit c:\windows\microsoft.net\framework\v2.0.50727\config\machine.config, and add the following key:

  <configuration>
    <runtime>
      <generatePublisherEvidence enabled="false"/>



编辑://

//

根据我下面的注释做了一个小挖。该平台的验证任务都有它运行速度非常慢VS2008中的一个已知的问题。它的更多细节可以在这里找到:

Based on the comment below I did a little digging. The platform verification task has a known issue where it runs very slowly in VS2008. More detail on it can be found here:

http://blogs.msdn.com/b/vsdteam/archive/2006/09/15/756400.aspx

围绕这一办法是禁止在构建任务本身。要做到这一点

One way around this is to disable the task itself in your build. To do this

1)打开文件:

%windir%\Microsoft.NET\Framework\v2.0.50727\Microsoft.CompactFramework.Common.Targets



< 。p>编辑

for editing.

2)进入该行:

Name="PlatformVerificationTask">

和其更改为:

Name="PlatformVerificationTask" Condition="'$(SkipPlatformVerification)' != 'true'">



3)SkipPlatformVerification环境变量添加到系统中,并将其设置为true(要重新使平台验证设置环境变量假)。如果你需要设置一个环境变量阅读 http://vlaurie.com/computers2/Articles/environment.htm。如果你不希望添加一个环境变量可以交换的条件的东西是始终为false(即条件='真'=='假')

3) Add the SkipPlatformVerification environment variable to the system and set it to "true" (To re-enable Platform Verification set the environment variable to "false"). If you need help on setting up an environment variable read http://vlaurie.com/computers2/Articles/environment.htm. If you don't want to add an environment variable you can swap the condition for something that is always false (i.e. Condition="'true' == 'false'")

这篇关于VS 2008专业版,智能设备的.NET C#项目 - 建设缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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