"dotnet cache" --framework-version option should default from <RuntimeFrameworkVersion> in the proj file
See original GitHub issueCreate a project file that has the Packages you want to cache. For example:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>2.0.0-beta-001682-00</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="1.3.0" />
<PackageReference Include="Libuv" Version="1.9.1" />
</ItemGroup>
</Project>
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]
Notes
If I repeat myself on the command line by passing in --framework-version 2.0.0-beta-001682-00
, it works.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes. See https://github.com/dotnet/sdk/commit/91ff2017b3ac427ea13f7f5f5ad66d93a7ddba82 https://github.com/dotnet/cli/commit/a48f3a6bbff4a818f13255b739d67ce2684d10bf
Is this done?