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 on other sites

It might help if you share a couple of examples of your macros so we can see what may be going wrong dude :)

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 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 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 on other sites

Yippieh!

Adding those lines of codes to the config files worked (when in admin mode).

Silly error.

Thanks guys!

E

Create an account

Register a new account

• Partner Spotlight

• Forum Statistics

• Total Topics
627689
• Total Posts
2978648

• 13
• 14
• 12
• 10
• 12