Failed:The target "Build" does not exist in the project

Topics: For MSBee Users
Nov 27, 2006 at 10:01 AM
Hi guys. I'm a newbie and when I use MSBee build a project I have met an error the message as title.

My OS is Vista RTM, and I have installed .net Framework SDK 1.1, the MSBee version is 1.0.

First I create a C# 1.1 library project in VS 2003 and it can be built well, then I converted it by VS 2005 and build from command prompt:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\msbuild.exe classlibrary2.csproj /p:TargetFX1_1=true
It's also built success, but the assembly is .net 2.0 version.

And then, I modified the project file "classlibrary2.csproj" by replaced "<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />" of "<Import Project="$(MSBuildExtensionsPath)\MSBee\MSBuildExtras.Fx11.CSharp.targets" Condition=" '$(BuildingInsideVisualStudio)'=='' AND '$(TargetFX11)'=='true' "/>", then used the same command from prompt:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\msbuild.exe classlibrary2.csproj /p:TargetFX1_1=true
it failed, the error details are as follows:
E:\ClassLibrary2>C:\Windows\Microsoft.NET\Framework\v2.0.50727\msbuild.exe class
library2.csproj /p:TargetFX1_1=false
Microsoft (R) Build Engine Version 2.0.50727.312
Microsoft .NET Framework, Version 2.0.50727.312
Copyright (C) Microsoft Corporation 2005. All rights reserved.

Build started 2006/11/27 18:46:04.
__________________________________________________
Project "E:\ClassLibrary2\classlibrary2.csproj" (default targets):

E:\ClassLibrary2\classlibrary2.csproj : error MSB4057: The target "Build" does n
ot exist in the project.

Done building project "classlibrary2.csproj" -- FAILED.

Build FAILED.
E:\ClassLibrary2\classlibrary2.csproj : error MSB4057: The target "Build" does n
ot exist in the project.
0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.00

Any helps is appreciates, thanks.
Nov 27, 2006 at 10:32 AM
By checking the document I have found that I have token a mistake that is add below not replace the line "<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />".

But I still have a question that is: I use reflector to check the assembly's reference, those still associated with .net 2.0. Anybody can explain for me on this?

Have a nice day!
Jun 26, 2007 at 9:52 PM
Here are the plaths I have in my sample project. Check to see if these match for you (old thread so it is probably over and past, but wanted to at least post an answer).

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\MSBee\MSBuildExtras.FX1__1.CSharp.targets" />