-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeFrameworkVersion seems to be ignored #54141
Comments
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsDescriptionI am trying to work around #53990, where a regression in .net runtime 5.0.7 is causing fatal exceptions on interop. I added Steps for reproducing this
What's going on here? Why is My concrete use case is a <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<PackAsTool>true</PackAsTool>
<ToolCommandName>myToolName</ToolCommandName>
<PackageId>myToolName</PackageId>
<Version>1.2.3</Version>
<RuntimeFrameworkVersion>5.0.6</RuntimeFrameworkVersion>
</PropertyGroup>
</Project> I deploy my tool as a nuget package, so my deployment steps are dotnet build project.csproj -c Release
dotnet pack project.csproj .c Release -o tmp
dotnet tool update -g --add-source=tmp myToolName I see that when I publish my application using Other information
|
The The roll forward behaviour can be configured through the
When a runtime identifier is specified during publish, the deployment is assumed to be self-contained (so |
Thanks @elinor-fung for pointing In any case, I can now finally continue my work again, as I'm leaving this issue open for now because maybe it's worth having a discussion about the properties itself, not just the docs? Thanks! |
Thanks for referencing those, @vitek-karas! I was thinking that it would be more intuitive to me, if I could specify the In my case, I would have just specified If I understand #43332 and #45306 right, it's focused on |
Thanks for the details! #43332 is mostly about the runtime side of things. When the app starts the version ranges would be in the You're right that there should also be an SDK side of this, which could contain changes to I don't think
Roll forward can do this today and there are use cases for both. |
I'm closing this in favor of #43332 which tracks the overall scenarios better. |
Description
I am trying to work around #53990, where a regression in .net runtime 5.0.7 is causing fatal exceptions on interop. I added
<RuntimeFrameworkVersion>5.0.6</RuntimeFrameworkVersion>
to my csproj file, but printingSystem.Environment.Version
still results in 5.0.7.Steps for reproducing this
dotnet new console
Program.cs
to print outConsole.WriteLine(Environment.Version);
dotnet build
dotnet run
5.0.7
project.csproj
to include<RuntimeFrameworkVersion>5.0.6</RuntimeFrameworkVersion>
in aPropertyGroup
, as described in https://docs.microsoft.com/en-us/dotnet/core/versions/selectiondotnet clean
dotnet build
dotnet run
5.0.7
dotnet publish
cd bin/Debug/net5.0/publish
runtimeOptions.framework.version
in theproject.runtimeconfig.json
file reads5.0.6
project.exe
ordotnet project.dll
What's going on here? Why is
RuntimeFrameworkVersion
ignored in all these cases?My concrete use case is a
dotnet tool
, so my csproj structure isI deploy my tool as a nuget package, so my deployment steps are
I see that when I publish my application using
dotnet publish -c Release -r win-x64 -p:PublishReadyToRun=true
, then running the application prints 5.0.6 as expected, but that doesn't seem like a feasible solution for deployment as dotnet tool.Other information
The text was updated successfully, but these errors were encountered: