编译时的msbuild错误(默认目标)(1) - >

时间:2016-12-02 18:52:45

标签: c# c++ visual-studio-2012 msbuild mono

当我使用visual studio构建解决方案时,它可以工作!但每当我尝试构建它时,msbuild就会抛出一个错误:

Microsoft (R) Build Engine version 4.6.1586.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 03-12-2016 00:10:23.
Project "C:\Users\RAZERAK\Desktop\BBM\BBM.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Any CPU".
The target "_ConvertPdbFiles" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\4.0\Microsoft.Comm
on.targets\ImportAfter\Xamarin.Common.targets (34,37)" does not exist in the project, and will be ignored.
The target "_CollectPdbFiles" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\4.0\Microsoft.Comm
on.targets\ImportAfter\Xamarin.Common.targets (34,70)" does not exist in the project, and will be ignored.
The target "_CollectMdbFiles" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\4.0\Microsoft.Comm
on.targets\ImportAfter\Xamarin.Common.targets (41,38)" does not exist in the project, and will be ignored.
The target "_CopyMdbFiles" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\4.0\Microsoft.Common.
targets\ImportAfter\Xamarin.Common.targets (41,71)" does not exist in the project, and will be ignored.
Project "C:\Users\RAZERAK\Desktop\BBM\BBM.sln" (1) is building "C:\Users\RAZERAK\Desktop\BBM\BBM\BBM.csproj" (2) on nod
e 1 (default targets).
Project file contains ToolsVersion="15.0". This toolset may be unknown or missing, in which case you may be able to res
olve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVers
ion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://g
o.microsoft.com/fwlink/?LinkId=291333.
CoreResGen:
  "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\resgen.exe" /useSourcePath /r:"C:\Program Fi
  les (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.CSharp.dll" /r:"C:\Program Files (x86
  )\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" /r:C:\Users\RAZERAK\Desktop\BBM\packages\
  Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framewo
  rk\.NETFramework\v4.0\System.Core.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramew
  ork\v4.0\System.Data.DataSetExtensions.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETF
  ramework\v4.0\System.Data.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
  \System.Deployment.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System
  .dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Drawing.dll" /r:"
  C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.dll" /r:"C:\P
  rogram Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /r:"C:\Program Files (
  x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll" /compile Properties\Resources.r
  esx,obj\Debug\Main.Properties.Resources.resources
  Processing resource file "Properties\Resources.resx" into "obj\Debug\Main.Properties.Resources.resources".
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the i
nput files.
CoreCompile:
  C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:AnyCPU /errorr
  eport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva- /reference:"C:\Program Files (x86)\Reference Assemblies\Micr
  osoft\Framework\.NETFramework\v4.0\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micr
  osoft\Framework\.NETFramework\v4.0\mscorlib.dll" /reference:C:\Users\RAZERAK\Desktop\BBM\packages\Newtonsoft.Json.9.0
  .1\lib\net40\Newtonsoft.Json.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFram
  ework\v4.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework
  \v4.0\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\
  .NETFramework\v4.0\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETF
  ramework\v4.0\System.Deployment.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NET
  Framework\v4.0\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\
  v4.0\System.Drawing.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4
  .0\System.Windows.Forms.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramewor
  k\v4.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
  \System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\BBM.exe /resource:obj\Debug\Main.P
  roperties.Resources.resources /target:winexe /utf8output Config.cs FormBackground.cs FormBackground.Designer.cs FormE
  ncryptedFiles.cs FormEncryptedFiles.Designer.cs FormGame.cs FormGame.Designer.cs Program.cs Properties\AssemblyInfo.c
  s Tools\Blockr.cs Tools\Hacking.cs Tools\Locker.cs Tools\Windows.cs Properties\Resources.Designer.cs Properties\Setti
  ngs.Designer.cs "C:\Users\RAZERAK\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cs"
Tools\Blockr.cs(9,45): error CS1002: ; expected [C:\Users\RAZERAK\Desktop\BBM\BBM\BBM.csproj]
Done Building Project "C:\Users\RAZERAK\Desktop\BBM\BBM\BBM.csproj" (default targets) -- FAILED.

Done Building Project "C:\Users\RAZERAK\Desktop\BBM\BBM.sln" (default targets) -- FAILED.


Build FAILED.

"C:\Users\RAZERAK\Desktop\BBM\BBM.sln" (default target) (1) ->
"C:\Users\RAZERAK\Desktop\BBM\BBM\BBM.csproj" (default target) (2) ->
(CoreCompile target) ->
  Tools\Blockr.cs(9,45): error CS1002: ; expected [C:\Users\RAZERAK\Desktop\BBM\BBM\BBM.csproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.24

我正在制作一个程序,它将使用msbuild编译解决方案文件,但是当我尝试使用C:\ Windows .... \ msbuild进行编译时出现错误。 我也试过单声道xbuild,它也有效! 请建议做什么?

0 个答案:

没有答案