Rename Solution containing more than 1 projects in vs2010 - asp.net

In my solution i have three projects
SIRE
SIREWebServiceClient
SIREWebUIModelClasses
the sln file is in 1st project SIRE.sln
Now i want to rename my projects name to
OMS_WebSolution
OMS_WebServiceClient
OMS_WebUIModelClasses
and the sln file to OMS.sln
i tried every thing but unable to load 1 or 2 projects after renaming
i even tried this steps
a. Close the solution and the IDE
b. In Explorer: Change the directory name to the new name.
c. In Explorer: Open the .sln file with a text editor.
c. Change the directory name to the new name and save.
d. Restart the IDE and open the solution from the File, Recent Files menu if it doesn't start automatically.
e. Click on the Project folder of the Solution Explorer and check the path property in the properties at the bottom. It will now be referencing to the new project folder.
only one project get loaded rest unavailable
any help will be highly appreciable Thanks

Related

Is it a bad idea for my solution and project to be stored in separate locations?

Somehow my solution and project differ as to their Path/FullPath.
The Path property of my solution ("customerreportingnet") is:
C:\Users\cshannon\Documents\Visual Studio 2013\Projects\customerreportingnet\customerreportingnet.sln
The only project beneath that solution is a Website ("http://localhost/EMS/customerreportingnet/").
The website project's FullPath is this:
C:\EnhancedMonthlySalesReporting\customerreportingnet\customerreportingnet
Why would the solution and project location differ?
Did I do something wrong in the setup? I downloaded the files from a .zip file, and extracted them to C:\EnhancedMonthlySalesReporting\
I then created a Virtual Directory in IIS, mapped it to C:\EnhancedMonthlySalesReporting\customerreportingnet\customerreportingnet, giving it the Alias "EMS".
Then in VS I open the website (solution/project) this way:
File > Open Website...
and then I open IIS > EMS
When I do this, I do not see any files beneath the "project" - all that's visible in the Solution Explorer are just the solution and project names - no subfolders or files beneath them. But when I right-click the solution "customerreportingnet" and select "Open Web Site", then reply OK to "Open the Web site (this will close the current solution)" all is relatively well - I can right-click the project ("http://localhost/EMS/customerreportingnet/"), select View in Browser (Internet Explorer) and the site runs.
The only files in C:\Users\cshannon\Documents\Visual Studio 2013\Projects\customerreportingnet\ are:
customerreportingnet.sln
customerreportingnet.v12.suo
C:\EnhancedMonthlySalesReporting\customerreportingnet\customerreportingnet has those files and many more (as well as beaucoup folders).
Should I try to reset the solution Path to C:\EnhancedMonthlySalesReporting\customerreportingnet\customerreportingnet, or is that just an oddity, but not a problem?
If so, is that as easy as just changing that property value, or will that mess things up?
Is it a bad idea for my solution and project to be stored in separate
locations?
A solution is a "container" for projects. Where they are in your local file system doesn't really matter. So in that context, it's "fine".
It's not unusual to have some solution context that is composed of some "projects you did before". So you can "organize" a "new" solution composed of projects located elsewhere (from some other "solution") along with new items.
However, once you get into Source Control, whether it's TFS or GIT, then it will matter - they (projects in a solution) have to be in the same parent folder to be handled easily. So in that context, it's "bad".
TLDR; there are still ways to effectively source control "projects in different folders" - each one is it's own separate "repository". But you'll have to manually/separately do your syncing, merging, etc.
If I'm following your post correctly, I think what you're looking for is Add..., not Open... - you want to add an existing project or web site to a Solution.
Depending on what you're after, and what files you're dealing with:
if you have a Project in the zipped file, then you can Add Existing Project, and so on...
Unsure why you needed to do what you did in IIS - you can do debugging within Visual Studio (IIS Express).
Alternatively, you can Publish your web site/application from Visual Studio and target a local file system folder that you can then set in IIS (Local IIS if installed) - this way, you sort of have a "dev" (VS) and "staging" (publish folder mapped in IIS) environment in your local machine.
Hth...
After you extracted your code and opened the project in visual studio.
Visual studio will automatically create a solution file if you open a project (you can also open a solution file directly). Once you click save all or save your solution file it will save it to the previous location or to the default location.
Since you did not save the file before, visual studio will save it to the default location:
C:\Users\cshannon\Documents\Visual Studio 2013\Projects\[ProjName]\[ProjName].sln
If you want other developers to be easily able to open your project. (especially when you start to have multiple projects inside 1 solution), you want to include the solution file inside the project location. Otherwise every developer has to create this solution file himself, which is annoying and cumbersome work.
Since dotnet core the best practice file structure is this:
/root
/src <== contians all the projects per folder
/project1
/project1.csproj
/etc*
/project2
/[ANameForSolution].sln (so directly inside the proj folder, next to src)
The old habit people use was more flat:
/root
/project1
/project2
/YourSolution.sln
The best practice, moving everything to /src is because lately a root of the project already has a lot of (config) files, and this way you can keep the root a bit cleaner.

Atom Editor - Open File and treeview works not as expected

I am using ubuntu 14.04 LTS and Atom Editor 1.5.3
If I and click on Open File I want that the dialog window shows the directory of the current file I am working on. However, it always shows the directory Recently Used and I have to click through the folders to get to my project folder. Where can I change this so that the dialog window starts in my project folder?
Also I noticed that the treeview doesnt change if I work on a specific file. So if I have two projects folders called Project 1 and Project 2 and I start with a file from folder Project 1 then I see the treeview of this folder. However, if I open a file from Project 2 and work on this file, the treeview of folder Project 1 remains. How can I make that the treeview always corresponds to the current file I am working on?
As for the first part of your question, this is a bug in atom for the linux version. Someone has suggested a patch but it seems it has not been accepted yet in the main atom version, even if it seems to work (see the discussion). The two commits are here, if you want to try something with them (what would imply something like recompiling atom yourself of course...).
About the second part of the question: I don't think it's possible to let atom switch automatically from a project to another when clicking on a file. But you can use the project manager package, what will allow you to define projects, and to set a root directory for each project and then switch from a project to another manually. The treeview will then fit with the current project.

Choose ASP.NET .sln (one time) save directory

When creating a new asp.net web site, Visual Studio automatically saves the .sln file and .vs directory in C:\Users\Me\Documents\Visual Studio 2015\Projects\Site_Name after I've specified, say, c:\Users\Me\My_Websites\This_Website\ as the directory for the website.
How do I either get the solution to work with the website after copy/pasting the .sln and /.vb into the same directory as the website, specify the save path of the solution so that it's in the same directory, or get the solution and the website into the same directory somehow?
I don't want it set a new default directory, because I'm a student, and have a lot of projects on the go at a time, and I have to zip them up hand them over for marking or to a group member in a project, and also it seems to make sense to have them together.
You could:
Start with a Blank Solution
First create a blank Solution, which you can save anywhere you want in the file system.
File > New Project > Other Project Types > Visual Studio Solutions > Blank Solution
Then just add new Projects to the Solution in the same Solution folder (in reality doesn't have to be, but that's not what you want, and it if at some point, you'll go with some source control, keeping things organized this way will save time/work/headaches)
If you have existing projects you can copy the entire existing folder structure of the project (including the all important .csproj or .vbproj file, into the newly created Blank Solution folder, and instead of Adding a new project, Add and existing project and select the .csor.vb proj files.
If you're just experimenting, I'd advise you to just Copy first (instead of Move) so you can always go back to a "working" state.
Note: you don't actually have to copy the existing .sln file for these existing projects. It won't really harm anything, but it will save confusion once you view the folder structure in Explorer/Finder (so you don't have a bunch of .sln files).
You can try experimenting and examine how VS creates the folder structures (Projects under Solutions), and if you're comfortable, you can
Edit the .sln file
You can edit the .sln file itself in any text editor - you'll see the projects referenced according to its relative location to the .sln file.
Do this with VS closed (or at least no solution opened)...
e.g.
These show 2 projects in the Solution
Microsoft Visual Studio Solution File, Format Version xxx
....(skipping for brevity)...
Project("{A GUID}") = "The Project Name", "SomeFolder\MyProject.csproj", "{A GUID}"
EndProject
Project("{Another GUID}") = "Another Project Name", "SomeFolder2\AnotherMyProject.csproj", "{Another GUID}"
EndProject
Hth.

Duplicanting XCode project gives me the old myproject.app

I have duplicated my project by copying and pasting the folders.
Then inside the project I renamed the project name so it pops a window asking to rename the target.
I've done this twice before with no problems, but this time, inside the Products folder the myproject.app file is still the old one.
The new one does not appear on my scheme options, so I don't know what else to do.
Xcode complains about an icon file that doesn't exist anymore.
Is there anyway to fix it; is there some other way to duplicate projects?
My solution for duplicating a project with XCode 4.2 is copying and pasting the project folder then opening the new one.
Click once on the project name on the left (Project Navigator), then rename it.
You will be prompted to rename whatever targets you have. Just click rename.
Then on your target build settings change the Product Name property.

Is it possible to create in Aptana a Project with a different name to the containing folder?

I've been importing a number of project folders into Apatana 3 and some of them are stored on disk in folders with identical names. It's not really easy for me to change the names of the folders themselves, as they are the same project on different servers (one is a local copy, the other a copy on a development server).
I tried importing the folder as a project and setting the name of the project to FOLDERNAME - local or FOLDERNAME - dev (depending on the location) but all that seems to do is create a new folder with the project name, rather than importing the specified project!
Is this normal behaviour and is there a way around it?
After a bit of fiddling I managed to find a solution, hopefully this will help anyone who comes across the same issue:
When the Aptana workspace is set to the parent directory of a project, Aptana renames the project folder to match the project's name. By setting the workspace to a different folder the project can be renamed without altering the folder name on disk.
I'm not entirely sure why Aptana does this, but changing the workspace does seem to solve the issue.
You should just be able to import the project, right-click on it and rename it. The project name does not have to match the folder name. It may be how you are importing them...please follow the steps here: https://wiki.appcelerator.org/display/tis/Importing+an+Existing+Project

Resources