TFPT unshelve /migrate across workspaces - tfs-power-tools

Thank you to Ben Cull for providing the unshelve/migrate instructions in his blog:
Problem:
Unable to unshelve migrate across workspaces
Setup:
Workspace 1, Branch a
Workspace 2, Branch b
Shelveset 999
Execution:
using VSDevCmd.bat
tfpt workspaces showed that workspace 1 & 2 do exist
tfpt unshelve /migrate
/source:"$/project/a" /target:"$/project/b" "999"
Result:
"cannot be unshelved because the server path is not mapped in the local workspace"
Expected:
"merge was successfull"
Research:
I have reviewed unshelve on Microsoft Docs and could not find a workspace parameter.
Question:
Is this possible?

No
This is not possible. You'll need to map both paths in the workspace. Workspace is athe "container" for work in TFVC and there is no command that works cross workspaces.

Related

Error in dbt compile with a local package

We are setting up a new dbt project which will probably have several engineers working on it. To reduce merge conflicts I'm playing with creating "sub" projects per data subject area and then referencing those as local or git packages in a master project that runs the whole pipeline.
I created one simple "sub" project with some models and schema tests and referenced this as a local package in a master project. dbt deps installed it ok, but when I run "dbt compile" I get an error like the below, does anyone have any ideas please? dbt version 0.19.0 running on ubuntu 18.04 against a snowflake target
Runtime Error
Compilation Error in test not_model_column_one (models/package_name/package_metadata.yml)
'test_not' is undefined
Turns out it was a simple typo, how embarassing. Somehow when I was moving files around into sub-projects an underscore got removed from "not_null" in one of my metadata files. The project previously worked fine so not sure how it happened, must have been fat fingers.

NuGet with MSBuild Trying to locate the package.config in VS IDE folder

I have a solution running on VS 2017 15.7.4 on Windows 7 and works on 6 machines.
On this new machine (same like the others), I am getting the following when I am trying to compile:
The command ""C:\Projects\MySolution\Source\.nuget\NuGet.exe" install "packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "C:\Projects\MySolution\Source\ "" exited with code 1
Could not find file 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\packages.config'.
We tried showing detailed build log, but that wasn't helpful
We rebuilt the machine and same error persisted.
This is a corporate machine with local admin right user account. I am suspecting that the local admin rights might not be implemented properly.
Any suggestions?
NuGet with MSBuild Trying to locate the package.config in VS IDE
folder
Please try to give the full path to the packages.config file:
"C:\Projects\MySolution\Source\.nuget\NuGet.exe" install "<YourProjectPath>\packages.config" -source "C:\Projects\MySolution\Source\"
After hours of investigation, it turned out that the project name is the problem.
The project name (and the namespace) are as follow: MyCompany.MyProject.CMD
(CMD is actually real).
This project was compiling for ages on all machines, however, it didn't do on this particular machine.
We deleted the whole folder structure and recreated it and even formatted the machine.
We tried creating a new project from scratch and calling it the same name - Didn't compile
We tried creating a new project from scratch and called it a different name - Worked!
So solution was changing the project name to MyCompany.MyProject.SomethingElse sorted out the problem. I didn't add CMD as part of the project name, but I will never do and I will pass this to my kids as well.
I didn't want to investigate why it didn't work but CMD resembles the name of the Windows console, would that be the reason? I don't care to know.

TFS 2015 build issues

Hi I am banging my head for last few days.
Here is the situation ...
1. I have VSO account which maintains the TFS in cloud.
2. Installed a build server/agent on another machine. (Works fine)
3. Tried to build(XAML build) one solution using that server/controller.
4. Got an error saying ...
"The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk."
The build server and the agents are from TFS 2015 and the project is a Visual Studio 2015 project using framework 4.6. I was expecting "v14" folder for target files during build. Why it is trying to find things from "v11" folder ? And how do I solve this.
I know I can copy files to "v11" but I don't want to escape the facts. There should be a reason and a proper fix. Any help would be nice.
Several solutions for you to correct this error:
S1: Install MSBuild.Microsoft.VisualStudio.Web.targets from NuGet gallery via running the following command: Install-Package MSBuild.Microsoft.VisualStudio.Web.targets.
Then replace the following line in your .proj file
<Import Project="$(MSBuildBinPath)\Microsoft.WebApplication.targets" />
with
<Import Project="$..\packages\MSBuild.Microsoft.VisualStudio.Web.targets.14.0.0\tools\VSToolsPath\WebApplications" />
S2: Set the /p:VisualStudioVersion=12.0 MSBuild argument in the build definition.
S3: Copy the Microsoft.VisualStudio.Web.targets file to the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications folder on the build agent machine.
S4: Install VS2012 on the TFS build agent machine just like Patrick mentioned above.
And related cases: Microsoft.WebApplication.targets and Microsoft.WebApplication.targets was not found, on the build server. What's your solution?
The WebApplications\Microsoft.WebApplication.targets (11.0) (which comes from VS2012) is referenced in your web application, so the Visual Studio 2012 should be installed on your build server to resolve this issue.
Be note that, to guarantee TFS build runs successful, you should make sure your build agent machine has the some environment as dev machine.
Did you restore a previous collection on TFS 2015 from a previous TFS version? Did your solution or any projects in your solution get created prior to VS2015?

How to build Rebol 3 in MSVC

I am trying to get Rebol 3 to compile in Microsoft Visual Studio 2013, but so far I have been unsuccessful. I am using a Git repo for my source which does not come with a solution. I have tried creating a solution and manually importing all of the code files, but that does not work. I really do not know what I am doing, so any help would be appreciated.
Please clone my repository: https://github.com/zsx/r3
Once you have cloned the repository, checkout the "atronix" branch (you're probably on it when you first cloned it), and initialize & update the submodule:
git clone https://github.com/zsx/r3.git
cd r3
git submodule init
git submodule update
Open the ms vs solution file make/msvc/r3.sln
Edit:
The old branch "msvc" is merged to "atronix", so use this one instead.

How to unshelve another developer's changes that include dlls or other binaries?

Using Team Foundation Server 2010 I am trying to unshelve a series of changes made by another developer on my team. This shelve set includes some Nuget packages which include dlls. I am receiving multiple errors along the lines of:
The item $/file/path/some.dll is locked for check-out by USER in workspace MACHINENAME.
In 2008 Mac Noland asserted in his blog post Unshelving files that have File Merging disabled that this error is caused by having file merging being disabled. Which makes good sense to have file merges disabled for binaries. Based on the error I am assuming that TFS 2010 is still utilizing the merge utility when unshelving (makes sense as to why). That said I do not want to enable file merging for dll files.
Unfortunately, understanding what is going on and fixing it are two different things. In TFS is there a way to unshelve binary files which were shelved by a different user?
If the user created the shelveset, but left everything checked out locally, you will receive this error. Since TFS usually allows only a single checkout for binary files, a shelveset can't be unshelved if it contains a binary file which is locked by another user.
You can attempt to unlock the file with the following command -
tf lock itemspec /lock:none /workspace:OtherUsersWorkspace
You should be able to determine the workspace from the error message, and you'll also need to specify the user - /workspace:WORKSPACE;userid
In my case my source code is located at below location in my work station
D:\TFS\Source\Development\Cars.
I opened Visual Studio Command Prompt under Visual Studio Tools and ran it as Administrator.
I changed my command prompt to move to
D:\TFS\Source\Development\Cars
Executed below line
D:\TFS\Source\Development\Cars> tf lock HE/* /lock:none /workspace:zigglerworkspace /login:ziggler /collection:ziggler1pxtfs01\WebProjects
zigglerworkspace - my workspace name
ziggler - my user name
ziggler1pxtfs01\WebProjects - TFS server url
This released locks on all files and folders under HE folder which is located at
D:\TFS\Source\Development\Cars\HE
Install Microsoft Team Foundation Server 2010 Power Tools
Add C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools to your system path
cd c:[some location]\"destination workspace"
tfpt unshelve /migrate "shelveset name";otherUserName /source:"$/ProjectName/Main/Source" /target:"$/ProjectName/Main/Target"