If I have a ASP.Net solution named "MyApp", that includes a single project "MyApp", and I then want to change both of them to "MyNewApp" - How can I do it safely, namely:
Without (breaking and then) needing to edit manually configuration files (that's what happened when I changed the names manually, and managed to fix it using this answer).
Without (breaking and then) needing to edit the .sln file.
Without needing to change the projects path.
I mean, is/are there any menu/s in VS enabling that?
There is no SAFE way of doing it.
The best one is to use the find and replace for all the project files
with Entire Solution filter.
First do copy the exact files in another location
Open the solution in new location, Find existing name and replace with the new one.
Open the .sln file with notepad and edit the file.
Related
I've written an Extension that, among many other things, renames files based on the Types they contain.
This works fine for files in the directory-tree under the csproj-file -- I find the ProjectItem entry for the file and change its name.
For 'linked'-files (those not in the directory-tree) I can rename the file (via File.Move()) but haven't found a way to programatically modify the csproj-file (after the rename the csproj-file has to be modified manually).
If this is something that can be done I'd appreciate a pointer to the docs showing how to implement the functionality.
The easiest solution for me was to modify the csproj-file.
Open, read whole file, close.
Verify that file I want to rename (e.g. xxx.cs) only occurs in 1 directory
(if it occurs in multiple directories the change has to be done manually.)
Make change
Open, write whole file, close
For an SDK project the change is applied immediately.
For a non-SDK project the change is applied after responding to the prompt that the csproj-file has been modified.
Working Direcotry Cannot Change It's saying that there's an error in my code but I've tried it multiple times with countless variations on the code (I wiped my past attempts sorry) and it refuses to change the working directory. It won't change to other things either so it's not just this folder. What's the issue?
This probably means that the directory you want to change to does not exist. From the image I think you are using Windows, in which case the proper path to the directory would look like this:
setwd("C:/Users/$USER$/Desktop/r-novice-inflammation"
Change the $USER$ to your own username and it should work.
Paths always start with the letter of the hard drive in Windows. The easiest way to find the proper path to a directory is, in my opinion, to right click on the folder and look for the "Location" in properties. The IDE RStudio has a menu which you can use to change the working directory, which may be easier than using vanilla R.
The exception is setwd("~") which links to the Documents folder of your current user (i.e. C:/Users/$USER$/Documents). Based on the comments I realised that other commands such as setwd("..") (i.e. one folder up in the hierarchy) can be combined with ~ which explains what you are doing. In this case the following works for me:
setwd("~/../Desktop/")
Is there anyway Adobe Brackets Editor find a file as fast as typing a filename and avoid going through the sidebar? Much like finding a text with ctrl-f?
As others have mentioned – use Navigate > Quick Open, which you can also access via the shortcut Ctrl-Shift-O.
Quick Open is very powerful: you can type just an abbreviation or parts of a filename to find it with less typing. For example, typing "fbu" or "fooutil" will find "FooBarUtils.js".
Edit:
to answer the question about scope... Quick Open searches in your entire project. Brackets treats the root folder you have open (the root of the folder tree you see at left) as your project. To choose a folder, choose File > Open Folder.
There's no way to restrict Quick Open to just a subfolder within that project, but you can type part of a folder name and Quick Open will factor that into the search results. For example, typing "foo/bar" or even "fbar" will list "foo/bar.js" or "foo/xyz/bar.js" higher in the results. This is useful if you have many files with similar names within your project.
I would like to clone an existing file structure, without copying the files, during a grunt task. The new structure should be empty in the beginning and will be filled with processed data from the already existing file structure.
I've checked grunt-contrib-copy but there seems to be no filter for copying directories only.
This is true, place a .keep file in each (or lowest-level) directory and run grunt-contrib-copy and it will replicate your structure.
Updating this to cover the comments:
There is currently no option in grunt-contrib-copy or grunt-init to copy the structure only.
If however, you put aside the option of starting from 0, you could simply allow the pre-processed data to fill the structure, and pass a newer: to your copy task to only overwrite files that are older than those present.
If you absolutely need those folders to be empty, your best bet is to set up a boilerplate for yourself. I wish I could stumble on something better for this.
I'am doing upload functionality in ASP.NET 1.1.
I want to create one empty zip folder on given path.
So, how to create an empty zip folder?
Later on I will save files in that folder. I do not want to use any third party component.
There are a couple of third-party components that do this. Writing one from scratch would be a big effort, I do not recommend it. Why the requirement not to use an existing library? There are some suggested in the answers for Open-source zip library for .NET?.
If all you really want is an empty zip file, simply add one to your solution and copy it into place as necessary.