MSBuild Target - error MSB3202

Hi

I have a project that I need to clone it.

The MSBuild step fails with error MSB3202 project was not found

I did not create this project and don't know how they created.

The main solution in Git contains over 100 projects. This project supposed to run the build for only one project.

Setting for MSBuild step is:

1- Solution file Path: {main solution}

2- Target: %env.TEAMCITY_PROJECT_NAME%\{project path}_%env.TEAMCITY_PROJECT_NAME%:rebuild

Whoever set this project, expects the name on Visual studio project to be the same as Teamcity project

If teamcity project has a word as Clone, obviously, there is no project as this name so it crashes

I tried to put the VS project name instead of the variable, it still says can't find project.

I don't understand why it can't find the project.

Any idea?

Please help me.

 

Thank you verymuch

Kati

0
1 comment

Hi Kati,

 

The "MSBuild Target" here refers to the project name defined in the solution file, not the file path. It's typically in the format:

<ProjectName>:<Target> (e.g., MyProject.app1:rebuild).

To find the correct project name, open your .sln (solution) file and locate the entry for the project you want to build. It will look something like this:

Project("{GUID}") = "MyProject.app1", "src\MyProject.SubModule\MyProject.app1.csproj", "{GUID}"

In this example, "MyProject.app1" is the project name that MSBuild expects.

Instead of using something like:

%env.TEAMCITY_PROJECT_NAME%\{project path}_%env.TEAMCITY_PROJECT_NAME%:rebuild

Use the actual project name directly. 

MyProject.app1:Rebuild 

The whole command line would be

msbuild MySolution.sln /t:MyProject.app1:Rebuild

Important:

MSBuild is case-sensitive in some environments (e.g., Linux/Mono or when using the .NET SDK on non-Windows systems). Be sure to match the project name exactly as it appears in the .sln file

Best Regards,

Tom

0

Please sign in to leave a comment.