c# - MSBuild uses .sln when called from PowerShell script but .csproj when called from command line -
I am scratching my head over this for a while and I can not find anything I can do to execute the following Trying:
C: \ Windows \ Microsoft.NET \ Framework \ v3.5 \ MsBuild.exe D: \ SourceFiles \ Testing \ AppaloosaDotNet \ AppaloosaDotNet \ AppaloosaDotNet.csproj "/ T : _CopyWebApplication; ResolveReferences; publish "/ p: ReferencePath = D: \ builds \ test \ latestbuilding \ / p: outdir = \\ servername \ d $ \ webcontent \ appaloosaDotNET \ bin \ / p: WebProjectOutputDir = \\ server name \ D $ \ WebContent \ appaloosaDotNET \ < / Blockquote>
If I type this command directly into the PowerShell prompt, then it works fine. Although I have created a PowerShell script that calls it for me and when the script executes, then MSBuild takes up a folder and uses the solution file (.sln) to create the project. Problems come with this because the targets are not found in the solution file.
If I type the command manually and execute it, then MSBuild prints that it is creating D: \ sourcefile \ test \ ApollodNet \ Apollossa dotnet \ AppaloosaDotNET.csproj and build Okay.
But if I run a script then MSBuild prints, then it is creating D: \ SourceFile \ Testing \ Apalao Dotnet \ AppaloosaDotNET.sln and then the build fails because the target is not found. / P>
I am sure that I am doing something wrong in my script but can not figure out what is it. I have been checked twice to see that the order executed by the script is as much as I type. I also copied the command which runs while running the script and gets pasted quickly and it runs fine so I'm pretty sure that the commands are the same. Any ideas?
Can your script be located on the same path as is your solution? How are you running your script and where it remains (if it is not on the same path to the solution)? It can not be anything, but confirm it.
Comments
Post a Comment