Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Error: canonical TargetFrameworkOverride was already defined for canonical skipRestore #1227

Closed
sylvaincaillot opened this issue Aug 25, 2017 · 3 comments

Comments

@sylvaincaillot
Copy link

Trying to create templates, I have the following error for Aurelia, vue and knockout templates:

Option variant - for canonical TargetFrameworkOverride was already defined for canonical skipRestore
   at Microsoft.TemplateEngine.Cli.ExtendedCommandParser.MapTemplateParamToCanon
ical(String variant, String canonical)
   at Microsoft.TemplateEngine.Cli.ExtendedCommandParser.SetupTemplateParameters
(IParameterSet allParams, IReadOnlyDictionary`2 longNameOverrides, IReadOnlyDict
ionary`2 shortNameOverrides)
   at Microsoft.TemplateEngine.Cli.New3Command.ParseTemplateArgs(ITemplateInfo t
emplateInfo)
   at Microsoft.TemplateEngine.Cli.New3Command.<EnterSingularTemplateManipulatio
nFlowAsync>d__64.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAw
aiter.GetResult()
   at Microsoft.TemplateEngine.Cli.New3Command.<EnterTemplateManipulationFlowAsy
nc>d__65.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAw
aiter.GetResult()
   at Microsoft.TemplateEngine.Cli.New3Command.<ExecuteAsync>d__66.MoveNext()

It works fine for react and angular.

I am using the following command line:
dotnet new vue

Thank you

S.

@SteveSandersonMS
Copy link
Member

What version of the .NET Core CLI are you using? dotnet new vue is working OK for me on .NET Core 2.0.0.

Also, what version of Microsoft.AspNetCore.SpaTemplates do you have installed? Can you check it's the latest version (1.0.0)?

@sylvaincaillot
Copy link
Author

Thank you @SteveSandersonMS.
I have downloaded the .Net Core 2.0.0. I just need now to understand how I can swith form my command line to my current SDk (1.0.4) to the new one. Any tips?
The version of the spaTemplates is fine.
S.

@SteveSandersonMS
Copy link
Member

When you have the 2.0.0 SDK installed, that will be used as default - you don't need any other actions.

The only thing that can override this is if you have a global.json file in your directory or one of the ancestor directories, configuring the CLI tool to use a different SDK. In that case, delete any such global.json files or move to a different directory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants