2010-04-24 79 views
0

我們有兩個項目的解決方案,其中一個是嵌入在另一個ASP.NET MVC項目中的Silverlight 3應用程序。最近剛剛出現一個錯誤,導致構建失敗。下面是輸出:Windows 7上VS2008的奇怪錯誤

 
`------ Build started: Project: DotCoquiMap, Configuration: Debug Any CPU ------ 
C:\Program Files\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Ria.Client.targets : warning : Could not find necessary input file 'C:\Users\Michael\Documents\DotCoqui\trunk\DotCoquiMap\Bin\Debug\DotCoquiMap.dll'. 
Done building project "DotCoquiMap.csproj" -- FAILED. 
------ Build started: Project: DotCoquiProject, Configuration: Debug Any CPU ------ 
C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:C:\Users\Michael\Documents\DotCoqui\trunk\DotCoquiMap\Bin\Debug\DotCoquiMap.dll /reference:..\ExternalLibraries\itextsharp.dll /reference:..\ExternalLibraries\MvcMembership.dll /reference:..\ExternalLibraries\PagedList.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Configuration.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.Linq.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Abstractions.dll" /reference:..\..\..\..\..\..\Windows\assembly\GAC_MSIL\System.Web.DataVisualization\3.5.0.0__31bf3856ad364e35\System.Web.DataVisualization.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Mobile.dll /reference:"C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 1.0\Assemblies\System.Web.Mvc.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Routing.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug+ /debug:full /optimize- /out:obj\Debug\DotCoquiProject.dll /target:library Controllers\AccountController.cs Controllers\AdministrationController.cs Controllers\ApiController.cs Controllers\CampaignsCategoriesController.cs Controllers\CampaignsController.cs Controllers\CampaignsFormViewModel.cs Controllers\CampaignStatisticsController.cs Controllers\CampaignStatisticsDetailsViewModel.cs Controllers\ControllerHelpers.cs Controllers\CountriesController.cs Controllers\ErrorController.cs Controllers\HomeController.cs Controllers\MapController.cs Controllers\MediaController.cs Controllers\MediaViewModel.cs Controllers\NewsController.cs Controllers\OrganizationsController.cs Controllers\OrgCenterController.cs Controllers\UserAdministrationController.cs Default.aspx.cs Global.asax.cs Models\Campaigns.cs Models\CategoriesRuleValidation.cs Models\DotCoquiDBModel.designer.cs Models\DotCoquiRepository.cs Models\DQcodes.cs Models\FileRepository.cs Models\ISmtpClient.cs Models\JsonModels.cs Models\OrgCenter\IndexViewModel.cs Models\SmtpClientProxy.cs Models\Statistic.cs Models\User.cs Models\UserAdministration\DetailsViewModel.cs Models\UserAdministration\IndexViewModel.cs Models\UserAdministration\RoleViewModel.cs Properties\AssemblyInfo.cs 
error CS0006: Metadata file 'C:\Users\Michael\Documents\DotCoqui\trunk\DotCoquiMap\Bin\Debug\DotCoquiMap.dll' could not be found 

Compile complete -- 1 errors, 0 warnings 
========== Build: 0 succeeded or up-to-date, 2 failed, 0 skipped ==========` 


And here is the errors/warnings: 

Warning 2 Could not find necessary input file 'C:\Users\Michael\Documents\DotCoqui\trunk\DotCoquiMap\Bin\Debug\DotCoquiMap.dll'. DotCoquiMap 

Error 1 Metadata file 'C:\Users\Michael\Documents\DotCoqui\trunk\DotCoquiMap\Bin\Debug\DotCoquiMap.dll' could not be found DotCoquiProject 

的DotCoquiMap是沒有得到,而內建的DotCoquiProject(ASP.NET MVC)無法找到該.dll。

現在,這是真的很奇怪的事情,在Windows XP下,非常相同的代碼編譯和運行完美....在Windows 7下,它給了我們這些錯誤。這是完全相同的代碼,我們已經在3臺不同的Win7機器上進行了測試,但無濟於事。

幫助將非常有幫助。提前致謝。

+0

我的眼睛在流血 – 2010-04-24 16:43:33

+0

我的眼睛在流血。漂亮的代碼格式嗎? – 2010-04-24 16:46:37

+0

我是新來的stackoverflow,我怎麼能「漂亮」? – Christian 2010-04-24 16:52:18

回答

0

嘗試重新編譯DotCoquiMap項目的所有項目引用並檢查程序集引用(或添加\刪除它們)。

另一種方式是重建每個項目(通過在Solution Explorer中右鍵單擊按鈕)從最低到最高依賴

+0

已經嘗試過,DotCoquiMap項目不會生成,並且這是DotCoquiProject依賴的項目。 – Christian 2010-04-24 19:11:51

+0

奇怪的是,完全相同的項目通常在Windows XP上構建,而不是在Win7上構建。 – Christian 2010-04-24 19:14:33

+0

關閉UAC,重啓並嘗試重建。同時檢查所有輸出目錄是否存在寫入權限 – 2010-04-25 07:21:50

0

嘗試建立從不同的目錄中的項目,除了您的個人文件夾。可能存在安全權限問題。

+0

你推薦哪個其他文件夾?我們嘗試在根目錄C: \和相同的錯誤 – Christian 2010-04-24 19:09:09

+0

如果是這樣的話,那麼這可能不是問題。在Windows 7和Vista中,文件夾權限更具限制性,所以這有時會導致在XP下不顯示的問題。 – 2010-04-24 19:40:22