Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 build doesn't work without 2.2 on the box #5307

Closed
jeffhollan opened this issue Nov 19, 2019 · 3 comments · Fixed by #5308
Closed

v3 build doesn't work without 2.2 on the box #5307

jeffhollan opened this issue Nov 19, 2019 · 3 comments · Fixed by #5308
Assignees
Labels

Comments

@jeffhollan
Copy link

If you try to do a dotnet build and only have 3.0 on the box, it throws an error. If you are using SDK version 1.0.29 it just complains it doesn't have .NET Core 2.1. If you upgrade the SDK to 3.0.0-preview1 it complains about this (below). Workaround is to also have 2.x on the machine:

error message > Restore completed in 18.07 sec for /home/vsts/work/1/s/devops3test.csproj. devops3test -> /home/vsts/work/1/s/bin/Release/netcoreapp3.0/bin/devops3test.dll /home/vsts/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : It was not possible to find any compatible framework version [/home/vsts/work/1/s/devops3test.csproj] /home/vsts/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : The specified framework 'Microsoft.NETCore.App', version '2.0.0' was not found. [/home/vsts/work/1/s/devops3test.csproj] /home/vsts/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : - The following frameworks were found: [/home/vsts/work/1/s/devops3test.csproj] /home/vsts/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : 3.0.0 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App] [/home/vsts/work/1/s/devops3test.csproj] /home/vsts/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : [/home/vsts/work/1/s/devops3test.csproj] /home/vsts/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : You can resolve the problem by installing the specified framework and/or SDK. [/home/vsts/work/1/s/devops3test.csproj] /home/vsts/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : [/home/vsts/work/1/s/devops3test.csproj] /home/vsts/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : The .NET Core frameworks can be found at: [/home/vsts/work/1/s/devops3test.csproj] /home/vsts/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : - https://aka.ms/dotnet-download [/home/vsts/work/1/s/devops3test.csproj] Debug output from extension.json generator:

/home/vsts/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): error : Metadata generation failed. Exit code: '150' Error: 'It was not possible to find any compatible framework versionThe specified framework 'Microsoft.NETCore.App', version '2.0.0' was not found. - The following frameworks were found: 3.0.0 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]You can resolve the problem by installing the specified framework and/or SDK.The .NET Core frameworks can be found at: - https://aka.ms/dotnet-download' [/home/vsts/work/1/s/devops3test.csproj]

Build FAILED.

@cmendible
Copy link
Member

Hi I can confirm that with just v3.0 installed in the box I get: "The specified framework 'Microsoft.NETCore.App', version '2.1.0' was not found" when trying to build. Once I installed the 2.2 SDK the v3 function builds.

@jeffhollan jeffhollan changed the title v3 build doesn't work without 2.x on the box v3 build doesn't work without 2.2 on the box Nov 25, 2019
@brettsam brettsam self-assigned this Nov 27, 2019
@brettsam brettsam transferred this issue from Azure/azure-functions-vs-build-sdk Nov 27, 2019
@brettsam
Copy link
Member

@jeffhollan -- did you have a repro of this locally? I've got a fix that it'd be good to have someone try out.

@brettsam
Copy link
Member

brettsam commented Dec 2, 2019

I've just published Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator 1.1.3 to nuget. This should handle the scenario where .NET Core 2 is not installed.

Soon we will include this version directly in Microsoft.NET.Sdk.Functions, but in the meantime, you can add a direct nuget reference to this package version and it should unblock you. Please let me know if you continue to see this error and I can investigate.

@Azure Azure locked as resolved and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants