构建失败:Visual Studio 2010

时间:2012-08-15 17:37:58

标签: c# visual-studio visual-studio-2010 build

当我尝试在Visual Studio 2010 Professional上编译项目时,收到此错误:

  

编译完成 - 1个错误,0个警告   Build build 15/08/2012 19:30:23。   ResolveAssemblyReferences:     将生成TargetFramework配置文件排除列表。   CoreResGen:     “c:\ Program Files(x86)\ Microsoft SDKs \ Windows \ v7.0A \ bin \ NETFX 4.0 Tools \ resgen.exe”/ useSourcePath / r:“C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework .NETFramework \ v4.0 \ Profile \ Client \ Microsoft.CSharp.dll“/ r:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ mscorlib.dll “/ r:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Core.dll“/ r:”C:\ Program Files(x86)\参考程序集\ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Data.DataSetExtensions.dll“/ r:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Data.dll“/ r:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Deployment.dll“/ r: “C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.dll”/ r:“C:\ Program Files(x86)\ Reference Assemblies \ Micro soft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Drawing.dll“/ r:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Windows.Forms.dll“/ r:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Xml.dll“/ r:”C: \ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Xml.Linq.dll“/ r:”C:\ Program Files(x86)\ TaoFramework \ bin \ Tao .FreeGlut.dll“/ r:”C:\ Program Files(x86)\ TaoFramework \ bin \ Tao.OpenGl.dll“/ r:”C:\ Program Files(x86)\ TaoFramework \ bin \ Tao.Platform.Windows .dll“/ compile Form1.resx,obj \ x86 \ Debug \ WindowsFormsApplication1.Form1.resources Properties \ Resources.resx,obj \ x86 \ Debug \ WindowsFormsApplication1.Properties.Resources.resources     将资源文件“Form1.resx”处理为“obj \ x86 \ Debug \ WindowsFormsApplication1.Form1.resources”。     将资源文件“Properties \ Resources.resx”处理为“obj \ x86 \ Debug \ WindowsFormsApplication1.Properties.Resources.resources”。   GenerateTargetFrameworkMonikerAttribute:   跳过目标“GenerateTargetFrameworkMonikerAttribute”,因为所有输出文件都是相对于输入文件的最新文件。   CoreCompile:     C:\ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Csc.exe / noconfig / nowarn:1701,1702 / nostdlib + / platform:x86 / errorreport:prompt / warn:4 / define:DEBUG; TRACE / reference:“ C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ Microsoft.CSharp.dll“/ reference:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ mscorlib.dll“/ reference:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Core。 dll“/ reference:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Data.DataSetExtensions.dll“/ reference:”C:\ Program Files( x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Data.dll“/ reference:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4。 0 \ Profile \ Client \ System.Deployment.dll“/ reference:”C:\ Program Files(x86)\ Reference Assemblies \ Microso ft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.dll“/ reference:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System。 Drawing.dll“/ reference:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Windows.Forms.dll“/ reference:”C:\ Program文件(x86)\参考程序集\ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Xml.dll“/ reference:”C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ Profile \ Client \ System.Xml.Linq.dll“/ reference:”C:\ Program Files(x86)\ TaoFramework \ bin \ Tao.FreeGlut.dll“/ reference:”C:\ Program Files(x86 )\ TaoFramework \ bin \ Tao.OpenGl.dll“/ reference:”C:\ Program Files(x86)\ TaoFramework \ bin \ Tao.Platform.Windows.dll“/ debug + / debug:full / filealign:512 / optimize- /out:obj\x86\Debug\WindowsFormsApplication1.exe /resource:obj\x86\Debug\WindowsFormsApplication1.Form1.resources / resource:obj \ x86 \ Debug \ WindowsFormsApplication1 .Properties.Resources.resources / target:winexe Form1.cs Form1.Designer.cs Program.cs Properties \ AssemblyInfo.cs Properties \ Resources.Designer.cs Properties \ Settings.Designer.cs“C:\ Users \ Antonino Saitta \ AppData \本地\ Temp.NETFramework,版本= 4.0版,档案= Client.AssemblyAttributes.cs“

构建失败。

有人可以帮我告诉我这是什么问题吗?

2 个答案:

答案 0 :(得分:1)

我已经找到了解决方案!

this.Load += new System.EventHandler(this.Form1_Load);

这是错误......我忘了删除那行代码! ;)

答案 1 :(得分:0)

通常(对我而言),创建一个新的.NET项目会使目标框架默认为.NET Framework 4.0(客户端配置文件) - 这会产生一些错误(我自己尝试过)。您可以在“项目选项”中将其更改为.NET Framework 4.0。

您也可以在按下Create之前使新项目使用.NET Framework 4.0,如果我的记忆能够正确使用,它应该位于New Project窗口的顶部。