question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

net451 - Failed to make the following project runnable

See original GitHub issue

Description

I have ported an open-source .Net library MaxMind.Db-Reader to .Net Core. There are three projects in the solution:

  • MaxMind.Db - Library
  • MaxMind.Db.Benchmark - Executable
  • MaxMind.Db.Test - Executable

URL to .Net Core port branch: https://github.com/am11/MaxMind-DB-Reader-dotnet/tree/coreclr-port

Locally, with RID: win10-x86, I have latest DNX and latest CLI (5 hours old) installed; all three projects compile, Benchmark and Test executables run for two TFMs: netstandard1.0 and net451.

When deployed to AppVeyor CI (see appveyor.yml; modified variant of @enricosada’s script: dotnet/sdk#5496), it builds all three project with netstandard1.4 for lib and netcoreapp1.0 for exes, but the exe (Benchmark and Test projects) build fails for net451.

Here is the AppVeyor build log: https://ci.appveyor.com/project/am11/maxmind-db-reader-dotnet/build/1.0.39/job/7no4jns5isw4mn27#L1245

Steps to reproduce

git clone https://github.com/am11/MaxMind-DB-Reader-dotnet -b coreclr-port --recursive

cd MaxMind-DB-Reader-dotnet

git checkout 22eace3

dotnet restore

dotnet -v build -c Debug -f net451 .\MaxMind.Db.Test

Expected behavior

Successfully compiles a lib and two executable projects for both TFMs: net451 and netcoreapp1.0.

Actual behavior

  • Successfully compiles a lib and two executable projects for TFMs netcoreapp1.0.

  • Successfully compiles a lib for TFM net451.

  • Fails to compile two executable projects for TFM net451 with the following error:

    Failed to make the following project runnable

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-rc2-002659)

Product Information: Version: 1.0.0-rc2-002659 Commit Sha: 11a001706f

Runtime Environment: OS Name: Windows OS Version: 6.3.9600 OS Platform: Windows RID: win81-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

9reactions
smbeckercommented, Jul 12, 2016

Still no update? RTM is out and I am still seeing this issue.

1reaction
am11commented, Feb 5, 2017

This issue has been mitigated with latest 1.0.0-rc4-004767. I tested with following steps:

  • Downloaded https://dotnetcli.blob.core.windows.net/dotnet/Sdk/rel-1.0.0/dotnet-dev-win-x64.latest.zip and extracted at c:\temp\dotnet-cli.

  • Then, we first migrate the project and build the csproj:

    cd \temp\dotnet-cli
    git clone https://github.com/maxmin/Maxmind-DB-Reader-dotnet --recursive
    cd Maxmind-DB-Reader-dotnet
    git checkout 822b6c5
    :: we have xproj and project.json in this revision
    
    :: migration will delete project.json and global.json, convert xproj->csproj and update the
    :: .sln file accordingly. The process will also create a `.\backup` with old project files.
    ..\dotnet migrate
    
    :: restore and build
    ..\dotnet restore
    ..\dotnet build -c Debug -f net45  MaxMind.Db.Benchmark
    :: succeeds!
    
    :: Microsoft (R) Build Engine version 15.1.545.13942
    :: Copyright (C) Microsoft Corporation. All rights reserved.
    
    ::   MaxMind.Db -> C:\temp\foodoo\Maxmind-DB-Reader-dotnet\MaxMind.Db\bin\Debug\net45\MaxMind.Db.dll
    ::   MaxMind.Db.Benchmark -> C:\temp\foodoo\Maxmind-DB-Reader-dotnet\MaxMind.Db.Benchmark\bin\Debug\net45\MaxMind.Db.Benchmark.exe
    
    :: Build succeeded.
    ::     0 Warning(s)
    ::     0 Error(s)
    
    :: Time Elapsed 00:00:02.15
    
    :: let's run it
    ..\dotnet run -c Debug -f net45 -p .\MaxMind.Db.Benchmark\MaxMind.Db.Benchmark.csproj MaxMind.Db.Benchmark\GeoLite2-City.mmdb
    
    :: it works! :)
    

Thanks and kudo’s to CLI team for fixing this! 🎉

/cc @oschwald

@piotrpMSFT, should this issue be closed as fixed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to make the following project runnable (Object ...
The only working solution I managed to find is to run the dotnet restore command: C:\Dev\*****>dotnet restore Welcome to .NET Core!
Read more >
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
The target “CoreCompile” does not exist in the project.
I have an issue that my build server throws error saying 'The target ... Targets(262,5): Error : Failed to make the following project...
Read more >
Referencing .NET 4.5.1 libraries in ASP.NET Core
The most difficult part so far has been to get project.json set up with the correct dependencies and frameworks. I'm using a few...
Read more >
.NET core vs .NET framework
NET Core is used to create server applications that run on Windows, Linux and Mac. It does not currently support creating desktop applications...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found