且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio安装和部署构建失败,并没有错误

更新时间:2023-01-15 10:47:08

在最后的答案是,它是一个已知的bug:https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=317870

答案是修改项目文件(* .csproj的)含有的LINQ to SQL的dbml文件,删除一些东西,如下:

  
      
  1. 在关闭Visual Studio 2008。
  2.   
  3. 打开包含的LINQ to SQL项目在记事本中的项目文件。
  4.   
  5. 删除以下行:
      [ItemGroup]
       [服务包括={3259AA49-8AA1-44D3-9025-A0B520596A8C}/]
      [/ ItemGroup]
  6.   
     

安装项目现在建设   成功。但是,如果   双击该DBML文件打开   设计师在VS 2008的安装项目   将再次停止建设。以上   行做的没有的获得重新加入   项目文件,但安装项目   将停止反正建设。只是   重新启动VS 2008,它会重新工作    - 直到你再次打开DBML设计师。一旦安装项目失败   由于这一问题,将从未   建立成功后,直到你   重新启动VS 2008。

我终于找到了答案(或至少是链接到的答案)从MS连接论坛主题。这里的documented解决方法。

I have a setup and deployment project that, on our build server, reports the following in the summary:

========== Rebuild All: 25 succeeded, 2 failed, 0 skipped ==========

I don't know what the two are that failed, though I believe one of them is the vdproj project because if I run the build without the installer there are no errors reported at all. The "packaging file" messages match the output on my PC, where the build completes successfully.

I'm convinced it's an environment thing, just that there are no logs anywhere that say what the problem was - just the number in the summary.

Even stranger is that the setup.exe and myapp.msi files appear to be generated fine. I can't work out what the projects are that failed, because there's no mention of a failed project. All I know is that if I build the solution excluding the setup project the summary says there were no errors.

Can anyone think of anything to check?

The answer in the end was that it is a known bug: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=317870

The answer is to modify project files (*.csproj) containing LINQ to SQL dbml files to remove some stuff, as follows:

  1. Close VS 2008.
  2. Open the project file containing the LINQ To SQL item in Notepad.
  3. Remove the following lines:
    [ItemGroup]
    [Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}"/]
    [/ItemGroup]

The Setup Project will now build successfully. However, if you double-click the DBML file to open the designer in VS 2008 the Setup Project will stop building again. The above lines do not get re-added to the project file but the Setup Project will stop building anyway. Just restart VS 2008 and it will work again -- until you open the DBML designer again. Once the Setup Project fails due to this problem it will never build successfully until after you restart VS 2008.

I eventually found the answer (or at least the link to the answer) from the MS Connect forum topic. Here's the documented workaround.