简体   繁体   中英

Build on Azure Web App, Error:Can not find runtime target for framework '.NETStandard,Version=v1.6'

I have a asp.net core web project that was continuous deployed to Azure well. After I added another .net core class library to the solution, it gives the following build error on Azure: Microsoft.DotNet.Publishing.targets(149,5): error : Can not find runtime target for framework '.NETStandard,Version=v1.6' compatible with one of the target runtimes: 'win8-x86, win7-x86'.

However, the solution builds and runs successfully on local box.

Any one experience that before

Thanks Geoff

I saw this error as well in the same situation and the problem ended up being the MSBuild arguments I was using to enable the creation of a WebDeploy package. I was using the /p:DeployOnBuild=true argument when I saw this.

I was able to work around it by calling the PackagePublish target with MSBuild instead. For example,

D:\GitHub\AcmeApp.NET\src\AcmeApp.NET.Web>"c:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild" /t:PackagePublish /p:PublishProfile=Package

You can find more details on the following blog post - http://www.dotnetcatch.com/2016/09/20/webdeploy-packaging-with-asp-net-core/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM