locked
Visual Studio 2015 Scaffolding is not working RRS feed

  • Question

  • Hi everybody,

    In our project we're using scaffolding to create necessary files. It works fine in VS 2013. I got a new laptop with VS 2015 installed and the scaffolding is no longer working. It doesn't work for other developers in the team in VS 2015.

    I'm getting the following error when I try to activate the Package Manager Console and try to run the scaffolding command:

                  

    Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

    Package Manager Console Host Version 3.1.1.0

    Type 'get-help NuGet' to see all available NuGet commands.

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\T4Scaffolding.Core.1.0.0\tools\init.ps1:50 char:9
    +         Set-DefaultScaffolder -Name CustomTemplate -Scaffolder T4Scaf ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\T4Scaffolding.Core.1.0.0\tools\init.ps1:51 char:9
    +         Set-DefaultScaffolder -Name CustomScaffolder -Scaffolder T4Sc ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\T4Scaffolding.1.0.8\tools\init.ps1:6 char:1
    + Set-DefaultScaffolder -Name DbContext -Scaffolder T4Scaffolding.EFDbC ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\T4Scaffolding.1.0.8\tools\init.ps1:7 char:1
    + Set-DefaultScaffolder -Name Repository -Scaffolder T4Scaffolding.EFRe ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\T4Scaffolding.Core.1.0.0-vs2013\tools\init.ps1:50 char:9
    +         Set-DefaultScaffolder -Name CustomTemplate -Scaffolder T4Scaf ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\T4Scaffolding.Core.1.0.0-vs2013\tools\init.ps1:51 char:9
    +         Set-DefaultScaffolder -Name CustomScaffolder -Scaffolder T4Sc ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\T4Scaffolding.1.0.7-vs2013\tools\init.ps1:6 char:1
    + Set-DefaultScaffolder -Name DbContext -Scaffolder T4Scaffolding.EFDbC ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\T4Scaffolding.1.0.7-vs2013\tools\init.ps1:7 char:1
    + Set-DefaultScaffolder -Name Repository -Scaffolder T4Scaffolding.EFRe ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\MvcScaffolding.1.0.9\tools\init.ps1:47 char:1
    + Set-DefaultScaffolder -Name Controller -Scaffolder MvcScaffolding.Con ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\MvcScaffolding.1.0.9\tools\init.ps1:48 char:1
    + Set-DefaultScaffolder -Name Views -Scaffolder MvcScaffolding.Views -S ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\MvcScaffolding.1.0.9\tools\init.ps1:49 char:1
    + Set-DefaultScaffolder -Name Action -Scaffolder MvcScaffolding.Action  ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\MvcScaffolding.1.0.9\tools\init.ps1:50 char:1
    + Set-DefaultScaffolder -Name UnitTest -Scaffolder MvcScaffolding.Actio ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
    At C:\_Siriusware\Main\SysManager\packages\MvcScaffolding.1.0.9\tools\init.ps1:54 char:1
    + Set-DefaultScaffolder -Name View -Scaffolder $viewScaffolder -Solutio ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
        + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet

    PM> Scaffold SysManager.ScaffoldBackend.For pts4grp
    Invoke-Scaffolder : A positional parameter cannot be found that accepts argument 'pts4grp'.
    At line:1 char:1
    + Scaffold SysManager.ScaffoldBackend.For pts4grp
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Invoke-Scaffolder], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,T4Scaffolding.Cmdlets.InvokeScaffolderCmdlet

    PM> Scaffold SysManager.ScaffoldBackend.For pts4grp
    Invoke-Scaffolder : A positional parameter cannot be found that accepts argument 'pts4grp'.
    Operation is not valid due to the current state of the object.

    I tried re-installing t4scaffolding and t4Core and got some errors along the way as well. What is the solution for this problem?


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Wednesday, September 9, 2015 2:02 AM

Answers

All replies

  • Hi Naomi  N,

    It seems that other members also meet the simliar issue like this issue:

    http://stackoverflow.com/questions/31890649/t4-scaffolding-not-working-with-visual-studio-2015

    Like David Anderson's suggestion, since it worked well in VS2013, but not in VS2015, if possible, please make sure that it is not the extension tool issue. For example, maybe it has a new update version like the NuGet package update or others.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 10, 2015 6:40 AM
  • Yes, thanks. I saw that discussion and will be waiting for instructions. For now I'm working on my older laptop with VS 2013 installed.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Thursday, September 10, 2015 11:53 AM
  • Yes, thanks. I saw that discussion and will be waiting for instructions. For now I'm working on my older laptop with VS 2013 installed.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles


    Thank you for your support and co-operation, Naomi  N:)

    But if still no help, since other members also get the same issue as yours, to get the issue confirmed and diagnose by product team, maybe you could create connect report for it, you will get email notification for update from the product team members directly.http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 11, 2015 7:46 AM
  • Thanks, Jack. I'll post this issue very soon on Connect and other place.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Friday, September 11, 2015 11:46 AM
  • Thanks, Jack. I'll post this issue very soon on Connect and other place.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    If you submitted it, please also share us the link here, so we could also get the latest information from the product team members, and other members could help you vote it if they get the same issue as yours.

    Have a nice day,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 14, 2015 9:01 AM
  • Thanks, Jack. I just submitted this issue:

    https://connect.microsoft.com/VisualStudio/feedbackdetail/view/1798314/scaffolding-no-longer-working


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Wednesday, September 16, 2015 3:13 PM
  • Strange, but the link doesn't work for me anymore. Can anyone still access it? Why would it disappear?

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Thursday, September 24, 2015 3:29 PM
  • Hi Naomi  N,

    I could visit it here:

    https://connect.microsoft.com/VisualStudio/feedbackdetail/view/1798314/scaffolding-no-longer-working

    The report team members are currently reviewing the issue you have submitted. Maybe the site has certain updates, you could try to visit it later.

    Thanks,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 25, 2015 1:56 AM
  • It didn't work earlier in the morning, but got fixed somehow later.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Friday, September 25, 2015 3:01 AM
  • David Anderson released a new version of the MVC Scaffolding that resolved the problem for me in VS 2015.

    See http://stackoverflow.com/questions/31890649/t4-scaffolding-not-working-with-visual-studio-2015


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Thursday, October 15, 2015 4:16 AM
  • UPDATE. After I uninstalled everything related to VS 2015 for scaffolding, I was able to Scaffold from Visual Studio 2015.

    In Visual Studio 2017 I got no output and nothing got generated (silently).

    ------------------------------------------------------------------------------

    Ok, I'm back to exactly same problem again but now I have VS 2017 and VS 2015.

    In VS 2015 I'm getting

     

    PM> Scaffold SysManager.ScaffoldBackend.For IItem
    Invoke-Scaffolder : A positional parameter cannot be found that accepts argument 'IItem'.
    At line:1 char:1
    + Scaffold SysManager.ScaffoldBackend.For IItem
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Invoke-Scaffolder], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,T4Scaffolding.Cmdlets.InvokeScaffolderCmdlet

    In VS 2017 it just silently does absolutely nothing. I uninstalled MVC and T4 Scaffoldings for 2015 and only left 2017 scaffolding installed (the very latest released today).

    Still it doesn't work for me.

    Please help.


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles


    • Edited by Naomi N Thursday, August 3, 2017 5:19 AM
    Thursday, August 3, 2017 4:38 AM