Reputation: 49789
I have a ASP.Core RC2 project (.NET 4.5.1 framework is used) that should be deployed on Azure as x86 Web-Site.
On Publish Setting tab in VS there are the following values:
What I want to change is the value of "Target Runtime" to x86 platform, but this combobox is inactive (grey).
Current project.json:
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.0.1-*",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"buildOptions": {
"emitEntryPoint": true
},
"frameworks": {
"net451": { }
},
"publishOptions": {
"include": [
"appsettings.json",
"project.json",
"web.config",
"NlogWeb.config"
]
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-*",
"imports": "portable-net45+wp80+win8+wpa81+dnxcore50"
}
},
"scripts": {
"postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
}
}
Upvotes: 2
Views: 4308
Reputation: 64259
When you're developing self-contained applications, you have to add all required runtimes to the project.json
file, so that nuget/dotnet restore
can download the runtime files on restore.
Adding the win7-x86
runtime to the project.json
should do the trick.
"runtimes": {
"win7-x64": { },
"win7-x86": { }
}
When you target portable apps, you don't need the runtimes section but you have to install the runtime yourself on the target machine. See .NET Core App Types documentation for a more detailed description on how portability types work and are configured.
Upvotes: 7