JetBrains Rider and T4MVC templates referencing EnvDTE - t4

I have a reference to Host (IServiceProvider) in one of my T4MVC templates. Of coarse all is well when running this in Studio but I am wondering if anyone has solved this issue for Rider.
There are references to EnvDTE & EnvDTE80 which do not seem to exist when executing the template with Rider. My guess is that they are just leveraging the TextTransform utility which does not appear to have access to the IServiceProvider implementation.
I would love to solve this and make the move entirely to Rider. Any guidance would be greatly appreciated.

We have several related issues: RIDER-5245 RIDER-9415 RIDER-5687
Briefly: we can not work with such templates because we use command line utility texttransform.exe.
We have plans to implement our own implementation. Later.

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.

How to remap an assembly in vs2010

I am using a third party software in my C# VS2010 project. I am gettong a warning to remap three of their assemblies.
How do I do that? I have no clue and searching through google i come across how to remap specific MS assemblies and it is much more complicated that I need. I just need to remap their version number.
I just want to know an example that shows what is the simplest way of remapping any assembly?
Any help is very much appreciated.
This ended up being a "DLL Hell" kind of issue and I did not have to remap the assmeblies just looked through my machine all over and got rid of the specific dlls wherever they were (whether the buidl code had put it there or myself).So I cleaned all DLLs up, then copied the latest versions to where the build needed them.

Importing a project into Visual Studio. Why so many errors?

This isn't really coding specific, but we currently have a project that is live and working fine. I am tasked with making a few changes to it. I imported the ALL files of the project to Visual Studio 2010. I can't get any work done, because of all the errors!
Do you have any suggestions for me? The project doesn't have a source file, so I created a project and made one myself.
I tried another version of Visual Studio, and the errors continue. How in the world is this project even working?
Also, I have no way to speak with the creator.
Thanks for the help!
Josh
Without seeing the specific errors you're running into, I'm guessing that you are hitting one of two scenarios:
The source code references .NET assemblies that you do not have installed on your development machine. The only way to correct this is to get your hands on a copy of those assemblies to install them. The assembly names should be in the error messages, which would give you a good starting point to look from.
It's also possible that differences in the .NET framework versions that it was originally developed in and what you are trying to use now are accounting for a large number of errors. If the errors specifically reference the version number, this is most likely what you're experiencing. If this is the case, there are ways you can upgrade the individual file versions that your program references, but I honestly haven't done that in about 8 years, so I'm drawing a blank at the moment as to how to do it.
I don't understand ?
you have a "project" (what kind of project?) that you want to start working with with VS2010 ?
You add the files to a new VS2010 project and start building it and many errors occur ?
What kind of errors ? Language (C++/C#) errors ? missing include missing ? missing libraries ?
Can you show a some of the errors you get ?

Using Web.Caching on XP Running IIS 5.1 Not available?

Environment: I am working on a site in ASP.Net 2.0 running on IIS6; I am developing locally on WinXP which runs IIS 5.1, using VS2005 and VB.
Issue: I am trying to create caching for some business layer objects (actually creating a caching layer) using System.web.caching.cache. This should be available under System.Web namespace but all that I seem to have access to are: AspNetHostingPermission, AspNetHostingPermissionAttribute and AspNetHostingPermissionLevel (I have a reference to System.Web in the project and imports in the class). There are quite a few other classes (e.g., HTTPRuntime) which also do not appear (this is per the "Using SQL Cache Dependencies" tutorial http://www.asp.net/web-forms/tutorials/data-access/caching-data/using-sql-cache-dependencies-vb).
I'm at the end of my rope and can't seem to find anything out there to explain this. Has anyone been in this situation and seen this before? Any help getting this solved is MUCH appreciated!
OK, so not sure why I didn't think of this before but I checked the references tab under the project properties. In the list for System.web, the additional namespaces were unchecked; checking System.Web.Caching and recompiling fixed the issue.
Sometimes you're just toooooo close to something to realize the easy answer.

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.

Resources