![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Running a script from within Visual Studio? I'm about to write some PS to do most of the grunt work of porting Cpp/ CLI functions into C# functions. Most of the steps are simple string substitutions like so: :: to . System::Object^ to Object^ Object^ to object ^ to System.Void to void -> to . L" to " gcnew to new but removing xxx_cast<>() may require some careful RegEx work (hence my need for PS). My first thoughts are to write a function in $profile that copies the contents of the clipboard, transforms the code and then writes the transformed code back to the clipboard. Calling this shouldn't be too much of a burden - but I was just checking to see if there are any better options available, like a context menu-item in VS to call a PS script/host perhaps? Many thanks, Duncan |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Running a script from within Visual Studio? "Duncan Smith" <DSmith1974@xxxxxx> wrote in message news:0f55e3ed-9a2c-4b6b-9368-d7b761591717@xxxxxx Quote: > I'm about to write some PS to do most of the grunt work of porting Cpp/ > CLI functions into C# functions. Most of the steps are simple string > substitutions like so: > > :: to . > System::Object^ to Object^ > Object^ to object > ^ to > System.Void to void > -> to . > L" to " > gcnew to new > > but removing xxx_cast<>() may require some careful RegEx work (hence > my need for PS). > > My first thoughts are to write a function in $profile that copies the > contents of the clipboard, transforms the code and then writes the > transformed code back to the clipboard. Calling this shouldn't be too > much of a burden - but I was just checking to see if there are any > better options available, like a context menu-item in VS to call a PS > script/host perhaps? & Replace functionality. It supports regular expressions although the syntax is non-standard. I've done this before by recording a search&replace session and then editing the resulting VBA script file to suit my needs. I did this for NUnit 1.x to 2.x where a lot changed and required significant changes to the source code. Second, you could process these CPP files outside of VS using a normal PowerShell script. I've done this to process hundreds of VC++ project files that needed certain settings tweaked (and I wasn't about to do it by hand). -- Keith |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Code compiled on old visual studio. Running VS2008 Pro now | .NET General | |||
| Visual Studio Shuts Down Unexpectedly When Loading Project - ASP.NET Web Application running against IIS | .NET General | |||
| Err.Number 486, Vista Ultimate, Visual Studio, & Visual Basic | Vista General | |||
| Visual Studio 6 setup is not running in windows vista businees RC1 | Vista installation & setup | |||