I am doing some clean up/ restructuring on my code (C#) were I move my classes in the tree structure. I am looking for a way to update all namespaces to the default ones (like projectname.rootFolder.ChildFolder).
I know that there are some ways to do it one by one like in this old post but I am looking for a clean simple update way. I wish there was something like "right clicking on the folder and clicking on update namespace!" but there is not.
Anyone knows any add-on/ easy way to do it?
Resharper is a tool to work on legacy code. Try to use this tool.
Right click on the folder> go to refactor and then select adjust Namespaces
Related
I'm trying to figure out if we could generate code with a T4 Template file post-build.
In fact, I'm kinda new to c# and I needed to find a solution where I generate class from Xml file that could be edited by the user at anytime and the first solution that come to me is T4 Template.
Then I render those generated classes on a treeView and the according properties on a property grid.
Now, I think that it is only generate code at pre-build time, but I'm not sure about that since I don't really see a lot of stuff about that on the internet. I'm still pretty sure now that it's not possible.
So, a second problem comes to me : I finished my entire project like that, so if you all have an idea or another solution that could be nice, i'll really appreciate that.
The 'T4Executer' extension has an option to attach the execution of each T4 template to build events. Before, during and after build, or not run them at all.
Doesn't work for Visual Studio 2022 yet though.
I just tried to install this framework through the Visual Studio Community's NuGet and I linked appropriate dll, so this is what I got:
Still, things like MetroContextMenu or MentroMenuStrip are missing...Probably some more that I am not aware of.
What would be the correct way to install this framework? What am I missing?
I am using Visual Studio Community and a Winforms based application.
I guess you ended up having the controls that are found in this repository
The original guy must have removed a number of controls due to some bugs and issues, though i dont think so that there was a MetroMenuStrip provided.
You are missing some more controls like :
MetroGrid
MetroDateTime
If you want to get those controls as well, here is the link to a repo someone has been maintaining.
I dont think so that you will get a MetroMenuStrip or maybe you can go through the Git history and check to see if they had the source code back in time.
If you want to create your Custom MetroMenuStrip, This guy has done something similar.
Best of luck.
It seems like all I use bookmarks for is to keep track of classes and methods. The problem is the line numbers become incorrect with editing. In addition, I have to manually set each bookmark. Is there a way to get a list of classes/methods within a file and click to go directly to it? Perhaps a plugin? Ideally I'd like a graphical representation that I could click on. Surely there is a plugin out there for that?
Try C# Resharper http://www.jetbrains.com/resharper/ - it cost some license, but really worth it.
C# Resharper http://www.jetbrains.com/resharper/ -is best.
People are suggesting Resharper already, but if you're using Visual Studio 2010 you could use a built in feature called Naviagate To
Just press:
Ctrl + ,
You can search for files/classes/objects/methods in your solution.
More information about Navigate To on this page: http://blogs.msdn.com/b/vseditor/archive/2009/09/22/searching-and-navigating-code-in-visual-studio-2010.aspx
I've begun using MonoTouch 5.x. I feel like I'm fighting NIB's to use inheritance.
I want to use inheritance. I want to use a designer to make my views. I want it all.
So I've been searching for a tool that generates xxx.designer.cs files like VS does it: inserting the controls in code on the fly when designing using IB. Reducing NIB's to a design-time feature.
As far as I can tell, this is the cleanest approach with the best performance that allows me to go full C#, "visual inheritance", etc.
Does anyone know of such an initiative? In any form or shape?
Thanks.
In Microsoft Visual Studio you are able to write an implementation of IVsSingleFileGenerator.
Which is then used as custom tool to generate files at design time.
Maybe there is a similar feature in monodevelop.
This might sound a bit of an odd question but I know what I want to achieve, just don't know if it's possible.
Firstly, I'd like to be able to create a visual studio project that the 2 developers that work with me can use as a basis for all new websites. I want to drop all the common files that we use in there, like jQuery, CMS files etc. so that every time they start a new project they don't have to worry about all of that stuff. I guess to do this I just set up a project and "File > Export Template" ?
Now, here's the tricky bit...
When you open up one of the default templates in VS it asks you a few questions, such as if you want to use a master page or if you want to use code behind etc.
What I would like to do is set up something similar so that when you use the project template it asks you what version of jQuery you want to use so that it can import the right file, or for example it might ask you if you want to include certain user controls that the CMS contains. If you tick the box then the folder with the necessary user controls would be put in your new project for you.
I know MS can do this but can a user like me include functionality like that in my own project template?
Hope that makes sense.
Some more digging turned up the iWizard interface and this tutorial...
http://msdn.microsoft.com/en-us/library/ms185301