1

I am learning how to automate the solution building, publishing, and deploying of ASP.NET websites. I am only using C# to execute cmd commands programatically, and I'm currently stuck with the publish process.

I have tried MSBuild but the output is not compiled the same as the aspnet_compiler files (dll is outside the bin folder and it creates an additional sub-folder). I recently noticed that VS used aspnet_compiler.exe in the publishing process but I don't know the backend process of how the obj\Release\AspnetCompileMerge\Source folder populates.

aspnet_compiler.exe -v / -p "C:\Users\*SolutionPath*\obj\Release\AspnetCompileMerge\Source" 
                    -u -c "C:\Users\*SolutionPath*\obj\Release\AspnetCompileMerge\TempBuildDir" 

From my understanding this command I saw in the output box in VS is responsible for pre-compiling the files from the Source folder to TempBuildDir folder then it copies those files to your chosen publish file folder.

1
  • Visual Studio uses MSBuild. It is not two different build systems. Is your project .NET Framework or .NET? Aspnet_compiler.exe is .NET Framework only. Commented Sep 25, 2023 at 21:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.