Adjust Namespaces equivalent for CodeRush - coderush

Resharper has Adjust Namespaces which allows you to correct the namespaces of all files in a folder, project, or solution.
Is there a feature or plugin available for CodeRush/Refactor that is comparible to Resharper's Adjust Namespaces feature.

There is no built in equivalent feature at the current time.
However there is a rich ecosystem of plugins for CodeRush, which includes CR_SyncNamespacesToFolder
This would seem to provider the feature you're looking for.

Related

Which asciidoc editors support custom extensions?

I am building a documentation solution where I need to use some custom extensions. For a writer it is often important to see some preview of his work, therefore I am looking for an editor that would support preview generation with these custom extensions. Asciidoc is a very versatile, but it is sometimes difficult to navigate in the ecosystem, because different engines are available, which support different features in different languages.
Which editors support preview with custom extensions?
Asciidoc ecosystem has a lot of engines: Ruby-based, JS-based and Java-based. Different editors use different engines and support different subset of features.
AsciidocFX, asciidoc-vscode, Adobe Brackets and Atom make use of asciidocjs engine.
AsciidocFX can be hacked to include js-based plugins, according to its maintainers.
Asciidoc-vscode recently dropped functionality to use external processor (any of those mentioned), so now there is no official mean to use other extensions.
Atom and Brackets do not mention this kind of functionality.
Eclipse and IntelliJ use java-based processor.
Eclipse can use external processor to handle extensions. It is not possible with embedded engine.
IntelliJIdea can use compiled Java extensions or Ruby extensions if they do not require any other libraries. To enable an extension you should only place it into .asciidoctor/lib in the root of the project. In case your custom ruby-based extension has any dependencies, they should be placed under gempath, which is ~/.gems/jruby/2.5.0 for me. That can be done with gem install --install-dir <gempath> <gem> command.
Conclusions: Asciidoctor has a very versatile and easy to extend engine. Broad ecosystem exists. The downsides are:
A choice paradox
Only a few editors can support your homemade customizations, and it is not easy to figure out which do.

How do I convert a specific controller to a package to include in other projects?

VS2013, MVC5, VB
I am nearing the completion of a small project to manage the roles tables in a standard MVC5 application. The code is pretty much encapsulated. What are my options for using this 'package' in other projects?
Can I compile it into something? I know this type of action is possible, I'm just not familiar with the options available to me or the steps to do this. Links to sites that have tutorials are fine. Is creating a Nu Get package the only way to go, or is that even in the ballpark of what I'm asking. I say Nu Get, but I don't mean for public consumption, only for my consumption.
Will the finished 'whatever' include it's controller class, view models and views? Will I be able to easily manage updates? etc.
Creating a Nuget package is one way. I have created a local repository of common utilities for this purpose. But I usually use it just for DLLs. I use Nuget Package Explorer for its ease of use since its just me using the packages most of the time. Not sure its possible to place the files in specific directories.
Files in the content folder are copied to the root of your application when the package is installed. - Nuget
The alternative is to create an item template. I used to use this method for class files I want in my code but I can't see why you couldn't do it for the rest. Works well and isn't too hard to set up. There are dozens if not 100s of tutorials on the subject. Here is one on code project.

What is the best way to handle common files for DotNetNuke modules and skins?

We are currently moving over a large website to DotNetNuke (version 7.2.1). We're creating separate projects for each module and skin, source controlled in TFS. We were not planning on adding the actual DNN source code itself to TFS. I would like to be able to access common files, such as JS and CSS, among different solution/projects. Is there a recommended way to do this without source controlling the DNN source code project itself?
You could create local Nuget packages? :D That might be overkill for such a scenario.
You could always create a single project/module, that all the other modules reference the path for the original resources, so that they all point to the same location.
If you don't want to add any DNN related source in TFS, it means that you have to setup a identical structure on the disk and in IIS. Then in your ascx/css files you can use URIs that are either relative to your disk structure or your dev website.
If you create a specific project for the resources, you will put parts of the DNN codebase in your TFS. If it is not a showstopper for you, consider adding the elements to the solution instead, since there is no logical partitioning of these resources as a project. I would however recommend using URIs.
As a side note, please refer to the Client Resource Management API of DNN for your future devs in order to benefit from the minification and combination of resources.

How to use common Layout and styles across multiple Asp.net MVC applications

I have a visual studio solution with multiple telerik MVC4 razor projects having same look and feel. I don't want to have same layout, CSS/styles, images and js files copied in all MVC4 projects. What is the best way to accomplish this re-usability? I tried creating a virtual directory of a commonUI project and tried to refer _layout.cshtml using http://localhost/... in _ViewStart.cshtml but it complained saying "http:/localhost/MyMvcApp/Views/Shared/_Layout.cshtml' is not a valid virtual path."
Please help!
Four recommendations:
1) Look into areas, maybe instead of having separate projects these are really different components of the same system (admin, etc.)?
2) Use add existing item in visual studio and add the items via links. This still duplicates them for deployment, but you can keep one source.
3) Consider doing this by building your own nuget package. That way although you would copy the CSS and images you would have it packaged up and could update the package as needed. The benefit is that you can update one project while not having to re-test the other (if they are separate and 1) doesn't apply).
4) I find this one uglier than the rest, but in IIS I believe you can map in folders, so you could refer to these files by links in your project, not deploy them there and then map in the appropriate folder at deployment time using a single source path.
I know of no way to share up the application path.
EDIT:
I have never tried this before, so can't vouch for it working, but maybe compile your shared items in a separate project and then reference the DLL in all other projects.
The reference I found is this, but again, I haven't confirmed that this works, just think this could be a viable path to explore:
http://www.chrisvandesteeg.nl/2010/11/22/embedding-pre-compiled-razor-views-in-your-dll/
Areas are bad because you cannot deploy them separately. Like you, I tried using virtual directories, and was successful referring to the layouts using relative syntax:
#{
Layout = "~/Common/Layouts/Layout-001.cshtml";
}
Above, the project's layout inherits the layout in the /common/ virtual directory at the root. As the common layout (along with it's bootstrap & jquery versions) evolve, you can use side-by-side version-named physical folders (like common.v01, common.v02,). So you can upgrade your applications to a newer common layout by changing the VD's path to the appropriate version.
The downside with this is you'll need to use IIS (not express) as your dev and test platform.

How to create simple Wix setup project

We have a client/server application which includes a Windows Service and a Winform client tool. I've managed to create a Wix project in Visual Studio (2010, using the wix 3.5 toolset). I'm using the "harvest" feature on the references instead of specifying every file, because there are many library projects involved.
Problems I'm trying to figure out:
How to include referenced DLLs? Some are in the GAC, some are in a relative path within the workspace. I assume I could list each file explicitly but it seems like there should be a way for Wix to autodetect them.
How to install the service while "harvest" is enabled. All the examples I've seen require adding an explicit element with KeyPath=true. However this doesn't work with the harvest=true setting.
I realize that the harvest functionality might be a convenience which is not feasible when there are more complex things going on. Should I give up on harvesting and just try to specify each file explicitly?
Most of the examples I've seen on Wix have been just snippets of xml files. Is there anywhere I can find complete real-world examples of installing services other non-trivial setup features?
Use WixEdit. http://wixedit.sourceforge.net/
It's very easy to import an entire folder using it.
Also, check out the great WiX tutorial here: http://www.tramontana.co.hu/wix/
5.4 Services Rendered
Services can be installed and started automatically.
http://wix.tramontana.co.hu/tutorial/net-and-net/services-rendered
For even more information, check out more WiX documentation here: http://wixtoolset.org/documentation/manual

Resources