Reputation: 1
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'.
Upvotes: 0
Views: 1588
Reputation: 76660
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:
Hope this helps.
Upvotes: 1
Reputation: 1
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 ?
Upvotes: 0