2010-04-24 78 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