Create a Nuget Package
-
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 -
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, 2013It 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[^]
-
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[^]
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 -
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, 2013Well, 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[^]
-
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[^]
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 -
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[^]
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 -
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, 2013Make 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 :-\
-
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 :-\
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 -
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 :-\
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