TFS to VisualStudio Online Migration - Access to directory is denied - azure-devops

I'm trying the new OpsHub TFS to Visual Studio Online migration tool and have run into a snag. After successfully setting up the migration configuration, I begin the migration.
On the first changeset of the migration, I receive the error:
"OH_SCM_009: Error occurred while sync. Access to the path 'O:\w15_2\ProjectName'"
Where ProjectName is the name of my project.
Through deletion and recreation of the project in VSOnline, I found that the folder 'w15_2' would change, an indication that this path (and subsequent access failure) is in VSOnline. I have confirmed the user I am using for migration is a project collection admin, project admin, and project collection service account (per the OpsHub help page).
I'm not really sure where to go from here... any ideas how to get around this access denied error?

The error indicates that the utility does not have ability to write at location at :\Program Files\OpsHub Visual Studio Online Migration Utility\TFS_Temp which is used by the utility for temp work space. (It is aliased to O drive). Please check to make sure that this location is writeable.

Related

Build Visual Studio project fails - The cloud operation was unsuccessful

I'm using two laptops and stored my C# code in OneDrive.
I am aware that sharing code via OneDrive is not be the best approach, but that's what I'm dealing with now.
I noticed that on laptop 1 I have to define the following path to the data file (mdf):
C:\Users\ Diet\OneDrive\Personal\VisualStudio2019\Repos\project\project\App_Data\data.mdf
On laptop 2, the path is different because the user I'm logged in with has a different name (or at least that's what I believe is the cause)
C:\Users\ Dieter\OneDrive\Personal\VisualStudio2019\Repos\project\project\App_Data\data.mdf
Updating this in the Web.config fixed the connection to the database, BUT building the solution still returns an error, also related to a cloud operation, hence why I think it is caused by the path in OneDrive...
The error message:
CSC : error CS0041: Unexpected error writing debug information -- 'The cloud operation was unsuccessful.
I welcome your insights. Thank you for helping me out.
I have my projects stored in OneDrive and had this same issue. The fix was to set the entire Project folder contents to "Always keep on this device".
Seems that building the solution in VS was attempting to write to files that were not cached locally from OneDrive. As soon as I changed the setting, the build worked!
I was also storing my project on OneDrive, got the same error after installing a new ssd.
Rebuilding the solution was enough for me.

Does OpsHub Visual Studio Migration Utility preserve file checked out status?

When migrating a project collection to VSTS using OVSMU should I have all files in the collection checked in? In my testing OVSMU does not appear to preserve the file status. Is this the expected behavior?
This is the expected behavior. File status is not migrated over and Workspace configurations aren't either.

How do I change an entity framework project to use Microsoft SQL Server

I am trying to debug a program using Entity Framework code first on my personal (work) computer.
We have recently had a domain migration, meaning that the user I log in as now is not the same that I used before. This caused me to loose access to the databases I had on the computer. To get around this, I have uninstalled everything to do with Microsoft SQL Server on the computer, and installed the latest version of Microsoft SQL Server, 2014 - 12.0.4213.0 . I then restored the database I need.
When I first tried to run the program, Visual Studio complained that the project is set up to use SQL Server Express, which was not installed. The recommended solution is to change the project to use SQL Server instead. To do this, I must click on "the database file" and follow the instructions. I have looked through the entire solution. There is a great many files, but I found no good candidate for "the database file."
It seems that my Google fu is not strong enough to find anything about this. So my question is: how do I change the project to use SQL Server?
I also have a second, related question. I tried to solve the problem by installing SQL Server Express. However, when I try to restore the database to this, no base appears in the drop down list. When I try to run the program now, I get another error:
Unable to create the file 'c:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\Timelønsblanket.mdf' because it already exists.
I guess that this is also why I cannot restore the database. What I have found in websearches warns that I should not manually delete .mdf files.
Any advice on what to do?
I have solved the problem. All that was needed was a correct connection string. No need to find a "database file".

Creating new Team Projects with TFS Power Tools on server fails

I'm trying to create a powershell script, which creates new Team Projects in a given Team Project Collection. This script will have to run on the Team Foundation Server.
I'm using Team Foundation Server 2012, Visual Studio Team Explorer 2012 and TFS Power Tools 2012.
The script (based on this):
$tpcUrl = "http://localhost:8080/tfs/mycollection";
$teamproject = "TestProject"
tfpt.exe createteamproject /collection:$tpcUrl /teamproject:$teamproject /processtemplate:"Microsoft Visual Studio Scrum 2.2" /sourcecontrol:"New" /noportal /noreports
This works if I only run it once (if I only have to add one project), but when I run it again (with a different project name, of course), it gives an exception:
System.InvalidOperationException: Unexpected error occurred
when Visual Studio tried to load Team Foundation Server client application.
at Microsoft.TeamFoundation.PowerTools.CommandLine.TeamProjectCreator.CreateProject()
I found only one solution for this exception here, but it did not help, because I'm not running TFS Admin tool while the exception occurs.
I could only make this work if I manually (in TfsMgmt.exe) restart the collection (stop and start collection, not detach and attach). After that, the script worked, but again only for one new project. However, this is not a good solution, since I cannot restart a collection from script, so the project creation would require manual actions, which defeats its purpose.
This only occurs when I run this script on the Team Foundation Server, it works if I try to run it from my development PC. The problem is that I have to run it on the server.
Has anyone met this exception? Is there a way to fix it? Or is there a way I can restart a collection from script?
Edit:
There are no error messages on Logs page in TFS Administrator Console, or in the Event Viewer.

OpsHub Migration to VSO can't get past changeset and stops running

I've tried this twice with the same result.
Error Message: OH-SCM-009 Error Occurred while sync. Could not find file 'O:\w11_10_0'
Version: OpsHub Integration Manager Framework-OVSMU-V1.0.1.006
Here are the changeset details
Close OpsHub Migration Utility.
Delete Folder w11_10_0 and Start Migration utility again.
Which will again create new folder and start syncing.
If you still getting this error, Can you please zip up and send us the log files from location :\Program Files\OpsHub Visual Studio Online Migration Utility\logs and email them to ovsmu#opshub.com Please include a reference to this request in your email so we will provide proper resolution to this
At one point if you moved code from one TFS Team Project to a New Team Project and DELETED the original team project then this may cause this issue.