Skip to content

Produce a .version file for Microsoft.NETCore.App in the runtime layout. - #47717

Merged
3 commits merged into
dotnet:masterfrom
jkoritzinsky:produce-dotversion
Feb 2, 2021
Merged

3 commits merged into
dotnet:masterfrom
jkoritzinsky:produce-dotversion

Conversation

@jkoritzinsky

Copy link
Copy Markdown
Member

Fixes an issue with VS not showing .NET 6 in the TFM dropdown for a new project.

@jkoritzinsky jkoritzinsky added this to the 6.0.0 milestone Feb 1, 2021
@jkoritzinsky
jkoritzinsky requested review from a team and dsplaisted February 1, 2021 18:33
</ItemGroup>

<!-- VS uses this file to show the target framework in the drop down. -->
<Target Name="CreateDotVersionFile" DependsOnTargets="InitializeSourceControlInformationFromSourceControlManager" BeforeTargets="GetFilesToPublish">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not needed all up? aka, will this fit better on the SFX sdk. Also, this feels like a really soft contract with VS. Why do they need said file? And can this be tested for, or added as a check in the SFX sdk?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsplaisted can speak more to the implicit contract with VS and if we need to do this all up in the SFX SDK.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the details, it has to do with how the template engine works. @phenning or someone from @donJoseLuis's team can probably explain more about it.

It does seem like it should go in the shared framework SDK, as it looks like all 3 shared frameworks in .NET 5 had the .version file. But if we want to fix this for .NET 6 preview 1 then we might want a quicker change in this repo for that.

@hoyosjs hoyosjs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It this is needed for 6.0p1, this looks good. Just remains the question of the contract with VS and if it should be in the SFX SDK, but that shouldn't block this.

@ViktorHofer ViktorHofer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks. Let's make sure that we follow-up on moving this into the sfx sdk if appropriate.

@phenning

phenning commented Feb 2, 2021 via email

Copy link
Copy Markdown
Member

@hoyosjs

hoyosjs commented Feb 2, 2021

Copy link
Copy Markdown
Member

Some historical context: The reason we check for this file is to make sure that we have a runtime installed for corresponding templates so that users don’t run into a situation where templates targeting a particular SDK are installed with the SDK or Visual Studio but no runtime was present which would cause F5 to fail. We don’t simply check for the folder, but instead this file since it we’ve seen the folder left behind in the past due to setup uninstall issues.

Good to know. If this was just for runtime, then I'd recommend using a file that needs to be present, like System.Private.Corelib.dll, but if this is a generic check for F5 on all project types, then SFX SDK should have this as a contract for interaction with VS.

@jkoritzinsky

Copy link
Copy Markdown
Member Author

I'll start the process of backporting this to 6.0p1 tomorrow morning first thing. And start working on integrating this into the SDK in Arcade for master after that.

@ghost

ghost commented Feb 2, 2021

Copy link
Copy Markdown

Hello @jkoritzinsky!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost
ghost merged commit b23ccde into dotnet:master Feb 2, 2021
@jkoritzinsky

Copy link
Copy Markdown
Member Author

/backport to release/6.0-preview1

@github-actions

github-actions Bot commented Feb 2, 2021

Copy link
Copy Markdown
Contributor

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants