【发布时间】:2012-08-12 00:57:27
【问题描述】:
当我尝试在 Visual Studio 2010 Professional 上编译我的项目时,我收到此错误:
编译完成 -- 1 个错误,0 个警告 构建开始于 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)\参考 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 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" /编译 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”,因为所有输出文件相对于输入文件都是最新的。 核心编译: 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)\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\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 \Local\Temp.NETFramework,Version=v4.0,Profile=Client.AssemblyAttributes.cs"
构建失败。
谁能帮我告诉我问题出在哪里?
【问题讨论】:
-
尝试将目标框架更改为 .NET Framework 4.0
-
Visual Studio 有一个错误浏览器。按 Ctrl+W 然后按 E。
-
你显示的日志部分没有错误,请显示日志中有实际错误的部分。
-
+1 @Jeff - 我遇到了新类库项目的即时编译问题,因为 VS 默认为 .NET Framework 4 客户端配置文件。当我更改为 .NET Framework 4 时,一切都好起来了。
-
太好了 - 我应该将其添加为答案吗?
标签: c# visual-studio visual-studio-2010 build