Me and my brother are trying to learn C# together. We are trying to follow a guide to do a simple RPG tex-based game.
But we dont always have the possibility to do it together. So I was thinking of making a duplicate of the entire program, and go at it alone. When my brother later could join, I could just simply go back to the original project.
This has turned out to not be as simple as I would hope. There are guides to do this on this very site, but the ones that seem to be working the best feels very complicated and contain many many steps. Since I am a beginner I have a hard time following the logic of it all.
Is there ANY type of extension or upgrade to Visual studio that simply lets you have the option to "Duplicate Project to other folder". That would be ideal!
As I've said, I have searched a while for this on google and whatnot, but couldn't find anything satisfactory. Hope you can help!
Thanks
//Simon
/EDIT/
I now realized that the copying wasn't the real issue. The problem is RENAMING your folders. Visual studio doesn't like you to move around stuff and renaming them and it makes it a hassle to fix it.
But as long as I just open one project in one folder when I'm programming with my brother and the other project in another folder and dont mix them up, I should be fine
Thanks for your help tough.
I think this is what you are asking for. I could have commented but you said you where new so I hope the instructions are simple enough to follow:
In Visual Studiom, open up solution explorer, usually located on the right
Right click the solution name, which should be the very first item on the list
Select "Open Folder in File Explorer"
Select all the items in the folder and copy them, a simple Ctrl + A and then Ctrl + C should work
Go up one level
Create a new folder, say "RPGMyCopy"
Enter the new folder and then paste
Double click on the solution file .sln file
Thats it, you're working on a new copy.
Related
I could have asked this question years ago, but I think it has finally annoyed me enough to ask this question. Many times while I am coding, Visual Studio tries to Intellisense my deal with testc. I know that testc is a snippet for a test class, but it is something I will never use in anything except maybe a test project, and likely not even then. So, how do I prevent this annoyance from ever appearing in my Intellisense options again? Yeah I know... stupid thing to worry about...
On the Tools menu, click Code Snippets Manager.
Select the directory Test.
Click Remove.
Press CTRL + K, CTRL + B. This will bring up the code snippets manager. In the Visual C# directory, you can remove the snippets (testc in your case) that you don't want to include. Note that system generated snippets cannot be removed by this method, although per mojits answer you could remove the entire directory of snippets.
One way around this is to delete the snippet file manually, by finding / deleting its actual file. I am using Visual C# express 2010 right now, and this is the directory they are in for me (you may have to modify slightly, and restart VS for changes to take effect).
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C#
I am having issues with check in my code files because of some changes I have made to the project and solution. I have renamed project files, added different project files in the solution and added many files in the existing project.
Now I am getting an error while checking in the code.
The error details are:
Check In: Operation not performed Could not find file
'....Console.csproj.vspscc'.
How do I create a vspscc file if it does not get created on its own?
Any help would be great and thanks in advance.
This looks pretty stupid on my part. I restarted my Visual Studio and I could perform the check in because Visual Studio created the vspscc file when it opened the projects and solution.
Answering my own question as fast as possible so nobody else prints my own negligence before me.
And for anybody who needs an answer as how to create a vspscc file, restart the visual studio IDE
I have also seen this in another situation (VS2012) where a simple restart didn't do the trick.
I had a number of new projects which I had added to an existing solution but in the wrong place. Undoing and re-adding seemed to be fine until check-in, where it complained that the newly added projects and related .vspscc files could not be found. It was looking for them in the original location rather than where they are now.
Resolution was to go to the Source Control Explorer, which still had check-in items against these files in their original (but non-existing) locations, as well as the files in their correct locations. Selecting these errant references and "Undo pending Changes" for these files did resolve the issue.
I'd try using File/SourceControl/ChangeSourceControl dialog and unbind (if necessary) then rebind the project to TFS to recreate the .csproj.vspscc.
I removed projects and have same issue, so my solution was to re-create the same projects with same name, then remove them cleanly :-) I hope this helps
I had a similar problem, but in my case I Visual Studio/TFS couldn't fine the .csproj file. Anyway, with the help of a colleague I was able to determine that the issue was within TFS itself. TFS may have a different view of your source code than Visual Studio does. I had created the wrong type of project (I'll call it Proj1) and deleted it from within VS. Then created the correct project type, which I'll call Proj2. When I when to check it into TFS it complained about Prog1.csproj, which confused me because I couldn't see it within VS. What I learned was that you have to go into TFS's Source Control Explorer. From there you'll see how TFS sees things. Sure enough, there was Proj1.csproj (and some other related files to Proj1). What I had to do within Source Control Explorer was undo the pending check-in's of those files and folders which I didn't want to check in and no longer existed anyway. Then TFS was happy and I could perform the check-in.
I did a bad thing, and I need help undoing it, because I don't know where to make the correction and don't want to further mess things up.
I have an ASP.NET MVC3 solution in VS 2010 with three projects.
In one of the projects, I have three folders, each with several files in them.
I realized that I mistakenly created a file in the wrong folder, so I dragged it into the correct folder.
After I did this, I renamed the namespace by typing in the right one, referencing the folder I just moved it into.
When I did that, the magic cursor, or whatever it's called, appeared under the new text I just typed in...so I hovered. It asked me if I wanted to rename from the old value to the new one I just typed in. So, I click yes.
I think a number of you already know what that means, but I hadn't a clue. Yes, I'm new at this. :)
All using statements in my solution referencing the original folder have been renamed in the process. The original folder is no longer available in any using statements I try to add.
Also of note, I had no clue what was doing this and thought my solution was corrupt or something, so I cleaned, and built, and rebuilt, and rebooted...so undo isn't an option.
What are my options for getting back to "normal" in my solution?
Thanks!
UPDATE, PROBLEM SOLVED:
All I had to do was rename the bad folder so I could create a new folder in the project with the bad folder's original name. I then moved the files from the bad folder into the new folder and corrected their namespaces.
Trashed the old folder.
Updated using statements.
Built the solution.
All is well.
I was afraid the rename went a lot deeper than it did. I'm not certain why this worked, but thank god it did.
Thanks to all who replied. I'll be exploring SVN this evening!
for example, you have tow folders named: Views and ViewModels in your project that named MyMvcProject; your namespaces will be MyMvcProject.Views and MyMvcProject.ViewModels;
and you rename the MyMvcProject.Views to MyMvcProject.ViewModels;
to undo, first exclude the folder named ViewModels - right-click on it, and select Exclude From Project; now open the find and replace window - Ctrl + f - select Quick Replace tab, in Find what textbox type .ViewModels and in Replace with textbox type .Views; set Look in to Current Project and click Replace All;
now must all ViewModels in project - not old viewmodels, because you exclude the ViewModels folder from project - be replaced with Views; now, include the excluded folder (ViewModels) and rebuild the project; if you got an error about namespace of any type, insert this using statement:
using MyMvcProject.Views;
regards.
At seemingly random times, whenever I load up VC# Express for the day and start working, any changes I make to my code don't get reflected in my debug runs. It's as if VC just refuses to compile the code and just runs the old already-compiled version. Deleting the "bin" folder in the project directory doesn't help, as then VC just complains that it can't find the *.exe instead of recompiling. Doing a rebuild helps, but only for that one rebuild, so I'm continuously having to rebuild the solution to see any changes, which is really slow.
The only way I've found to get rid of this problem (for maybe a week or two) is to create a new project and manually copy over my code. Needless to say, this is really frustrating and tedious. Is this a documented issue? What can be done to fix it? Searching online doesn't really turn up any answers, as the search terms most applicable to the problem bring up a lot of noise results.
You might see if the project you are working on is set to Build when the solution builds. To check this, right-click your Solution and go to Properties. Click the Configuration Properties node on the left and make sure all of the projects you want to build are checked on the ride side for your given build type.
UPDATE: Also, what is the timestamp on your build files? Is the timestamp getting updated on your build?
I had this problem when working on a network drive, and the time on the server was out of sync. Linux+Samba accessed by Win7 Pro and VB 2010 Express.
Correcting the time-difference solved the issue.
click on BUILD-->REBUILD SOLUTION and you are now good to go
Is there a way to turn off intellisense in Visual Studio 2008? I know about deleting a DLL to turn off intellisense in C++, but that doesn't work for C#. I also know about the preferences but that just turns off the visual display. I want to turn off ALL of intellisense so it does not scan my code at all.
Update 10/14/09: Eric was kind enough to take a look so I sent him some log info. I'll post the resolution here when we get one.
Update: updated title to reflect the changed direction of the thread
Related Question
Turning off Intellisense for a single project in Visual Studio 2008
The guys on the VS team looked at this for me and found a problem with intellisense. Here's their description:
"It looks like both of the files you gave me contain a part of static partial class EntityPropertyDescriptors, and I would guess that all the rest of the 500 files do too. What’s happening is that as we build up our IntelliSense cache, each time we parse one of these files, we see that it has a static class in it, and we decide to see if that static class has any extension methods. In order to look for the extension methods, we look through each method in each part to see if it’s an extension method. This causes us to reparse every file in order to see if the type has any extension methods."
They found a similar problem with VS2010 but are fixing it now. Unfortunately, they are not going to fix it in VS2008, so we are left with the workaround of putting all the partial classes into a single file. They can still be partials, but they must be in the same physical file to get around the problem.
After combining all partial classes into a single file, load time for this problem project when from 30 minutes to about 10 seconds.
Big thanks to Eric Lippert and Kevin Pilch-Bisson for helping me with this.
You need to switch off background compilation.
Here is a HowTo:
http://ira.me.uk/2008/09/01/switch-offon-visual-studio-2008-background-compilation/
Tools -> Options -> Text Editor -> C# -> Advanced -> Show live semantic errors
You will still get error underlining, but you must hit the Build button before they show up.
In tools > options > Text Editor > C# there is a Intellisense section which looks like it does what you want.
Have you tried cleaning your solution from all temporary files created by Visual Studio? Sometimes these files could get corrupted, the chances might especially be high if you migrated from VS 2005.
Close your solution, look for all *.suo and *.ncb files and remove/rename them, and then re-open the solution.
Just another thing to make sure: Are there any third-party add-ins installed? Try to start VS in SafeMode using the /SafeMode command-line option.