Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. Creating a project template

Creating a project template

Scheduled Pinned Locked Moved Visual Studio
asp-netvisual-studiocsharphtmlwindows-admin
9 Posts 3 Posters 34 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • realJSOPR Offline
    realJSOPR Offline
    realJSOP
    wrote on last edited by
    #1

    VS2017: I've created a project template from a MVC5 project, and then used it to create a new project. I can't find out how to modify the template's start page (the tab that's displayed when the project has been created). Is "start page" even what it's called? Right now, I'm seeing the standard ASP.Net page, but I'd like to provide something more appropriate for the template. Edit ============================== I discovered that the page/tab can be called up by clicking the "Project | Overview" menu item, so I guess it's called the "overview". I still haven't been able to find out how to create one for your custom project template. Edit #2 =========================== I looked at a console app project, and the Project | Overview menu item is not available for it. It looks like this is only for MVC/ASP.Net apps. I still want to do a custom one if it's not too much hassle. EDIT #3 =========================== Weirdness - all of the referenced assemblies had the yellow warning triangle icon. I did a clean/build, and the triangles resolved themselves, but when I ran the app, I got an exception regarding "Roslyn". I stopped debugging, came here to add this edit, and wanted to copy the precise exception message, but when i clean/rebuild and ran the app again, it worked as expected. EDIT #4 =========================== I found out that VS2015 creates a readme.HTML page and displays that in the IDE when you create a new project. However, VS2017 does not. I've looked in the registry, the csproj and sln files, the .vstemplate file, and even the files in the hidden "vs" folder. I'm stumped.

    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
    -----
    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
    -----
    When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

    realJSOPR Richard DeemingR 2 Replies Last reply
    0
    • realJSOPR realJSOP

      VS2017: I've created a project template from a MVC5 project, and then used it to create a new project. I can't find out how to modify the template's start page (the tab that's displayed when the project has been created). Is "start page" even what it's called? Right now, I'm seeing the standard ASP.Net page, but I'd like to provide something more appropriate for the template. Edit ============================== I discovered that the page/tab can be called up by clicking the "Project | Overview" menu item, so I guess it's called the "overview". I still haven't been able to find out how to create one for your custom project template. Edit #2 =========================== I looked at a console app project, and the Project | Overview menu item is not available for it. It looks like this is only for MVC/ASP.Net apps. I still want to do a custom one if it's not too much hassle. EDIT #3 =========================== Weirdness - all of the referenced assemblies had the yellow warning triangle icon. I did a clean/build, and the triangles resolved themselves, but when I ran the app, I got an exception regarding "Roslyn". I stopped debugging, came here to add this edit, and wanted to copy the precise exception message, but when i clean/rebuild and ran the app again, it worked as expected. EDIT #4 =========================== I found out that VS2015 creates a readme.HTML page and displays that in the IDE when you create a new project. However, VS2017 does not. I've looked in the registry, the csproj and sln files, the .vstemplate file, and even the files in the hidden "vs" folder. I'm stumped.

      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
      -----
      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
      -----
      When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      Well, I thinnk I fingered it out, but I have to wait until I get home from work to try it. In VS2015, I created a new MVC app from the MS template, and it created a "Project_Readme.html" file in the project root, and opened the file using the VS2015 internal browser. VS2017 does NOT create this file (the cause is either the latest MVC5 template, or VS2017 itself - my bet is on the template). I'm going to try creating the file manually, create a new template, and then create a project from the template. I will report back with my findings. RESULT ============= Fail.

      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
      -----
      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
      -----
      When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

      1 Reply Last reply
      0
      • realJSOPR realJSOP

        VS2017: I've created a project template from a MVC5 project, and then used it to create a new project. I can't find out how to modify the template's start page (the tab that's displayed when the project has been created). Is "start page" even what it's called? Right now, I'm seeing the standard ASP.Net page, but I'd like to provide something more appropriate for the template. Edit ============================== I discovered that the page/tab can be called up by clicking the "Project | Overview" menu item, so I guess it's called the "overview". I still haven't been able to find out how to create one for your custom project template. Edit #2 =========================== I looked at a console app project, and the Project | Overview menu item is not available for it. It looks like this is only for MVC/ASP.Net apps. I still want to do a custom one if it's not too much hassle. EDIT #3 =========================== Weirdness - all of the referenced assemblies had the yellow warning triangle icon. I did a clean/build, and the triangles resolved themselves, but when I ran the app, I got an exception regarding "Roslyn". I stopped debugging, came here to add this edit, and wanted to copy the precise exception message, but when i clean/rebuild and ran the app again, it worked as expected. EDIT #4 =========================== I found out that VS2015 creates a readme.HTML page and displays that in the IDE when you create a new project. However, VS2017 does not. I've looked in the registry, the csproj and sln files, the .vstemplate file, and even the files in the hidden "vs" folder. I'm stumped.

        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
        -----
        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
        -----
        When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        I suspect you'll need to manually edit the project template file, and set the OpenInWebBrowser attribute on your HTML file's <ProjectItem> entry to true: ProjectItem Element (Visual Studio Project Templates) - Visual Studio | Microsoft Docs[^]


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        realJSOPR 3 Replies Last reply
        0
        • Richard DeemingR Richard Deeming

          I suspect you'll need to manually edit the project template file, and set the OpenInWebBrowser attribute on your HTML file's <ProjectItem> entry to true: ProjectItem Element (Visual Studio Project Templates) - Visual Studio | Microsoft Docs[^]


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          realJSOPR Offline
          realJSOPR Offline
          realJSOP
          wrote on last edited by
          #4

          That looks promising. My google foo is suffering from major suckage lately.

          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
          -----
          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
          -----
          When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

          Richard DeemingR 1 Reply Last reply
          0
          • realJSOPR realJSOP

            That looks promising. My google foo is suffering from major suckage lately.

            ".45 ACP - because shooting twice is just silly" - JSOP, 2010
            -----
            You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
            -----
            When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

            Richard DeemingR Offline
            Richard DeemingR Offline
            Richard Deeming
            wrote on last edited by
            #5

            I think Google's suffering from major suckage lately. They only seem to return results for what they think you meant to search for, rather than what you actually searched for. :doh:


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

            realJSOPR 1 Reply Last reply
            0
            • Richard DeemingR Richard Deeming

              I think Google's suffering from major suckage lately. They only seem to return results for what they think you meant to search for, rather than what you actually searched for. :doh:


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              realJSOPR Offline
              realJSOPR Offline
              realJSOP
              wrote on last edited by
              #6

              I've been googling this on/off for the last four days. :/

              ".45 ACP - because shooting twice is just silly" - JSOP, 2010
              -----
              You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
              -----
              When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

              1 Reply Last reply
              0
              • Richard DeemingR Richard Deeming

                I suspect you'll need to manually edit the project template file, and set the OpenInWebBrowser attribute on your HTML file's <ProjectItem> entry to true: ProjectItem Element (Visual Studio Project Templates) - Visual Studio | Microsoft Docs[^]


                "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                realJSOPR Offline
                realJSOPR Offline
                realJSOP
                wrote on last edited by
                #7

                I had to do the following (in VS2015) 0) Create the desired file in the project you're going to export to a template. 1) Export the template. 2) Shut down Visual Studio. 3) Extract the .vstemplate file from the template.zip file. 4) Add the OpenInBrowser="true" attribute to the appropriate ProjectItem element. 5) Copy the change .vstemplate file back into BOTH copies of the template ZIP file. 6) Restart Visual Studio, and create a new project to see if it worked. I haven't figured out how to redisplay the file without doing Browse With... and selecting the internal web browser. I'll try it on VS2017 later today.

                ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                -----
                You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                -----
                When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                1 Reply Last reply
                0
                • Richard DeemingR Richard Deeming

                  I suspect you'll need to manually edit the project template file, and set the OpenInWebBrowser attribute on your HTML file's <ProjectItem> entry to true: ProjectItem Element (Visual Studio Project Templates) - Visual Studio | Microsoft Docs[^]


                  "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                  realJSOPR Offline
                  realJSOPR Offline
                  realJSOP
                  wrote on last edited by
                  #8

                  Works on VS2017 as well, but still, when I click the View | Overview mene item, I still get MS's ASP.Net propaganda page... :/

                  ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                  -----
                  You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                  -----
                  When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                  L 1 Reply Last reply
                  0
                  • realJSOPR realJSOP

                    Works on VS2017 as well, but still, when I click the View | Overview mene item, I still get MS's ASP.Net propaganda page... :/

                    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                    -----
                    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                    -----
                    When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    I think it's a task masquerading as a tab.

                    "(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups