locked
Unregistered TargetFramework '.NETFramework,Version=v4.5.1' is being requested from ... RRS feed

  • Question

  • User19135 posted

    I'm trying to resolve build failed error. Build output (with Detailed verbosity) contains only

    Build failed. Build: 1 error, 0 warnings

    IDE logs (Help > Open log directory):

    WARNING [2016-03-02 10:18:43Z]: Unregistered TargetFramework '.NETFramework,Version=v4.5.1' is being requested from SystemAssemblyService, returning empty TargetFramework ERROR [2016-03-02 10:18:43Z]: Error running resgen System.InvalidOperationException: No compatible framework found for assembly 'C:\Program Files (x86)\Xamarin Studio\bin\MSBuild\dotnet.14.0\MonoDevelop.Projects.Formats.MSBuild.exe' (required framework: .NETFramework,Version=v4.5.1) ...

    XS reinstall and Microsoft Build Tools 2015 reinstall doesn't solve the problem.

    IDE info: Xamarin Studio Version 6.0 (build 4520) Installation UUID: 98271cc1-03e0-4f37-8c06-ac3c4d6afefe Runtime: Microsoft .NET 4.0.30319.42000 GTK+ 2.24.25 (Dark theme) GTK# 2.12.30.1

    Xamarin.Profiler Version: 0.24.0.0 Location: C:\Program Files (x86)\Xamarin\Profiler\XamarinProfiler.exe

    Xamarin.Android Version: 6.0.99.544 (Business Edition) Android SDK: C:\Users\anemtsev\AppData\Local\Android\android-sdk Supported Android versions: 2.3 (API level 10) 4.0.3 (API level 15) 4.1 (API level 16) 4.2 (API level 17) 4.3 (API level 18) 4.4 (API level 19) 4.4.87 (API level 20) 5.0 (API level 21) 5.1 (API level 22) 6.0 (API level 23)

    SDK Tools Version: 24.4.1 SDK Platform Tools Version: 23.1 SDK Build Tools Version: 23.0.1

    Java SDK: C:\Program Files (x86)\Java\jdk1.7.071 java version "1.7.071" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

    Xamarin Android Player Version: 0.5.6 Location: C:\Program Files\Xamarin Android Player\DeviceManager.exe

    Build Information Release ID: 600004520 Git revision: a354b2cb9df4b96f50b0ccb960dbdd5a9155510c Build date: 2016-02-18 15:14:28-05 Xamarin addins: 8e54979f23feee160d245a3c33e43e77779b1eb4 Build lane: monodevelop-windows-master

    Operating System Windows 6.1.7601.65536 (64-bit)

    Wednesday, March 2, 2016 7:45 AM

Answers

  • User19135 posted

    Thanks for help. Looks like solution is: - install .Net Framework 4.5.1 Developer Pack (https://www.microsoft.com/en-us/download/details.aspx?id=40772) - repair Xamarin (not Xamarin Studo)

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, March 2, 2016 2:10 PM

All replies

  • User18049 posted

    Do you have .NET 4.5.1 installed?

    Wednesday, March 2, 2016 9:44 AM
  • User19135 posted

    According to

    HKEYLOCALMACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Release = 0x6041f

    .NET Framework 4.6.1 is installed.

    Microsoft .NET Framework 4.5.1 (Offline Installer) reports that .NET Framework 4.5.1 or later version is already installed.

    .NET Framework Setup Verification Utility reports: [03/02/16,14:22:32] Detected operating system: Windows 7 (x64) [03/02/16,14:22:32] Windows directory: C:\Windows [03/02/16,14:22:32] System directory: C:\Windows\system32 [03/02/16,14:22:32] Program Files directory: C:\Program Files (x86) [03/02/16,14:22:32] Common Files directory: C:\Program Files (x86)\Common Files [03/02/16,14:22:32] Install state for .NET Framework 1.0: not installed. [03/02/16,14:22:32] Install state for .NET Framework 1.1: not installed. [03/02/16,14:22:32] Install state for .NET Framework 2.0: installed with service pack 2. [03/02/16,14:22:32] Install state for .NET Framework 3.0: installed with service pack 2. [03/02/16,14:22:32] Install state for .NET Framework 3.5: installed with service pack 1. [03/02/16,14:22:32] Install state for .NET Framework 4 Client: installed with no service packs. [03/02/16,14:22:32] Install state for .NET Framework 4 Full: installed with no service packs. [03/02/16,14:22:32] Install state for .NET Framework 4.5: installed with no service packs. [03/02/16,14:22:32] Install state for .NET Framework 4.5.1: installed with no service packs. [03/02/16,14:22:32] Install state for .NET Framework 4.5.2: installed with no service packs. [03/02/16,14:22:32] Install state for .NET Framework 4.6: installed with no service packs. [03/02/16,14:22:32] Install state for .NET Framework 4.6.1: installed with no service packs. [03/02/16,14:22:32] Not adding product '.NET Framework 1.0' because it is not currently installed [03/02/16,14:22:32] Not adding product '.NET Framework 1.1' because it is not currently installed [03/02/16,14:22:32] Not adding product '.NET Framework 1.1 SP1' because it is not currently installed [03/02/16,14:22:32] Not adding product '.NET Framework 2.0' because it is not currently installed [03/02/16,14:22:32] Not adding product '.NET Framework 2.0 SP1' because it is not currently installed [03/02/16,14:22:32] Not adding product '.NET Framework 3.0' because it is not currently installed [03/02/16,14:22:32] Not adding product '.NET Framework 3.0 SP1' because it is not currently installed [03/02/16,14:22:32] Not adding product '.NET Framework 3.5' because it is not currently installed

    Wednesday, March 2, 2016 11:15 AM
  • User18049 posted

    Can you create a C# console project, target .NET 4.5.1, and then build it from the command line with msbuild?

    Wednesday, March 2, 2016 12:09 PM
  • User19135 posted

    "Hello World" console project targeted at "Mono / .NET 4.5"

    v4.5 were successfully build from command line with C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe

    mscorlib.dll at output dir have version 4.0.30319.18408

    More info about Build error from ide logs: ERROR [2016-03-02 15:41:17Z]: Build failed. System.InvalidOperationException: No compatible framework found for assembly 'C:\Program Files (x86)\Xamarin Studio\bin\MSBuild\dotnet.14.0\MonoDevelop.Projects.Formats.MSBuild.exe' (required framework: .NETFramework,Version=v4.5.1) at MonoDevelop.Core.Assemblies.TargetRuntime.ExecuteAssembly(ProcessStartInfo pinfo, TargetFramework fx) in C:\Users\builder\data\lanes\88\a354b2cb\source\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Core.Assemblies\TargetRuntime.cs:line 246 at MonoDevelop.Projects.MSBuild.MSBuildProjectService.<>cDisplayClass81_1.b0() in C:\Users\builder\data\lanes\88\a354b2cb\source\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects.MSBuild\MSBuildProjectService.cs:line 990 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()

    Wednesday, March 2, 2016 12:34 PM
  • User18049 posted

    Try v4.5.1 in your console project and compile that using msbuild from the command line.

    Wednesday, March 2, 2016 1:07 PM
  • User19135 posted

    Build test project from commandline with

    v4.5.1 aslo succeded (mscorlib.dll version 4.6.1055.0).

    For the same test project Xamarin Studio shows (Build > General):

    Target framework: .NETFramework 4.5.1 (Not installed)

    PS These instructions doesn't help Xamarin Studio to found .NET 4.5.1: http://lastexitcode.com/blog/2014/11/16/InstallingPortableClassLibrariesForXamarinStudio/

    Wednesday, March 2, 2016 1:32 PM
  • User19135 posted

    Thanks for help. Looks like solution is: - install .Net Framework 4.5.1 Developer Pack (https://www.microsoft.com/en-us/download/details.aspx?id=40772) - repair Xamarin (not Xamarin Studo)

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, March 2, 2016 2:10 PM