1
votes

After we upgraded our web application to asp.net core 1.0 we're unable to get a successfull build within Appveyor.

There are several nuget packages issues, the first error is:

Microsoft.AspNetCore.Mvc 1.0.0 is not compatible with .NETCoreApp,Version=v1.0.

On of the feed that is used is https://www.nuget.org/api/v2 and we think it should use the V3 version to be able to build core 1.0 web projects.

Is our assumption correct and how do we force appveyor to use the v3 api instead v2?

How do we get a successful build for our asp.net core 1.0 project?


UPDATE

Our assumption seems not to be correct, with the command

nuget sources update -Name nuget.org -Source https://api.nuget.org/v3/index.json

the new v3 feed is successfully used but the build still fails with the same errors.


dotnet information from build-server:

.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:

  • Version: 1.0.0-preview2-003121
  • Commit SHA-1 hash: removed

Runtime Environment:

  • OS Name: Windows
  • OS Version: 6.3.9600
  • OS Platform: Windows
  • RID: win81-x64

And our project.json:

{
"dependencies": {
    "Microsoft.NETCore.App": {
        "version": "1.0.0",
        "type": "default"
    },
    "Microsoft.AspNetCore.Diagnostics": "1.0.0",
    "Microsoft.AspNetCore.Mvc": "1.0.0",
    "Microsoft.AspNetCore.Razor.Tools": {
        "version": "1.0.0-preview2-final",
        "type": "build"
    },
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0"
},

"tools": {
    "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
    "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},

"frameworks": {
    "netcoreapp1.0": {}
},

"buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true,
    "compile": {
        "exclude": [
            "wwwroot",
            "node_modules"
        ]
    }
},

"runtimes": {
    "win10-x64": {}
},

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

//"publishExclude": [
//    "**.user",
//    "**.vspscc"
//],

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

"scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
    }
}

And global.json

{
    "projects": [ "src", "test" ],
    "sdk": {
        "version": "1.0.0-preview2-003121"
    }
}
1

1 Answers

1
votes

Try updating nuget source during the build with this command:

nuget sources update -Name nuget.org -Source https://api.nuget.org/v3/index.json