locked
Lightswitch Project Template Woes RRS feed

  • Question

  • I follow the instructions at http://msdn.microsoft.com/en-us/library/xkh1wxd8.aspx and create a project template, (Menu->File->Export Template). However, when I try to use the template when creating a new project, I get an error: "The project file cannot be found".

    Anybody, please help.

    Bruce


    Bruce

    Saturday, August 10, 2013 6:48 PM

Answers

All replies

  • Hi Bruce,

    Based on my understanding, you create the project template successfully and you encounter the error when you try to use the template, right?

    If so, there are several ways to locate the problem when a template fails to load in the development environment.

    validate the .vstemplate file

    1.Locate the .zip file that contains the template.

    2.Extract the .zip file.

    3.On the File menu in Visual Studio, click Open, and then click File.

    4.Select the .vstemplate file for the template, and click Open.

    5.Verify that the XML of the .vstemplate file adheres to the Visual Studio template schema.

    6.Save and close the .vstemplate file.

    7.Select the files included in your template, right-click, select Send To, and click Compressed (zipped) Folder. The files that you selected are compressed into a .zip file.

    8.Place the new .zip file in the same directory as the old .zip file.

    9.Delete the extracted template files and the old template .zip file.

    locate template errors in Event Viewer

    1.In Windows, click Start, click Control Panel, double-click Administrative Tools, and then double-click Event Viewer.

    2.In the left pane, click Application.

    3.Look for events with a Source value of Visual Studio - VsTemplate.

    4.Double-click on a template event to view the error.

    For more detail, you may refer to troubleshoot template 

    Please keep me informed if I do not catch your idea. Also, please provide us more detail to troubleshoot if the solution above does not work.




    Yunjie Pei
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Monday, August 12, 2013 11:02 AM
  • Thanks for the reply, but following the steps you indicated did not resolve the problem.

    I think this is a bug, easily duplicated. Can you try and see if you get the same results? Should only take a couple of minutes:

    File->New->Project
    Select: Lightswitch HTML Application (Vsual C#)
    Name the new project: TestTemplate
    Add a DesktopClient
    Create a table with a couple of fields
    Create a List and Details screen based on the table created
    Change to Release
    Build the Solution
    Run the application, add some data to validate it, close it.
    Back in visual studio
    Save everything
    Select the solution
    Select File->Export Template
    Select "Project Template"->Next
    Complete Template Name and Description with "TestTemplate1"
    Make sure "Automatically import the template into Visual Studio" is checked.
    Clck Finish
    Exit Visual Studio
    Run Visual Studio
    Try to create a new project based on the new template:
    File->New->Project
    Go to the Templates->Lightswitch section.
    Select: TestTemplate1
    Click Go
    Error is encountered: "The project file cannot be found."


    Bruce

    Monday, August 12, 2013 2:21 PM
  • Hi Bruce,

    I think you could consider submitting this issue to Microsoft connect center , our engineer will reproduce this issue according to the proof you provide, and we will evaluate this issue seriously, then we will give quick and positive response for you.


    Yunjie Pei
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 13, 2013 5:59 AM
  • I created the bug report:

    https://connect.microsoft.com/VisualStudio/feedback/details/797220/lightswitch-create-project-template-problem

    Anybody following this thread; this issue will block the ability to release new Lightswitch project templates. It's a big problem for us as we are close to releasing a new product and cannot until this is addressed. If you develop or use Visual Studio tools and see the possibility of this affecting you, please access the bug link and vote to get it fixed.

    Thanks,

    Bruce


    Bruce

    Tuesday, August 13, 2013 11:52 AM
  • I'm having this same problem.  The connect bug is now closed but no solution is posted.  

    At first I thought the problem was that the VS Export Template feature will only export each project independently not all of the projects as a solution.  I tried exporting each of the projects in the solution, creating a root .vstemplate file (following instructions for multi-project templates), and zipping all of the files.  I get the same errors as before. Has anyone been able to create LS project or solution templates in VS2013?  What is the trick?  Thanks!


    • Edited by Hessc Monday, July 14, 2014 2:06 AM
    Monday, July 14, 2014 2:05 AM
  • Following up on this... has anyone figured out how to create a template from a LightSwitch solution?  Successfully?
    Friday, November 7, 2014 6:46 PM