I am working on an application which is on .net framework , code is on github, Could someone help me regarding the buidspec.yml file and any extra files that needs to me in it i am using in project enviornment in CICD build project:
aws/codebuild/windows-base:2.0-19.11.15
buildspec.yml file
--------------------------------
version: 0.2
env:
variables:
SOLUTION: .\CSharpHelloWorld.sln
PACKAGE_DIRECTORY: .\packages
DOTNET_FRAMEWORK: 4.6.2
phases:
build:
commands:
- '& "C:\ProgramData\chocolatey\bin\NuGet.exe" restore $env:SOLUTION -PackagesDirectory $env:PACKAGE_DIRECTORY'
- '& "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" -p:FrameworkPathOverride="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v$env:DOTNET_FRAMEWORK" $env:SOLUTION'
artifacts:
files:
- .\CSharpHelloWorld\bin\Debug\*
-------------------------------
while code build happens there is error like :
---------------------------
[Container] 2020/02/01 09:23:49 Phase complete: BUILD State: FAILED
[Container] 2020/02/01 09:23:49 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: & "C:\Program Files (x86)\MSBuild\15.0\Bin\MSBuild.exe" -p:FrameworkPathOverride="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v$env:DOTNET_FRAMEWORK" $env:SOLUTION. Reason: exit status 1
[Container] 2020/02/01 09:23:49 Entering phase POST_BUILD
------------------------------