Test Projects Conversion - visual-studio

I apologize. This is part rant, part question.
For the rant: Dear MS developers who post MVC projects on CodePlex and dedicate their sites to MVC with TDD: I love to learn from you and thanks for the examples, but not everyone has Pro. I'm sick of not being able to load the test project portion of these things because use Standard, which more than covers most needs [with Nunit]. It's annoying.
Now, for the question. :-)
Is there a tool out there to convert these unit test projects to a proj file Studio Standard can open so I can at least compile and view the code?
--
P.S. Dear Microsoft: Enough with not including unit testing with all versions of Studio already. It's silly. Testing is not just an "enterprise" or "pro" feature.

In most cases, switching between test frameworks is just a case of search/replace. If the csproj doesn't load, just create a new project file and drag the code files in and fix them afterwards (along with the references). TestDriven.NET, for example (or NUnit console) are perfectly happy with just a dll/exe as the test project.
Maybe a pain, but not necessarily a huge problem.
If you want to use NUnit with MVC, there are brief instructions here and here - I don't know (haven't tested) whether they apply to Standard.

Related

Using Visual Studio Code for Grails development

IntelliJ IDEA is pretty amazing for Grails development work. It is rather demanding on resources (particularly memory), though, and takes a long while to start up, so occasionally I like to use Visual Studio Code instead for light editing. I'm trying to tune it most effectively for Grails development. Any tips would be most welcome. One thing I'd particularly like to know is if there is some way of setting up a beautifier/formatter for .gsp files.
First of all, you'll have to setup VS Code for java. You can follow this page https://code.visualstudio.com/docs/languages/java
Then, you'll have to install of the groovy language extension. Currently there are three such extensions in the library. code-groovy has more active users than the others and it provides good gsp support. I do use VS code for quick editing or just viewing source code occasionally but its still not the replacement of Intellij. I can't use VS Code for hardcore java/grails development yet.

Visual studio 2010 colourizers, intellisense and the rest. Where to start!

Ok, before I begin I realize that there is a lot of documentation on this subject but I have thus far failed to get even basic colourization working for VS2010.
My goal is to simply get to a point where I can open a document and everything is coloured red, from here I can implement the relevant parsing logic.
Here's what I have tried/found:
1) Downloaded all the relevent SDK's and such- Found the ook sample (http://code.msdn.microsoft.com/ookLanguage) - didn't build, didn't work.
2) Knowing almost nothing about MEF read through "Implementing a Language Service By Using the Managed Package Framework" - http://msdn.microsoft.com/en-us/library/bb166533(v=VS.100).aspx
This was pretty much a copy and paste of all the basic stuff here, and also updating some references which were out of date with the sample see: http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/a310fe67-afd2-4592-b295-3fc86fec7996
Now, I have got to a point where when running the package MEF appears to have hooked up correctly (I know this because with the debugger open I can see that the packages initialize and FDoIdle methods are being hit).
When I open a file of the extension I have registered with the ProvideLanguageExtensionAttribute everything dies as if in an endless loop, yet no debug symbols hit (though they are loaded).
Looking at the ook sample and the MEF examples they seem to be totally different approaches to the same problem. In the ook sample there are notions of Clasifications and Completion controllers which aren't mentioned in the MEF example. Also, they don't seem to create a Package or Language service, so I have no idea how it should work?
With the MEF example, my assumption is that I need to hook into the "IScanner.ScanTokenAndProvideInfoAboutIt" to provide syntax highlighting? Which would be fine if I could ever hit this method.
So my first question I guess is which approach should I be taking here? Or do they both somehow tie together?
My second questions is, where can I find a basic fully working project that implements bog standard basic syntax highlighting and intellisense or VS2010?
Thirdly, in the MEF example when I created a Package there were a bunch of test projects created for me. I appears that the integration tests launch the VS2010 test rig somehow, but the test fails. It would be good to write my service with tests but I have no idea what/how I can test each interaction so any references to testing Language services would be helpful.
Finally, please throw any resource/book links my way that I may find useful.
Cheers, Chris.
N.B. Sorry I realize this is part question part rant, but I have never been so confused.
First, the package example is not using MEF. Essentially everyplace that you mention MEF in your question is not actually MEF, but the managed package framework (MPF), also colloquially called the managed language service (MLS). You'd know if your extension was using MEF by two things: the vsixmanifest lists your assembly as containing a MEF component, and you see [Export] and [Import] attributes in the code.
The easiest way to do this is to use MEF. Since you have the SDK installed, you also have a template for an editor classifier project (under C# (or VB)->Extensibility->Editor classifier in the New Project dialog). You can certainly do this with a language service/colorizer/package, but there will be significantly more code than the equivalent classifier.
The Ook solution is the sample for this and should work; if it doesn't build/work, then can you send me email (noahric at microsoft) with what errors you are seeing so I can email the owner of that sample?
In general, you should also read my answer for the question on "How can I write a plugin for VS2010 using MEF?". That has links to other resources that should help.

Are MVC2 areas with multiple projects supported in the final release?

I had been following this guide to get areas with multiple projects setup:
http://msdn.microsoft.com/en-us/library/ee307987(VS.100).aspx
I was stumbling on the step where you modify the .csproj files to enable the AfterBuild configuration. My googling led me to this post from Steve Mosely:
http://avingtonsolutions.com/blog/post/2010/04/03/JQuery-AspNet-MVC-2-Multi-Project-Areas-and-Other-News-Minutia.aspx
So far the only hang up I had was that
I had set up my solution to
incorporate multi project areas which
was supported in the MVC 2 preview
releases of Areas. However, when the
RTM came out it was no longer
supported. I searched and searched for
solutions to my dilemma, but the only
thing I could find was post by
Jonathon who basically had the same
experience I had, and a reference to
an obscure message on a message board
saying (by what appeared to be some
one from the ASP Team) that it was not
supported. To date, I haven't found
any more formal post or article saying
that was not the case.
Is this true? Did this feature get removed from 2010 MVC2? I haven't been able to find a definite answer.
They were removed in Preview 2. The only supported use of areas are single-project areas.
You can reference the Build assembly in the "Futures" download for both MVC2 and MVC3. Of course, multiple Areas are supported in the RC within a single project. I completely disagree with Levi that it didn't make sense to merge multiple projects. It makes total sense when you develop large applications and desire to break up the functionality into "modules", or "mini applications". Simply research topics like "OO programming", "composition", "modular", "dependency injection", "inversion of control", "aspects" and related frameworks like "MEF", "Unity", "Prism", "Composite Application Framework", SmartClient application block, etc. (not to mention all of the incredible non-MS frameworks, but mentioning one means not mentioning another and people get all touchy about things like that...).
Notes: 1) The documented MSBuild tasks are not included in the project files in the release, so you must find and add them and 2) The futures assemblies are not strongly named, so you will want to change the MSBuild tasks to use the "PublicKeyToken=null" in the "AssemblyName" paths.

What are the best features of Visual Studio Team System?

Microsoft has a lot of stuff in there, but I'm wondering what features of Visual Studio Team System people really like and really use.
I'm specifically thinking about Team System as opposed to plain old Visual Studio.
What makes it worth the price?
I use the Development version of VSTS2005 and evaluating 2008. My top picks:
Profiler
Coding guidelines -- rules enforcement part
My favorite
Profiler
Integrated Testing Environment: I know a lot of people prefer other test frameworks but having the integration is just sweet.
FxCop
Some of the best features come from adding Team Foundation Server:
Continuous integration builds can be set up to run unit tests on every build
Code coverage figures can be gathered based on the unit test run
Reports of build success, unit test success, code coverage %, etc. can be produced daily
Code check-in can mark a work item (bug report) fixed, or can start the workflow to do so
It not only gives the developers a better idea what's going on with their code, and of how to fix it (unit tests, code coverage, code analysis), it also gives Management an overall picture of the same, without having to come around and bug the developers individually.
I like the line-by-line blame, profiler (as mentioned), but more importantly, I like the reports it produces, such as defect rates over time.
However, even though there are plenty of features that I like, I certainly don't think it provides good value for money.

What’s the best approach when migrating legacy projects across versions of visual studio?

I've been thinking about the number of projects we have in-house that are still being developed using visual studio 6 and how best to migrate them forward onto visual studio 2008. The projects range in flavours of C/C++ and VB.
Is it better to let VS2008 convert the work-spaces into solutions, fix any compile errors and be on your merry way? Or, is it better to start with a clean solution and migrate code across project by project discarding dead code along the way?
The Microsoft p&p team has recommended some strategies that answers this. Basically they recommend something like the project by project approach you mention. Of course, they're assuming a neatly architected application that has no nasty, dark corners from which late nights of coding and copious amounts of coffee spring from.
It doesn't hurt to let VS2008 convert the project for you and see how much effort is required to fix the errors.
When I had to convert a VB6 app to VS2003 several years ago, I ran the converter and it produced something that basically compiled, but wasn't very good at all. I ended up having to modify a big chunk of the code it generated.
I would start with a clean solution, then run the converter on a project and copy over only the code you need. One of the big differences I noticed between a VB6 project and the converted VB.NET project (WinForm) was with the built-in controls. The converter would try to preserve the type of controls you were using, even if they were old and outdated. So you might be better served by creating new forms with modern controls (text boxes, tab controls, etc), then copy in the code that you need.

Resources