Harvey Colasino 6 Reputation points

After I setup my workflow in GitHub for building and deploying my project to Azure, I'm getting this error:

"C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\5.0.406\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\5.0.406\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" is correct, and that the file exists on disk.

I tried the following suggestion from the article:

Can anyone help?

Thank you

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,531 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    Comments have been turned off. Learn more

  2. Jamie Masculine 10 Reputation points

    I want to preface this by saying, this solution does not feel right, but does seem to work.

    I found this article from Microsoft and installed web tools

    dotnet workload install wasm-tools-net6

    Then I went to the location called out by the error and copied the WebApplications folder from v16.0 to v17.0

    cd /lib/mono/xbuild/Microsoft/VisualStudio/
    sudo cp -r v16.0/WebApplications v17.0

    There should be a more official way to handle this, but this at least got me to a point where I could build projects at work again

    0 comments No comments

  3. Ilya 0 Reputation points

    Same issue. net48 solution need to be built be "dotnet msbuild" as Teamcity no longer support VS .sln builds.

    0 comments No comments