I have a .Net Core console app which targets net471, and references a netstandard2.0 library project. I'm trying to publish it to an Azure WebJob using VS Publish command from project context menu, and getting error like this after publish starts:
C:\Program Files\dotnet\sdk\2.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error NETSDK1005: Assets file 'C:\Code\Temp\TestAzureDeployBug\ClassLibrary\obj\project.assets.json' doesn't have a target for '.NETStandard,Version=v2.0'. Ensure that restore has run and that you have included 'netstandard2.0' in the TargetFrameworks for your project. [C:\Code\Temp\TestAzureDeployBug\ClassLibrary\ClassLibrary.csproj]
If I change target framework to netcoreapp2.1 the error doesn't happen.
NuGet version: 4.6.0
dotnet.exe --version: 2.1.402
VS version (if appropriate): 15.8.5
OS version (i.e. win10 v1607 (14393.321)): win10 1803
Link to the sample project: https://1drv.ms/u/s!AuaAKPMkiTEAxrB3CJOUHMFvz2cq2Q
Note that I removed publish profile, and you need to create one for you Azure AppService.
I have a .Net Core console app which targets
net471, and references anetstandard2.0library project. I'm trying to publish it to an Azure WebJob using VS Publish command from project context menu, and getting error like this after publish starts:If I change target framework to
netcoreapp2.1the error doesn't happen.NuGet version: 4.6.0
dotnet.exe --version: 2.1.402
VS version (if appropriate): 15.8.5
OS version (i.e. win10 v1607 (14393.321)): win10 1803
Link to the sample project: https://1drv.ms/u/s!AuaAKPMkiTEAxrB3CJOUHMFvz2cq2Q
Note that I removed publish profile, and you need to create one for you Azure AppService.