2020-02-20T16:01:09.6186067Z ##[section]Starting: Build Migration Script
2020-02-20T16:01:09.6264348Z ==============================================================================
2020-02-20T16:01:09.6264395Z Task : Command Line
2020-02-20T16:01:09.6264419Z Description : Run a command line with arguments
2020-02-20T16:01:09.6264461Z Version : 1.1.3
2020-02-20T16:01:09.6264485Z Author : Microsoft Corporation
2020-02-20T16:01:09.6264508Z Help : More Information
2020-02-20T16:01:09.6264532Z ==============================================================================
2020-02-20T16:01:09.6271996Z ##[command]dotnet ef migrations script -p D:\a\1\s\PucAdmission -o D:\a\1\a\migrations\scripts.sql -i
2020-02-20T16:01:10.1898175Z It was not possible to find any compatible framework version
2020-02-20T16:01:10.1908456Z The framework 'Microsoft.NETCore.App', version '3.1.2' was not found.
2020-02-20T16:01:10.1908738Z - The following frameworks were found:
2020-02-20T16:01:10.1908854Z 1.0.16 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1909260Z 1.1.13 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1909437Z 2.0.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1909564Z 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1909700Z 2.1.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1911328Z 2.1.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1911435Z 2.1.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1912270Z 2.1.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1913411Z 2.1.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1914594Z 2.1.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1915790Z 2.1.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1916727Z 2.1.8 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1917859Z 2.1.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1919102Z 2.1.10 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1920296Z 2.1.11 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1921411Z 2.1.12 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1922603Z 2.1.13 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1923699Z 2.1.14 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1924904Z 2.1.15 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1926315Z 2.2.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1927331Z 2.2.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1928171Z 2.2.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1929663Z 2.2.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1930893Z 2.2.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1933431Z 2.2.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1933599Z 2.2.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1933822Z 2.2.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1934691Z 2.2.8 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1937448Z 3.0.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1937864Z 3.0.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1937908Z 3.0.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1943887Z 3.1.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1943918Z 3.1.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2020-02-20T16:01:10.1943935Z
2020-02-20T16:01:10.1943987Z You can resolve the problem by installing the specified framework and/or SDK.
2020-02-20T16:01:10.1944006Z
2020-02-20T16:01:10.1944032Z The specified framework can be found at:
2020-02-20T16:01:10.1944064Z - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.2&arch=x64&rid=win10-x64
2020-02-20T16:01:10.2286008Z ##[error]Process completed with exit code -2147450730.
2020-02-20T16:01:10.2304011Z ##[section]Finishing: Build Migration Script
Installed the Global tools before running this task using the below command:
dotnet tool install --global dotnet-ef --version 3.1.2
The installation succeeded but still this step fails.
The installed version of dotnet core is 3.1.0
Any possible workaround?
Install .NET Core SDK 3.1.2 and it will work.
When I tried to install the SDK 3.1.2 Using the Use .Net Core Task I got the below error:
2020-02-20T17:40:14.6236374Z ##[section]Starting: Use .Net Core sdk 3.1.2
2020-02-20T17:40:14.6316226Z ==============================================================================
2020-02-20T17:40:14.6316280Z Task : Use .NET Core
2020-02-20T17:40:14.6316307Z Description : Acquires a specific version of the .NET Core SDK from the internet or the local cache and adds it to the PATH. Use this task to change the version of .NET Core used in subsequent tasks. Additionally provides proxy support.
2020-02-20T17:40:14.6316365Z Version : 2.164.0
2020-02-20T17:40:14.6316391Z Author : Microsoft Corporation
2020-02-20T17:40:14.6316421Z Help : https://aka.ms/AA4xgy0
2020-02-20T17:40:14.6316464Z ==============================================================================
2020-02-20T17:40:15.0517216Z Tool to install: .NET Core sdk version 3.1.2.
2020-02-20T17:40:17.2485748Z No matching sdk version could be found for specified version: 3.1.2 Kindly note the preview versions are only considered in latest version searches if Include Preview Versions checkbox is checked.
2020-02-20T17:40:17.2486126Z Version 3.1.2 could not be found in its channel, will now search in adjacent channels.
2020-02-20T17:40:17.2488639Z Searching for version in channel 3.1
2020-02-20T17:40:18.8641343Z Searching for version in channel 3.0
2020-02-20T17:40:20.9094023Z ##[error]sdk version matching: 3.1.2 could not be found
2020-02-20T17:40:20.9157502Z ##[section]Finishing: Use .Net Core sdk 3.1.2
Sorry about confusion in version number.
According to https://dotnet.microsoft.com/download/dotnet-core/3.1 the latest version of SDK is 3.1.102 (3.1.2 is runtime version) which was released 2 days ago. Installing that would fix the issue. I am not sure how Use .Net Core Task work. You may want to follow up with owner of the task on how to get latest if above does not work for you.
Root cause here is that the the 3.1.2 dotnet-ef tool requires the 3.1.2 runtime. I should instead depend on the 3.1.0 runtime. See https://github.com/dotnet/efcore/pull/20007
Workaround is to uninstall the 3.1.2 tool and explicitly install the 3.1.0 tool:
ajcvickers@avickers420l:~$ dotnet tool uninstall --global dotnet-ef
Tool 'dotnet-ef' (version '3.1.2') was successfully uninstalled.
ajcvickers@avickers420l:~$ dotnet tool install --global dotnet-ef --version 3.1.0
You can invoke the tool using the following command: dotnet-ef
Tool 'dotnet-ef' (version '3.1.0') was successfully installed.
@smitpatel You were right. The version 3.1.2 is actually 3.1.102
Why is it named so?
It actually solved my problem.
Team note: verified this using the 3.1.3 build and only the 3.1.101 SDK installed.