Sign in to follow this  
suliman

Macros doesnt work anymore (visual studio c++)

Recommended Posts

Hi

My macros (typically prewritten strings of basic code such as forloops, sprint commands etc) doesnt do anything anymore. They run, but dont write the code.

 

Ive seen this commented on internet, people say remove some windows update etc (i have win7) but nothing works. Really annoying.

 

1. So any other way to fix it?

2. Any simple plugin that can write some prewritten code at the push of a keyboard shortcut?

 

Thanks!
Erik

Share this post


Link to post
Share on other sites
If you are talking about macros run by visual studio and not c/c++ preprocessor macros, they were removed from visual studio in
Vs 2013. There had been some talk from Microsoft about putting it back in in a future vs release.

Share this post


Link to post
Share on other sites

I use visual studio 2008. After a certain point, all macros stopped working (the exact same macro used to work fine, i didnt change the actual macro). It thinks for half a second then nothing happens.

 

One of the macros (its more of a quick way of writing some common code really):

    Sub loop1()
        DTE.ActiveDocument.Selection.Text = "for(int i=0;i<10;i++)"
        DTE.ActiveDocument.Selection.NewLine()
    End Sub
Edited by suliman

Share this post


Link to post
Share on other sites

You can try downloading and re-installing the Net Framework 4.0 Client Profile, Net Framework 3.5 and Net Framework 4.5.1 from Microsoft. The macros in VS 2008 depend on the net framework so if you uninstall one of those things, they may stop working and you won't know why. At least that's what happened to me once.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this