4

I am using below Task and running this from VS Code.

  Task("Build")
   .Does(() =>
      {
        // Use MSBuild 
       MSBuild("E:/Repos/Code/TestService/TestWindowsService.sln", settings =>
    settings.SetConfiguration(configuration));

    });

But I am getting below error when I Was try to run this Script.

MSBUILD: error MSB1009: Project file does not exist. Switch: E:/Repos/Code/Cake/Code/TestService/TestWindowsService.sln An error occurred when executing task 'Build'. Error: One or more errors occurred. MSBuild: Process returned an error (exit code 1).

Pancheti
  • 217
  • 1
  • 7
  • 1
    If you open that solution file in Visual Studio, does it, and all of it's projects open correctly? There seems to be a difference between the path that you show in the code snippet, compared to the path in the error. Can you verify that the solution file exists in the location that you are using? – Gary Ewan Park Dec 07 '18 at 13:11
  • Code snippet path is correct, but the path in the error is an unknown. – Pancheti Dec 07 '18 at 13:22
  • Can you answer my other question? – Gary Ewan Park Dec 07 '18 at 13:45
  • Thank you Gary Ewan Park . The issue is resolved. this is because of the wrong path/location of the Cake referenced files(.ps1,.sh,.cake...etc) – Pancheti Dec 07 '18 at 14:40

0 Answers0