$ (SolutionDir) MSBuild property is incorrect when creating Sub Projects - FAKE F # MAKE

I have 10 subprojects, and out of these 10 projects I create 3 projects in my FAKE scripts, but I get an error message, i.e. `imported project

"D:\MyProject\Project1\BuildTools\StyleCop\v4.7\StyleCop.targets" was no found . Confirm that the path in the <import> declaration is correct , and that the file exists on disk .

although the expected target file is not in this place, it is definitely located in this place , D:\MyProject\BuildTools\StyleCop\v4.7\StyleCop.targets

My question is why it is looking for the file in the wrong place. I think this is a problem with $ (SolutionDir) because the csproj project file is in this place   D:\MyProject\Project1\Project1.csproj

The following is the FAKE code:

Target "BuildApp" (fun _ ->
!! "D:\MyProject\Project1\project1.csproj"
  ++ "D:\MyProject\Project2\project2.csproj"
  ++ "D:\MyProject\Project3\project3.csproj"
  |> MSBuildRelease buildDir "Build"
  |> Log "AppBuild-Output:"

)

Can I give my new SolutionDir solution by giving the path to the csproj file?

+4
source share
1 answer

MSBuildReleaseExt MSBuildRelease:

|> MSBuildReleaseExt buildDir [("SolutionDir", "path-to-your-solution.sln")] "Build"
+4

Source: https://habr.com/ru/post/1672912/


All Articles