0

I have uploaded my existing .NET webforms project to Azure Devops and when I run a build definition, I get an error in VSBuild section.

ASPNETCOMPILER thrown an error, The directory doesn't exists.

Thanks for any help...

Here are the build solution log errors -

ASPNETCOMPILER(0,0): Error 1003: The directory 'C:\holmestest\PPS\new123' doesn't exist. Process 'msbuild.exe' exited with code '1'.

Build Error

1
  • looks like you have hardcoded some path Commented Nov 13, 2019 at 15:34

2 Answers 2

1

Error 1003: The directory 'C:\holmestest\PPS\new123' doesn't exist. Process 'msbuild.exe' exited with code '1'.

According to the error message:

The directory 'C:\holmestest\PPS\new123' doesn't exist

It seems you are using the absolute path C:\holmestest\PPS\new123 in your project, which is the reason of your error message.

When you submit this the absolute path with your code to the Azure devops, Azure devops Will go to the path under the execution machine (agent) to find this folder. If the execution machine (agent) does not have a corresponding folder, Azure devops could not find that path when you build with Azure devops.

To resolve this issue, you could add this new123 into your projects/solution, then use the relative path in your code.

Update:

Can anyone suggest me how to use msbuild.exe command in .yml file? msbuild.exe "\website.publishproj" /p:deployOnBuild=true /p:publishProfile=WebsiteTestDemo /p:VisualStudioVersion=1x.0 What is PathToTheFile here i need to refer ?

You could use following msbuild task to build the website project.

- task: MSBuild@1
  displayName: 'Build solution **/*.publishproj'
  inputs:
    msbuildArguments: '/p:deployOnBuild=true /p:publishProfile=WebsiteTestDemo /p:VisualStudioVersion=1x.0'

If I understand your "PathToTheFile" correct, you mean the path for publishProfile? If yes, you could switch the repo and find that publishProfile file, then you will get the path in the browser:

enter image description here

Hope this helps.

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

3 Comments

The application i'm trying to integrate Azure Devops Build pipeline is ASP.Net Website application. Azure Devops integration is fully different from compare to normal ASP.Net web forms application. Here is some reference link i found for my issue, Azure DevOps Continuous Integration with asp.net website project instead of web application I changed solution file in .yml to, solution: '*/.publishproj'
Can anyone suggest me how to use msbuild.exe command in .yml file? msbuild.exe "\website.publishproj" /p:deployOnBuild=true /p:publishProfile=WebsiteTestDemo /p:VisualStudioVersion=1x.0 What is PathToTheFile here i need to refer ?
@ranjitgs, Updated the answer, you can check if it helps for you.
0

The application i'm trying to integrate Azure Devops Build pipeline is ASP.Net Website application. Azure Devops integration is fully different from compare to normal ASP.Net web forms application. Here is some reference link i found for my issue,

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

I changed solution file in .yml to, solution: '**/*.publishproj'

Can anyone suggest me how to use msbuild.exe command in .yml file?

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

What is PathToTheFile here i need to refer ?

Comments

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.