0

I am doing a POC on creating a code pipeline on AWS. I am using EU-WEST-1 region and a .net 4.5 simple hello world application but getting the error below on build phase

[Container] 2019/06/10 04:52:15 Running command & "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
-p:FrameworkPathOverride="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v$env:DOTNET_FRAMEWORK" $env:SOLUTION  & : The term 'C:\Program Files (x86)\Microsoft Visual   Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe' is not recognized as the   name of a cmdlet, function, script file, or operable program. Check the   spelling of the name, or if a path was included, verify that the path is   correct and try again.  At C:\codebuild\output\tmp\script.ps1:5 char:3 
+ & "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBu ... 
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo          : ObjectNotFound: (C:\Program File...Bin\MSBuild.e      xe:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CommandNotFoundException

I know there is some problem in my YAML related to msbuild path but I am not able to figure it out, what?

 build:
    commands:
      - '& "C:\ProgramData\chocolatey\bin\NuGet.exe" restore $env:SOLUTION -PackagesDirectory $env:PACKAGE_DIRECTORY'
      - '& "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" -p:FrameworkPathOverride="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v$env:DOTNET_FRAMEWORK" $env:SOLUTION'
Anthon
  • 69,918
  • 32
  • 186
  • 246
Prany
  • 2,078
  • 2
  • 13
  • 31
  • Writing that there is a problem in your YAML is about as specific as saying there is a problem on your harddrive and then adding the tag `harddrive` to the question. Your YAML is syntactically correct, it is the interpretation of that correct YAML, loaded by the AWS software that shows there is an issue with the information (probably some string type) rerpesented as, and loaded from, the YAML document. There is also no problem with your ASCII (cq UTF-8). – Anthon Jun 10 '19 at 06:08

1 Answers1

0

I finally got solution to this problem. The .net framework was not installed so down below the error it states mscorb.dll was missing. I just upgraded the .net framework and the build succeded. For more information, please refer here

Prany
  • 2,078
  • 2
  • 13
  • 31
  • Can you please give details about your solution. I am facing same issue. @Prany – Nishant May 28 '20 at 08:11
  • For my case as I mentioned .net was not installed on build server so I just installed it – Prany Jun 01 '20 at 13:47
  • I don't have access to actual cloud space now but as far as I remember I used something like this on cmd line - Dism /online /Enable-Feature /FeatureName:"NetFx451" – Prany Jun 01 '20 at 15:24