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. Create a Nuget Package

Create a Nuget Package

Scheduled Pinned Locked Moved Visual Studio
asp-netvisual-studiocollaborationarchitecturequestion
9 Posts 2 Posters 10 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 Online
    realJSOPR Online
    realJSOP
    wrote on last edited by
    #1

    I'm working through the process of creating a private (only for use by our dev team) nuget package for MVC apps, and I want to modify the /Views/web.config. If I create a Views.web.config.install.xdt (and ...uninstall.xdt) file, will it know what to do? I've only been able to find examples of "web.config.install.xdt", and nobody associated with thiose examples has ever mentioned the web.config in the Views folder.

    ".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

    R 1 Reply Last reply
    0
    • realJSOPR realJSOP

      I'm working through the process of creating a private (only for use by our dev team) nuget package for MVC apps, and I want to modify the /Views/web.config. If I create a Views.web.config.install.xdt (and ...uninstall.xdt) file, will it know what to do? I've only been able to find examples of "web.config.install.xdt", and nobody associated with thiose examples has ever mentioned the web.config in the Views folder.

      ".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

      R Offline
      R Offline
      RickZeeland
      wrote on last edited by
      #2

      It seems possible according to the answer here: c# - Change current web.config with custom Nuget package - Stack Overflow[^] And also: Creating a NuGet Package in 7 easy steps - Plus using NuGet to integrate ASP.NET MVC 3 into existing Web Forms applications - Scott Hanselman[^]

      realJSOPR 2 Replies Last reply
      0
      • R RickZeeland

        It seems possible according to the answer here: c# - Change current web.config with custom Nuget package - Stack Overflow[^] And also: Creating a NuGet Package in 7 easy steps - Plus using NuGet to integrate ASP.NET MVC 3 into existing Web Forms applications - Scott Hanselman[^]

        realJSOPR Online
        realJSOPR Online
        realJSOP
        wrote on last edited by
        #3

        Yeah, I've seen all that, but nobody (that I've found) mentions the web.config in the Views folder.

        ".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

        R 1 Reply Last reply
        0
        • realJSOPR realJSOP

          Yeah, I've seen all that, but nobody (that I've found) mentions the web.config in the Views folder.

          ".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

          R Offline
          R Offline
          RickZeeland
          wrote on last edited by
          #4

          Well, then it's a question of trial and error I guess. In case you are looking for a private NuGet server, here are some options: private-nuget-servers[^]

          realJSOPR 1 Reply Last reply
          0
          • R RickZeeland

            Well, then it's a question of trial and error I guess. In case you are looking for a private NuGet server, here are some options: private-nuget-servers[^]

            realJSOPR Online
            realJSOPR Online
            realJSOP
            wrote on last edited by
            #5

            Nope, it's a local dev team only package, and we already have a local repository on a network share (because our dev boxes don't have internet connectivity).

            ".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
            • R RickZeeland

              It seems possible according to the answer here: c# - Change current web.config with custom Nuget package - Stack Overflow[^] And also: Creating a NuGet Package in 7 easy steps - Plus using NuGet to integrate ASP.NET MVC 3 into existing Web Forms applications - Scott Hanselman[^]

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

              I created the following files: web.config.install.xdt web.config.uninstall.xdt I tried: 0) Creating a Views folder in the package Content folder, and putting the XDT files in it (no error, but web.config not modified) 1) Moving the files out of the views folder and directly into Content (error saying the element wasn't found in the (root) web.config, because, well, it's not in that web.config) 2) Renaming the files to views.web.config... (no error, but web.config not modified) I'm not sure if this is even doable at this point.

              ".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

              R 1 Reply Last reply
              0
              • realJSOPR realJSOP

                I created the following files: web.config.install.xdt web.config.uninstall.xdt I tried: 0) Creating a Views folder in the package Content folder, and putting the XDT files in it (no error, but web.config not modified) 1) Moving the files out of the views folder and directly into Content (error saying the element wasn't found in the (root) web.config, because, well, it's not in that web.config) 2) Renaming the files to views.web.config... (no error, but web.config not modified) I'm not sure if this is even doable at this point.

                ".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

                R Offline
                R Offline
                RickZeeland
                wrote on last edited by
                #7

                Make sure you use forward slashes for content, so that would be:

                content/views

                If that doesn't work, then maybe you can use an init.ps1 file, see article here: Writing a NuGet Package That Adds A Command To The PowerShell Console | You’ve Been Haacked[^] Bon chance mon ami :-\

                realJSOPR 2 Replies Last reply
                0
                • R RickZeeland

                  Make sure you use forward slashes for content, so that would be:

                  content/views

                  If that doesn't work, then maybe you can use an init.ps1 file, see article here: Writing a NuGet Package That Adds A Command To The PowerShell Console | You’ve Been Haacked[^] Bon chance mon ami :-\

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

                  I’ll look into the power shell thing. I’m using the package explorer app to build the package, so I’m assuming they got the slashes right.

                  ".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
                  • R RickZeeland

                    Make sure you use forward slashes for content, so that would be:

                    content/views

                    If that doesn't work, then maybe you can use an init.ps1 file, see article here: Writing a NuGet Package That Adds A Command To The PowerShell Console | You’ve Been Haacked[^] Bon chance mon ami :-\

                    realJSOPR Online
                    realJSOPR Online
                    realJSOP
                    wrote on last edited by
                    #9

                    Well, I couldn't get it to update the Views/web.config, so I gave up on that particular aspect. I did finger out how to display an icon from the local nuget repository, and MS is all about icons, so silver linings. :)

                    ".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
                    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