Car*_*l R 5 c# msbuild windows-mobile visual-studio-2008 visual-studio
我有一个小型的Windows移动应用程序,大约有25个表单,可能有50个类别分成3个项目.当我正在构建项目时,在调试模式下,正常的CTRL-SHIFT-B 需要25到40分钟.
我已经尝试过跳过平台验证黑客,但它似乎没有帮助.
环境是VS 2008
Windows Mobile 6.5.3
Compact Framework 2.0
<ProductVersion>9.0.30729</ProductVersion>
<OSVersion>5.02</OSVersion>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<NativePlatformName>Windows Mobile 6.5.3 Professional DTK</NativePlatformName>
Run Code Online (Sandbox Code Playgroud)
这台电脑是HP EliteBook 8440p,带有i3 @ 2,4Ghz,4gb内存.
有很多Ram可用(使用2,2 Gb).
编译期间CPU使用率约为25%.
当我构建时,visual studio及其所有子窗口在95%的时间内都是空白的.
事件查看器不会显示任何特定警告,例如坏硬盘等.
更新1
在进程监视器跟踪中,我可以看到在构建期间devenv.exe中存在常规网络活动.VSS可能与构建有关吗?(我通过今天在旁路模式下使用的vpn隧道到达vss-repository.)
首先是好消息:您可以缩短漫长的构建时间,
这里我们来说说“坏消息”,即工作:
构建过程中的常见问题:
Run when build updates the project output项目的 BuildEvents 属性中的 来调用 PostBuild 事件。您可以使用Visual Studio 宏来启动当前打开的解决方案的 MSBUILD:
Public Module Builder
Sub BuildSolutionDebug()
SaveAll()
Run("", "C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe", """" & GetSolutionName() & """ /t:ReBuild /p:Configuration=Debug /p:Platform=""Mixed Platforms""")
End Sub
Sub Run(ByVal folder As String, ByVal file As String, ByVal arguments As String)
Dim process As New System.Diagnostics.Process()
process.Start(System.IO.Path.Combine(folder, file), arguments)
Try
process.WaitForExit()
Catch ex As Exception
End Try
End Sub
Sub SaveAll()
DTE.ExecuteCommand("File.SaveAll")
End Sub
Function GetSolutionName() As String
Return DTE.Solution.FullName
End Function
End Module
Run Code Online (Sandbox Code Playgroud)
如果您还有其他问题或想讨论某一点,请与我联系。我很乐意帮助你。
我也很喜欢阅读您对问题的解决方案,以及您的构建在哪一点上很慢!
| 归档时间: |
|
| 查看次数: |
1589 次 |
| 最近记录: |