Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8294069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:04:30+00:00 2026-06-08T14:04:30+00:00

I want to be able to rename classes with associated file in VS without

  • 0

I want to be able to rename classes with associated file in VS without loosing file history in Perforce.
I thought I could include an Perforce command (p4 move…) in file renaming of Visual Studio
or in class-renaming of ReSharper.

I see 3 options:

Wrap Visual Studio’s file-renaming

I extend the file renaming (I mean with file renaming: right-clicking file in Solution Explorer and selecting Rename.) by an own VS add-in or a macro that wraps the existing Rename menu command and calls p4 move….

Extend Visual Studio’s file-renaming

I extend the file renaming by any kind of hooking into existing Rename command.

Extend ReSharper’s class-renaming

I extend ReSharper’s class-rename action (Ctrl+R,R) (with enabled option: Synchronize file names accordingly to changes) by calling p4 move….

Which option is the best one to rename a class with associated file in VS without loosing file history in Perforce?

I have no experience with VS add-ins and ReSharper plug-ins. So if anybody knows that an option is not possible at all than a hint would help me very much.

Any idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:04:32+00:00Added an answer on June 8, 2026 at 2:04 pm

    You can extend file renaming in VS 2010 by using a macro for adding a “p4 move -k” action to the rename event.
    See answer of “How to keep change history while renaming files in Visual Studio using Perforce”.
    This macro calls automatically a p4 rename/move when you do any rename or move action in Visual Studio. So you keep the file history in Perforce.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to create, rename or remove the temporary file inside
I want to be able to use the standard Eclipse Mac keymap, i.e. Refactor/Rename
I want to be able to update a certain line on a text file.
I would like to rename the installer file that CPack (v2.8.7) produces to include
I want to download a file, untar it and rename the folder. I am
I'm using LaTeX and BibTeX for an article, and I want to able to
Want to be able to provide a search interface for a collection of objects
I want to be able to take an image that i have already captured
I want to be able to replicate only the folder structure (not the contents)
I want to be able to do the following actions with a form submit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.