How to get page wise DLL for my web application aspx pages in azure build pipeline. While I run my pipeline its creating single build for my complete we application. But I want page wise dll for my web application.
I tried many ways in YAML file and classic editor tasks but could not get page wise dll.
- script: |
for /r %%i in (*.aspx) do (
echo Compiling page: %%i
"C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_compiler" -v / -p "%%~dpi" -u -f -fixednames "output%%~ni"
echo Compilation complete for: %%i
)
displayName: 'Compile ASPX Pages'
I had tried above script in yaml file and some other ways but getting
##[error]Cmd.exe exited with code ‘1’ this error
I also tried MSBuild Arguments in publish build artifacts in azure pipeline but the issue remain same…
2
Answers
This is my YAMAL file and my project files are under TestDemo2 Folder after root directory in azure files and this is web application.
To get page wise DLL for you web application aspx pages, you can refer to the below yaml file:
In the CmdLine@2 task, use
-p
to specify the physical path of the application to be compiled. The output ofaspnet_compiler.exe
will be placed into$(Build.SourcesDirectory)objReleaseAspnetCompileMergeTempBuildDir
.In PublishPipelineArtifact@1 task, set the
PublishPipelineArtifact@1
to the bin folder inside the output folder ofaspnet_compiler.exe
.Then you can see the .dll files of your aspx pages in the pipeline artifact: