1

I have a hard requirement from the developer to use a website project instead of a web app project for a .net deployment. I am able to connect and use continuous integration just fine with a web app project, but when using website, it fails to find the compiled files for deployment:

#[debug]check path : D:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-
0ae63477cebe\1.142.2\task.json
##[debug]set resource file to: D:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\1.142.2\task.json
##[debug]system.culture=en-US
##[debug]PathtoPublish=D:\a\1\a
##[debug]check path : D:\a\1\a
##[debug]ArtifactName=drop
##[debug]ArtifactType=Container
##[debug]system.hostType=build
##[warning]Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'drop'.

Looking at the build process, it's compiling a copy of the deployment to the PrecompiledWeb folder instead of the debug folder, which seems to explain why it cannot find the results. Has anyone had luck deploying with a website project or have you run into the issue above?

2
  • Please include details about your config files ex. the csproj, startup etc... Commented Mar 7, 2019 at 18:52
  • I hope you can build your project now. Could you please post your yaml code or classical editor screenshot for reference? I really need help with this. Thanks! Commented May 10, 2023 at 14:33

1 Answer 1

3

Azure DevOps Continuous Integration with asp.net website project instead of web application

Since the project is asp.net website, you may need use the website.publishproj file instead of the .sln file when you publish the asp.net website project with MSBuild.

The command line like:

msbuild.exe "<PathToTheFile>\website.publishproj" /p:deployOnBuild=true /p:publishProfile=WebsiteTestDemo /p:VisualStudioVersion=1x.0

With this setting, MSBuild does not create the PrecompiledWeb folder and the publish uses the setting in the profile.

Check my previous thread for some more details.

The website project the publish process is not plumbed into the build process. For website project since there is no formal build process there was nothing for us to really extend.

Hope this helps.

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you, this help me get it published.
Please also refer the below question regarding TFVC deployment and answer for the scenario. Thanks! stackoverflow.com/questions/76216606/…
In my project there is no 'website.publishproj' file as you mentioned so I need your help to build the project please see the above question and answer. Thanks!

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.