简体   繁体   中英

Build Failed: Visual studio 2010

When I try to compile my project on Visual Studio 2010 Professional I receive this error:

Compile complete -- 1 errors, 0 warnings Build started 15/08/2012 19:30:23. ResolveAssemblyReferences: A TargetFramework profile exclusion list will be generated. 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)\\Reference Assemblies\\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 Asse mblies\\Microsoft\\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 Processing resource file "Form1.resx" into "obj\\x86\\Debug\\WindowsFormsApplication1.Form1.resources". Processing resource file "Properties\\Resources.resx" into "obj\\x86\\Debug\\WindowsFormsApplication1.Properties.Resources.resources". GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. 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 Assem blies\\Microsoft\\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 Files (x86)\\Reference Assemblies\\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\\WindowsForm sApplication1.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\\Local\\Temp.NETFramework,Version=v4.0,Profile=Client.AssemblyAttributes.cs"

Build FAILED.

can someone help me telling me what the problem is?

I've founded solution!

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

This was the error... I forgot to delete that line of code! ;)

Usually (for me), creating a new .NET project makes the target framework default to .NET Framework 4.0 (Client Profile) - this can produce some errors (tried it myself). You can change it in the Project Options, to .NET Framework 4.0.

You can also make new projects use .NET Framework 4.0 right before you press Create, it should be at the top of the New Project window, if my memory serves me right.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM