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.

"dotnet cache" --framework-version option should default from <RuntimeFrameworkVersion> in the proj file

See original GitHub issue

Create a project file that has the Packages you want to cache. For example:

<Project Sdk="Microsoft.NET.Sdk">
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="1.3.0" />
    <PackageReference Include="Libuv" Version="1.9.1" />

dotnet cache --entries CacheStuff.csproj -r win10-x64

Expected Results

The command succeeds

Actual Results

The RuntimeFrameworkVersion (which is used for all other commands to specify the Microsoft.NETCore.App version) is not respected.

Restoring packages for C:\Users\eerhardt\AppData\Local\Temp\owyfsgzn.y2x\Optimize\OptimizeCrossgen_win10-x64_netcoreapp2.0.csproj...
F:\dotnet\sdk\2.0.0-preview1-005383\NuGet.targets(97,5): error : Unable to resolve 'Microsoft.NETCore.App (>= 2.0.0)' for '.NETCoreApp,Version=v2.0'. [C:\Users\eerhardt\AppData\Local\Temp\owyfsgzn.y2x\Optimize\OptimizeCrossgen_win10-x64_netcoreapp2.0.csproj]
F:\dotnet\sdk\2.0.0-preview1-005383\NuGet.targets(97,5): error : Unable to resolve 'Microsoft.NETCore.App (>= 2.0.0)' for '.NETCoreApp,Version=v2.0 (win10-x64)'. [C:\Users\eerhardt\AppData\Local\Temp\owyfsgzn.y2x\Optimize\OptimizeCrossgen_win10-x64_netcoreapp2.0.csproj]


If I repeat myself on the command line by passing in --framework-version 2.0.0-beta-001682-00, it works.

/cc @gkhanna79 @blackdwarf

Issue Analytics

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

github_iconTop GitHub Comments

nguerreracommented, Mar 29, 2017

My hope is that we completely remove FX_Version, and just map --framework-version to RuntimeFrameworkVersion.

Is this done?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Select which .NET version to use
NET CLI must choose an SDK version for every dotnet command. It uses the latest SDK installed on the machine by default, even...
Read more >
Do I still need the RuntimeFrameworkVersion project ...
This setting is most typically seen with a self-contained deployment. In this case it clearly states what version the application is using.
Read more >
RuntimeFrameworkVersion seems to be ignored #54141
Description I am trying to work around #53990, where a regression in .net runtime 5.0.7 is causing fatal exceptions on interop.
Read more >
.NET Core buildpack | Cloud Foundry Docs
Deploying apps with multiple projects; Use non-Default package sources; Deactivating and clearing your NuGet package cache. Framework ...
Read more >
Use the Tanzu .NET Core Buildpack
This topic tells you how to use the Tanzu .NET Core Buildpack. The Tanzu .NET Core Buildpack supports building several configurations of ....
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 Post

No results found

github_iconTop Related Hashnode Post

No results found