Deploy on Azure fails error MSB4019 #1158

Closed
opened 2025-08-09 17:19:05 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @psaussure on 12/23/2016

Bug on Azure Deploy

Just created a new project, let dependencies update then, via GIT method, tried to deploy on Azure. An error occurs.

Following: http://blog.stevensanderson.com/2016/10/04/angular2-template-for-visual-studio/#publishing-to-azure

Steps

Install all required VS2015 packages:

  • Core 1.0.1

  • npm and node last versions

  • VS2015 Update 3

  • Typescript for VS

  • Install ASP.NET Core Template Pack extension

  • Local dotnet --version -> 1.0.0-preview2-003131

  • Local node version: 7.2.1

Create and run the project in VS2015

  • Create new project -> "ASP.NET Core Angular2 Starter Application" > C:\Angular2Application1

  • I don't modify anything

  • git init in "C:\Angular2Application1\Angular2Application1" (not at root level where sln file is, but where package.json and project.json are)

  • Run the App in VS2015: works perfectly

  • first git commit

Setup Azure Web App

nodeversion

  • Deployement option set to local git
  • git remote add azure https://azurewebap-git-repo-url
  • git push azure master

On Push to Azure, Error summary

D:\home\site\repository\Angular2Application1.xproj(8,3): error MSB4019: The imported project "D:\Program Files (x86)\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

On push to Azure, log

remote: D:\home\site\repository\project.json
remote: Restore completed in 67974ms.
remote:
remote: NuGet Config files used:
remote:     C:\DWASFiles\Sites\#1myapp14446564\AppData\NuGet\NuGet.Config
remote:
remote: Feeds used:
remote:     https://api.nuget.org/v3/index.json
remote:
remote: Installed:
remote:     212 package(s) to D:\home\site\repository\project.json
remote: Microsoft (R) Build Engine version 15.1.0.0
remote: Copyright (C) Microsoft Corporation. All rights reserved.
remote:
remote: Build started 12/23/2016 3:10:38 PM.
remote:      1>Project "D:\home\site\repository\Angular2Application1.xproj" on node 1 (Publish target(s)).
remote:      1>D:\home\site\repository\Angular2Application1.xproj(8,3): error MSB4019: The imported project "D:\Program Files (x86)\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
remote:      1>Done Building Project "D:\home\site\repository\Angular2Application1.xproj" (Publish target(s)) -- FAILED.
remote:
remote: Build FAILED.
remote:
remote:        "D:\home\site\repository\Angular2Application1.xproj" (Publish target) (1) ->
remote:          D:\home\site\repository\Angular2Application1.xproj(8,3): error MSB4019: The imported project "D:\Program Files (x86)\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
remote:
remote:     0 Warning(s)
remote:     1 Error(s)
remote:
remote: Time Elapsed 00:00:00.39
remote: Failed exitCode=1, command=dotnet publish "Angular2Application1.xproj" --output "D:\local\Temp\8d42b45add7eef8" --configuration Release
remote: An error has occurred during web site deployment.
remote:
remote: Error - Changes committed to remote repository but deployment to website failed.

More complete log Here: PasteBin

Local console

dotnet --version
D:\home\site\wwwroot
1.0.0-preview3-004056

Do you know why build fails?

*Originally created by @psaussure on 12/23/2016* ## Bug on Azure Deploy *Just created a new project, let dependencies update then, via GIT method, tried to deploy on Azure. An error occurs.* Following: http://blog.stevensanderson.com/2016/10/04/angular2-template-for-visual-studio/#publishing-to-azure ## Steps ### Install all required VS2015 packages: - Core 1.0.1 - npm and node last versions - VS2015 Update 3 - Typescript for VS - Install ASP.NET Core Template Pack extension - Local `dotnet --version -> 1.0.0-preview2-003131` - Local node version: `7.2.1` ### Create and run the project in VS2015 - Create new project -> "ASP.NET Core Angular2 Starter Application" > C:\Angular2Application1 - I don't modify anything - `git init` in "C:\Angular2Application1\Angular2Application1" (not at root level where sln file is, but where package.json and project.json are) - **Run the App in VS2015**: **works perfectly** - first `git commit` ### Setup Azure Web App ![nodeversion](https://cloud.githubusercontent.com/assets/24230585/21456476/547ad252-c8f6-11e6-9872-69ebc17b8f72.PNG) - Deployement option set to `local git` - `git remote add azure https://azurewebap-git-repo-url` - `git push azure master` ## On Push to Azure, Error summary ```D:\home\site\repository\Angular2Application1.xproj(8,3): error MSB4019: The imported project "D:\Program Files (x86)\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.``` ## On push to Azure, log ``` remote: D:\home\site\repository\project.json remote: Restore completed in 67974ms. remote: remote: NuGet Config files used: remote: C:\DWASFiles\Sites\#1myapp14446564\AppData\NuGet\NuGet.Config remote: remote: Feeds used: remote: https://api.nuget.org/v3/index.json remote: remote: Installed: remote: 212 package(s) to D:\home\site\repository\project.json remote: Microsoft (R) Build Engine version 15.1.0.0 remote: Copyright (C) Microsoft Corporation. All rights reserved. remote: remote: Build started 12/23/2016 3:10:38 PM. remote: 1>Project "D:\home\site\repository\Angular2Application1.xproj" on node 1 (Publish target(s)). remote: 1>D:\home\site\repository\Angular2Application1.xproj(8,3): error MSB4019: The imported project "D:\Program Files (x86)\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. remote: 1>Done Building Project "D:\home\site\repository\Angular2Application1.xproj" (Publish target(s)) -- FAILED. remote: remote: Build FAILED. remote: remote: "D:\home\site\repository\Angular2Application1.xproj" (Publish target) (1) -> remote: D:\home\site\repository\Angular2Application1.xproj(8,3): error MSB4019: The imported project "D:\Program Files (x86)\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. remote: remote: 0 Warning(s) remote: 1 Error(s) remote: remote: Time Elapsed 00:00:00.39 remote: Failed exitCode=1, command=dotnet publish "Angular2Application1.xproj" --output "D:\local\Temp\8d42b45add7eef8" --configuration Release remote: An error has occurred during web site deployment. remote: remote: Error - Changes committed to remote repository but deployment to website failed. ``` More complete log Here: [PasteBin](http://pastebin.com/gRnxsQhs) ## Local console ``` dotnet --version D:\home\site\wwwroot 1.0.0-preview3-004056 ``` Do you know why build fails?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1158
No description provided.