I am unable to publish my Azure Functions (v1) Project after upgraded to VisualStudio 15.7.0 Preview 6.0 I get this error when click Publish button
C:\Program Files\dotnet\sdk\2.1.200-preview-007597\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'C:\Users\tonyv\source\repos\SistemaMulti\WebAPI\obj\project.assets.json' doesn't have a target for '.NETFramework,Version=v4.6.1/win'. Ensure you have restored this project for TargetFrameworks 'net461' Maybe you also need to include 'win' on RuntimeIdentifiers of yout project. [C:\Users\tonyv\source\repos\SistemaMulti\WebAPI\WebAPI.csproj]
My .csproj is:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Remove="MercadoPago\Pessoa.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.13" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="MercadoPago\" />
</ItemGroup>
</Project>
How to fix this?
<RuntimeIdentifier>win</RuntimeIdentifier>
, then I removed it, Published and I can confirm it worked OK now! Put this as answer so I can mark accept – Tony