how to rename ssis solutionwith subfolders

  • Hi ,I have one doubt in ssis

    how to rename solution and folders using ssis solution

    solution name : Test_First_V1

    Foldername: Test_First_V1

    inside folder again have Test_First_V1.dtproj

    how will rename all from Test_First_V1 to

    Test_First_V2

    I Tried

    step1:open the solution and right click on solution rename

    the Test_First_V1 to Test_First_V2 and save it

    after that I closed the solution

    Step2: rename the folders from Test_First_V1 to Test_First_V2

    Step 3: again open the solution this time getting warnning

    one or more project in the solution were not loaded correctly

    plase see the outputwindow for details

    i have seen outputwindow no message there

    can you please help me how to rename soution and solution related folders in ssis

  • Think you have more than one doubt in SSIS, as you had one doubt the other day here. 😉

    I can't say I've ever tried to rename a project in any Visual Studio Project, if I am honest but I also wouldn't really expect it to do well. The Project (and solution) files are riddled with references to the Project's name, so renaming the project can mean that you effectively break the "referencial integrity". I suspect that (at least) one of your files is still referencing the old project/solution name.

    If the project was something fairly unique, perhaps you could do a search of the files with a little Powershell script. Something like:

    $SolutionPath = "C:\VSProjects\Claims Autoload\"
    $SolutionName = "AutoLoad"

    $Files = Get-ChildItem -Path $SolutionPath -Recurse -File

    foreach($File in $Files){
    if(Select-String -Path $File -Pattern $SolutionName -SimpleMatch -Quiet){
    Write-Host "File $File contains a reference to the original solution Name."
    }
    }

    You can use the same for the Project, just use the Project name and Project Path.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • What problem are you trying to solve by renaming the solution?  It sounds like a version control problem (V1/v2) in which case you might be better off using GitHub or other source control.

  • Whenever I need to perform this sort of task, I usually do the work in Notepad++, rather than VS.

    From what you are saying, I think my approach would be something like this

    1. Take a backup of the entire solution (ie, copy in Explorer)
    2. Move the files around / perform the renames in Explorer
    3. Open the solution and project files in Notepad++ and fix the references there to point to the new locations and folder names
    4. Open the solution in VS to see whether your changes worked

     

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • I agree with all of the comments.  To add to this though, if you want to search inside files and not use powershell, astrogrep is my tool of choice.

    My process is:

    1 - make a backup before changing anything

    2 - rename files/folders

    3 - start up astrogrep and search for the old name

    4 - use notepad++ to change all of those references

    5 - open the project in VS and cross my fingers

    That being said, naming projects "v1","v2", etc may still cause problems. My preference if I REALLY need a "v1","v2", etc folder naming is to have that at the parent folder level (or source control.  Source control is the proper way to handle this).  So what I mean is if my layout is something like:

    C:\Source\Application

    and that folder has all of my source code starting with the solution file and then subfolders and all the other magic, I would name the folder Application "Application_V1".  Then if I need to do V2, I just make a backup of Application_V1 and name it Application_V2.  This way you don't need to rename anything in visual studio and you still get your folder-based version numbers.  It runs a lot of risks.

    Going back to source control, my opinion, even just running GIT locally on your machine without a centralized repository is better than running versioning by keeping multiple copies of the source on disk. And you can just branch off of your own local code to make new versions.  Just need to keep up with your commits so you don't screw up any  code changes when branching.  Still lose all the code if your disk dies, but you have that problem now too.  And running git on your local machine at least gives you some version control as you can go back to any specific commit or branch.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply