Skip to content

added tests to check if the templates shipped with SDK have net6.0 set as default framework#10238

Merged
vlada-shubina merged 4 commits intodotnet:mainfrom
vlada-shubina:master
Apr 30, 2021
Merged

added tests to check if the templates shipped with SDK have net6.0 set as default framework#10238
vlada-shubina merged 4 commits intodotnet:mainfrom
vlada-shubina:master

Conversation

@vlada-shubina
Copy link
Member

@vlada-shubina vlada-shubina commented Apr 16, 2021

fixes dotnet/templating#3054 fixes dotnet/templating#2797
Added tests to check if the templates shipped with SDK have net6.0 set as default framework for .NET 6 SDK

Also, added new data sets for templating managed templates and added basic tests on item templates as they were missing
Console templates are targeting net6.0 already so fixes #8974

…plates shipped with SDK have net6.0 set as default framework

adds new data sets for templating managed templates
adds basic tests on item templates as they were missing
console templates are targeting net6.0 already so fixes dotnet#8974
@vlada-shubina
Copy link
Member Author

@dsplaisted @sfoslund could you please review?
I've added tests to ensure that default framework in SDK shipped templates is correct (.net6.0 for SDK .NET6) and also some minor tweaks for templates we managing. Thanks.
Thanks.

Copy link
Member

@dsplaisted dsplaisted left a comment

Choose a reason for hiding this comment

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

What do you expect to happen with these tests when we start .NET 7.0? Typically we have a new runtime and SDK for a while before all the templates are updated.

@vlada-shubina
Copy link
Member Author

vlada-shubina commented Apr 20, 2021

What do you expect to happen with these tests when we start .NET 7.0? Typically we have a new runtime and SDK for a while before all the templates are updated.

For now, DetectExpectedDefaultFramework will throw an exception is SDK is different from .NET 6 and it's om purpose.
My understanding that we are not sure if .NET 7 templates should target net6.0 or net7.0 by default and that is decision to be taken. I expect that when .NET 7 is kicked off the decision is already made, so the test can be adjusted accordingly. I can replace logic with picking up tfm for .NET (net6.0 for .NET 6, net7.0 for .NET 7) but i think it is less reliable than explicit manual action of adding condition for new major with correct default tfm.

As for the period, when templates are not ready, the tests can be disabled conditionally if the test failure is blocking. I believe before first public preview anyway the templates should be fixed to produce correct output, so fixing them asap and including correct version is of benefit.

@vlada-shubina vlada-shubina merged commit ac6ce6b into dotnet:main Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants