Dashboard > Castle Contrib > Home > Castle Visual Studio Integration
Log In   View a printable version of the current page.
Castle Visual Studio Integration
Added by Jonathon Rossi, last edited by Jonathon Rossi on Oct 07, 2008  (view change)
Labels: 
(None)


Introduction

Castle Visual Studio Integration (CVSI) provides Microsoft Visual Studio 2005/2008 integration for the Castle Project. Currently it only contains a colorizer and IntelliSense for the NVelocity language.

Current Version: 0.3.2 (30 Sep 2008, r625)
Download: CVSI-0.3.2.msi (1.26 MB)

Old Releases

See https://svn.castleproject.org/svn/castlecontrib/CVSI/trunk/doc/Changes.txt for full details of the changes.

Source

New Project Wizard

If you are looking for the New Project wizard you will need the official Visual Studio integration. See http://www.castleproject.org/castle/vsintegration.html for more details.

Screenshot

how to use it by vs2005.

after I install it ,but in my project I edit vm file that is still like before.how to do it?

In VS2005, go to Tools -> Options -> Text Editor -> File Extension. Then remove any "Editing Experience" that is associated with "vm".

Nice work Jonathon, thanks for sharing...

You are welcome, I'm glad you like it.

Thanks for you work. I think it is really important to have intellisense facilities, specially to make life easier to newcomers like me. Great job. Thanks again and keep this contribution alive, please!!

Thanks. I have tried to find time to do some much needed work on CVSI, but life is just so busy. I'll hopefully get a chance to do some work soon.

Hi,

We're starting out with the Castle stack. We've a end-to-end prototype ready. I've also got the contrib strongly-typed View code integrated and we've got jquery integrated. Good times.

I was also bouyed that there was a new 2008-compatible release of the VS integration. Installed the above, no change. New Project -> has no Castle Projects available. Also no view / intellisense changes.

Am I missing something ? Tried reboot - no effect.

cheers, ian

If you are after the New Project wizard you will need the official Visual Studio integration, which looks like this:
http://www.castleproject.org/castle/vsintegration.html

If you don't see your .vm files colourised, have you checked to make sure you don't have .vm already associated with the XML or HTML editor?

CVSI is definitely a huge help - thanks for doing such a great job. 

I've run across one small issue using version 0.3.1 in VS2005 & 2008 that I thought I'd pass along.  Colorization and intellisense stops when adding attributes to existing $Form code, specifically when I type the percent siqn that precedes the attribute list.  Oddly, I can type everying but %, then insert the % character last, and it works.  I'm also using ReSharper 4.1.

Just to complete this post.

This issue should now be fixed in 0.3.2. Thanks for working with me on this Chuck.

i still don't understand i have installed the castle and the CVSI, but it doesn't show up in the wizard :s

what could be?

i installed vs2005 and installed the CVSI, and nothing happens too 

As I mentioned a few comments up CVSI doesn't contain a new project wizard, you'll need the official Visual Studio integration. I have added an info box to this page so others are more easily able to find the wizard. If you have any problems with the new project wizard please direct your questions at the users mailing list, where there are many more people that can help you.

Jono

The Velocity/HTML-Parser has an error. It is not able to handle the following simple example:

 <p>Some text</p> <!-- A comment -->

At the end of the comment it signals an error. The error output is as follows:

The parser has been pre-emptively terminated because it appears as if the parser is stuck. [In ParseXmlRestElement()]
Expected 'XmlTagStart' but was 'XmlComment'
Expected 'XmlForwardSlash' but was 'XmlComment'
Expected '>'

Obviously it doesn't expect a comment there but a tag.

Thanks for reporting this defect. Would you mind logging it in donjon at http://support.castleproject.org/projects/CONTRIB with the CVSI component.

Jono

I have installed above msi installer still i am got getting intellisense in vm file. I am using VS 2008 trail version. I havent installed any thing for nVelocity just referring ddl which is provided in http://builds.castleproject.org/ (latest successful version). Do i need to install anything for nVelocity? and also how get the intellisense in vm file?

Are you getting colourisation in the NVelocity files? If so, can you try intellisense for directives to see if you get a list; just type # and you should get a list with if, foreach, etc.

Thank for you reply. Im getting colorisation. If i type #, no listing is showing.

Posted by Sandeep Kumar at Oct 16, 2008 21:30; last updated at Oct 17, 2008 00:15

I haven't seen this issue before. Does your VS error window show any errors? Can you try typing # in a blank file.

View the rest of this thread. Most recent comment: Oct 20, 2008
2 more comments by: John Simons, Jonathon Rossi

I had exactly the same problem and to fix it I deleted the vm subkey under:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Default Editor\

 I hope this helps!

I tried in blank file its not showing and also i have seen HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Default Editors\ - it has only default registry. Can you please tel me steps which i need to follow to work in castle monorail with Intellisense using VS 2008.I dont have  VS 2005 in my system. i will start installation from beginning. Please let me know what to be done?

CVSI works in VS2005 and VS2008 (the screenshot above is just really old). I am really out of ideas, could you debug CVSI and take a look to see if VS calls the ParseSource method in NVelocityLanguage.

Thanks for you support, Today i again installed it. now its working fine. if i type # and $ intellisense is showing up . when i typed following statement $Form.FormTag("%

Unknown macro: {action='Create.rails',method='post', immediate='true', useLabels='true'}
") for % symbol it is not showing any intellisense and also for 'action',  'method','immediate' auto complete intellisense is not showing up. Is it working like this for every one?


There is no intellisense for dictionaries because there is no easy way to know what you are allowed to enter in the dictionary.

View the rest of this thread. Most recent comment: Oct 21, 2008
2 more comments by: Jonathon Rossi, Sandeep Kumar

Thanks, it's great to have syntax hilighting for VM.  One feature to ask for though.  We have a number of .vm files that generate javascript only, no html (the idea being that they're included elsewhere by a <script src="foo">).

 CVSI gets freaked out and throws parser errors on these files because it's expecting HTML tags.  Any way I can tell it to just ignore those files?

 Ideally I'd like to see Javascript syntax hilighting built in to CVSI. 

I tried:
//<script>
contents of my file
//</script>

in the hopes of just not hilighting these files, but it didn't work for some reason.  Any other suggestions?

Hey Mike. Sorry for taking so long to respond.

CVSI assumes the file is XML, currently there is no way to tell it otherwise. It would probably be a good idea for it to work out whether or not it should parse the file as XML because I know I have some .vm files that generate C# and it does the same thing.

Feel free to log an enhancement in the castle issue tracker under the contrib project. I think there is already one for JavaScript highlighting. Also free feel to provide a patch to either

There's anyway to change font color for VM files in editor?

I'm using a black background and the plain text are black in a black background, in other words the plain text isn't show in editor.

 Take a look below:

John, please see this thread on the Castle development mailing list. It may fix the problem for you.

http://groups.google.com/group/castle-project-devel/browse_thread/thread/32151ad11e14f465?hl=en

Thanks Jonathon.

 Clear the VS 2008 cache for fonts and colors in registry did the trick.

 Regards from Brazil.

 John

Site running on a free Atlassian Confluence Community License granted to Castle Project. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators