Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Error MSB4025 when deploying ASP.Net MVC .Net Core app #64

Closed
m2web opened this issue Jan 8, 2017 · 3 comments
Closed

Error MSB4025 when deploying ASP.Net MVC .Net Core app #64

m2web opened this issue Jan 8, 2017 · 3 comments

Comments

@m2web
Copy link

m2web commented Jan 8, 2017

I am trying to deploy an ASP.Net MVC .Net Core app that was created on an Ubuntu 16.04 system in Visual Studio Code. When attempting to push local git deployment to my Azure app to its Azure App Service.
In the project’s root directory, I ran the following:
git push -u azure master
and got the following:

D:\home\site\repository\project.json(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
remote: Failed exitCode=1, command=dotnet publish "project.json" --output "D:\local\Temp\8d436b77fda50dd" --configuration Release
remote: An error has occurred during web site deployment.
remote:
remote: Error - Changes committed to remote repository but deployment to website failed.
To https://m2@myappname.scm.azurewebsites.net:443/mayappname.git
[new branch] master -> master
Branch master set up to track remote branch master from azure.

I got an almost identical error message when deploying from the identical repo on Bitbucket.

I have found references to this error when dealing with continuous integration paltforms but has anyone else seen this when trying to deploy an ASP.Net MVC .Net Core app? Here is the project.json file:

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.1.0",
      "type": "platform"
    },
    "Microsoft.EntityFrameworkCore": "1.1.*",
    "Microsoft.AspNetCore.Diagnostics": "1.1.0",
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",
    "Microsoft.AspNetCore.Mvc": "1.1.0",
    "Microsoft.EntityFrameworkCore.SqlServer":"1.1.*",
    "Microsoft.AspNetCore.Razor.Tools": {
      "version": "1.1.0-preview4-final",
      "type": "build"
    },
    "Microsoft.AspNetCore.Routing": "1.1.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
    "Microsoft.AspNetCore.StaticFiles": "1.1.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
    "Microsoft.Extensions.Configuration.Json": "1.1.0",
    "Microsoft.Extensions.Configuration.CommandLine": "1.1.0",
    "Microsoft.Extensions.Logging": "1.1.0",
    "Microsoft.Extensions.Logging.Console": "1.1.0",
    "Microsoft.Extensions.Logging.Debug": "1.1.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0"
  },

  "tools": {
    "BundlerMinifier.Core": "2.2.306",
    "Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
     "Microsoft.EntityFrameworkCore.Tools": {
      "version": "1.1.0-preview4-final",
      "imports": [
        "portable-net45+win8+dnxcore50",
        "portable-net45+win8"
      ]
    }
  },

  "frameworks": {
    "netcoreapp1.1": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "**/*.cshtml",
      "appsettings.json",
      "web.config"
    ]
  },

  "scripts": {
    "precompile": [ "dotnet bundle" ],
    "prepublish": [ "bower install" ],
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  },

  "tooling": {
    "defaultNamespace": "myNameSpace"
  }
}

I have created a public repo here: https://github.com/m2web/m2prayer.net.core.public
To date there is little available concerning the error that I am getting with asp.net core with Azure App Services.

@jtaubensee
Copy link
Contributor

@m2web - Is this a question about Azure Service Bus?

@m2web
Copy link
Author

m2web commented Jan 9, 2017

No, about Azure Continuous Integration when deploying.

@jtaubensee
Copy link
Contributor

@m2web - This repo is specifically for the Azure Service Bus .NET standard client, so unfortunately we will not be able to help you here. I also do not believe that there is a GitHub repo for Azure websites that will be able to take this question, so your best bet is Azure support or StackOverflow.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants