I'm creating a nuget package to install some ascx files into a solution. The folder i want the ascx files to be stored in will be different depending on the project. IE folder name will be the same as the project name.
Is it possible to have a pop up to capture text so I can rename the folder in the content section of a nuget package during install. Is it then possible to add this folder name to the namespace of the files within the folder?
I know its possible to add $rootnamespace$ with a .pp extension to replace the key with the correct root namespace, but can you append to this too?
You ought to look into the options for Automatically Running PowerShell Scripts During Package Installation and Removal.
Related
Is it possible to create Eclipse-style folders (Project Folder, Package and so on) via the Terminal?
I once renamed an Eclipse package like this: mv oldname newname, and I noticed that after doing so, Eclipse no longer considered the folder a Package.
This possibly means that it is a matter of metadata, but I have so far been unsuccessful in locating the files containing the relevant information.
Eclipse does not provide anything to do this and it is not really possible manually.
For a project some information is stored in the .project file in the project folder. Depending on the type of project there may also be a .classpath file and there will also be data stored in the .metadata folder in the workspace and also in a .settings folder in the project.
All the file and folder names starting with . are considered to be hidden on Linux, Unix and Mac systems and are not shown by default. Use the -a flag of ls to see them.
Is there a way to examine the contents of a NuGet package to see what changes it will be making? There is no option for this on the Nuget.exe command line and I do not find any information about this in the NuGet docs.
.nupkg files are just ZIP files with some metadata, so you can have a look at the contents. The NuGet Package Explorer should make it a little easier to view the contents.
The NuGet Gallery (e.g. https://www.nuget.org/) has a "Download" link on the right hand side, otherwise just install the package into an empty project and then take a peek.
Windows Users:
As Jonathon Rossi pointed out,
.nupkg files are just ZIP files, so you can have a look at the contents
So on a windows machine, for a temporary fix, just change the file extension from .nupkg to .zip, and then just use Windows' File Explorer to leverage the existing file association for .zip (CompressedFolder) files.
It is possible to "permanently" associate .nupkg with your system's CompressedFolder tool. However, this will corrupt the IconCache.db at the very least, and the typical method to restore it does not work for me (deleting the IconCache.db and rebooting). So I would recommend against associating .nupkg with CompressedFolder if you are concerned with seeing the correct file icon in File Explorer.
With that in mind, if you want a longer term solution for opening .nupkg files without changing their extension...
You can set a file association easily via a command prompt (cmd) like so:
These files will now have the same icon as any other CompressedFolder on your file system, and you can leave their extensions unchanged (as .nupkg).
To undo this association, repeat assoc command for the .nupkg but leave the RHS blank:
You can confirm the current file association at any time by running assoc .nupkg, dropping the equals sign (=).:
Another solution would be to use DotPeek.
It has an option to decompile packages from NuGet directly and NuGet caches.
I have a package that contains some files that I want added at a solution level rather than a project level. I am able to add a folder at the solution level, but cannot determine how to add my files into to this folder.
You can do this by placing your code in the init.ps1 file. install.ps1 only executes with project-level packages. Because the code will be in init.ps1, it will run every time the solution loads - not just at install. so you will need to safeguard against re-execution. See this post for a code example - You'll just need to add a step to copy from the tools folder to the solution folder.
Install4j has the system variable sys.docsdir that will create a data directory in the proper place. But I can not find an action to add to the installation that will create an empty directory. What is the action? If I need to create custom script, a sample would be awesome.
The installer variable sys.docsdir contains the path to the user-specific "Documents" folder on Windows, it does not create a directory.
To install files into a subfolder of the sys.docsdir directory, add a new root under Files->Define distribution tree with the name ${installer:sys.docsdir}/myfolder and add the files below that folder.
To install to a folder that is resolved at runtime, the name of the installation root can contain your own installer variable, like ${installer:myDataDir}. In that case, you have to define that variable (for example with a "Set a variable" action) before the "Install files" action runs.
You may find your answer here, in the following link:
http://blog.ej-technologies.com/2010/12/more-installation-options-with.html
Hope it helps you.
I am using WaveMaker and Eclipse IDE. In WaveMaker,I create java services and edit them using eclipse. Have to set its default service package's path into services/serviceName/src package folder.Right clicking on src folder and select 'Use as Source Folder' option open another window.
Now the problem is:
my folder name is now : services/serviceName/src/com/subpackage1/subpackage2/subpackage3/subpackage4/subpackage5
I want to rename it as services/serviceName/src with default package in which java file is there. Its not allowing me to rename it as above..
Below is the screenshot.
I want to rename it to services/userSignupService/src
I think you're slightly mistaken here.
services/serviceName/src/com/subpackage1/subpackage2 is not the name of your folder. It is just the full package path.
Your services/serviceName/src will still be there if you can go to the workspace in Windows Explorer and explore
Okay. I was giving full path name while creating java service in wavemaker. I've created it without full path. and in Eclipse, Right Click>Build Path>Use as source folder works.