We have an on-premise TFS 2012 server and build server. We are in the process of upgrading to VS and TFS 2017. At the moment, there is the request to set up another build server that will allow us to build new 2017 projects from the existing TFS server. I create a new build server and installed TFS 2012 build services on it as well as VS2017. I created a new build definition but it fails to compile and errors show things like the syntax changes for 2017 that are invalid in 2012. How do I tell configure this to build the project against the installed VS2017?
Thanks to this post, I was able to use TFS 2012 continuous integration with build server building C# 6 syntax using Visual studio 2017. Hopefully this will save the next person some time in trying to figure this out.
Here are the list of things I have changed in order to get TFS 2012 to build c# 6 syntax. On the machine with the build agent, install vs 2017 enterprise, on the installation setup page, make sure MS build is selected
Edit the Build definition and make sure the MSBuild Argument is /tv:15.0 /p:GenerateBuildInfoConfigFile=false /p:VisualStudioVersion=15.0
Check the template your build definition is using and modify it by going to the source control explorer and going into the team project and undert BuildProcessTemplate, it should have the .xaml file, modify it by double clicking on it
There should be 2 actions that say Run MSBuild for Project. You need to change both of their toolpath property to point to the msbuild.exe parent folder on the build server. In my case, the build server is a 32 bit machine so the path to the Bin folder doesn't have (x86) next to Program Files, you need to check your build server to enter the correct path here.
After you have made the changes, you need to save the xaml and check it in.
Old Visual Studio versions installed msbuild into C:\Program Files (x86)\MSBuild\<version>\bin and apparently the RunMSBuild activity used the ToolVersion + the ToolArchitecture to calculate this path.
VS 2017 instead installs it C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin and the RunMSBuild can't calculate the proper path anymore. You can not use the old DefaultTemplate11.1xaml to integrate with VS2017.
To make this work, you could try to modify the TFSBuildServiceHost.exe.config and you must have a version of VS 2013 or VS 2015 installed on the build server in order for this to work. More detail step please follow Jonesy2488's answer in this link:How to get VS 2017 working with TFS 2017 XAML Builds
Moreover, XAML Build are deprecated in TFS 2017 and will not be available in tge next version of TFS(2018). VSTS already no longer supports them.
I'm looking for the hosted XAML build controller. Where did it go?
The hosted XAML build controller is no longer supported. Accounts
created on or after April 2016 do not have access to it. We plan to
remove the hosted XAML build controller from all accounts, possibly as
soon as March 2017.
Source
Since you are going to upgrade and use TFS2017. Highly recommend you to convert your builds to vNext Build to access some new technology and support. For more please refer Why Should I Leave XAML Builds?
Related
I have a problem with publishing an app in VS 2017 with the Publishing Wizard. I found a stackoverflow post:
Compile a .NET Core application as an EXE file using Visual Studio 2017
But when I want to go to this menu it only opens an old Publishing Wizard that doesnt have the options I need.
I tried to update my VS 2017 to the newest Version, but it didnt help...
After that I tried to use the first approach of the stackoverflow post above, but I didnt have dotnet(???) so installed .NET 7 SDK. Tried the command in the project directory (where the .csproject lays), but I got the error: MSB4062. So Im back trying to get the new publisher, because I really dont know how to fix MSB4062.
Picture of my Publishing wizard:
Picture of the one I want:
[]
The Publish Wizard is usually the first time you publish a project and will guide you to publish the project to the specified location.
After completing the Publish Wizard, you will find Publish Settings in the Publish view and configure it. Hope it can help you
I needed a .NET Core / .NET console app, but I had a .NET FRAMEWORK console app.
And to create a .NET Core / .NET console app I needed Visual Studio 2022 (maybe 2019 is enough), but I had Visual Studio 2017.
This fixed everything for me.
I have included Visual Studio SDK and Modeling SDK in my project in order to build my T4 templates. It has been working fine until I wanted to set up the VSO Build, which gives me the following error:
The imported project "C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\TextTemplating\Microsoft.TextTemplating.targets"
was not found. Confirm that the path in the <Import> declaration is
correct, and that the file exists on disk.
However, I was unable to find any options or settings to import/include the mentioned SDKs into the build machine.
VSO Hosted build agent does not have Modeling SDK installed, refer to Hosted pool and Hosted build controller for details.
To build your solution, you need to deploy your own build agent and install the required SDK on it.
I have a custom image with Node.js, Microsoft Build Tools 2013, Windows SDK for Windows 8.1, .Net Framework 4.5.1 SDK, Microsoft Test Controller for Visual Studio 2013, Microsoft Agents for Visual Studio 2013 and Microsoft Web Deploy 3.5 installed.
Most things are working but I am struggling to get the project to package. I do not need the project to deploy directly to a web server; a zip will do fine.
On my dev machine I have a publish profile set that creates a folder with the content of my web project as I would expect. On the build server the project builds with no errors but no publishing happens. No error messages either.
I have tried a lot of potential solutions and these range from VS2010 to VS2013 but I have not had a success yet.
My publish profile and configuration is DevTest:
"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild.exe" MyWeb.csproj /p:Configuration=DevTest /p:VisualStudioVersion=12.0 /p:CreatePackageOnPublish=true /p:DeployOnBuild=true /p:Configuration=DevTest
Any help is appreciated!
I have managed to get this to work but I don't have a clean answer. I am guessing this is why there has not been any replies.
MSBuild is a complex beast mostly because it references many paths outside of the project. In my instance MSBuild was looking for ReportViewer.WebForms and other references in different installation locations. My project was referencing v10 but the reference location MSBuild was using looking for version 11.
I've installed Visual Studio 2013 Premium (MSDN license) on my machine. Yet, the ASP.NET Web Application template is not there (except for Version2012, which offers me MVC 4, see screenshot below):
I have uninstalled and reinstalled VS2013 three times now. I've deleted the ItemTemplatesCache and ProjectTemplatesCache folders along with running the devenv /InstallVSTemplates and devenv /Setup to no avail. I've also checked to make sure web developer tools are installed. Under the \Common7\IDE\ProjectTemplatesCache\CSharp\Web folder, I only see MVC 4 template files. Am I missing something? An extension or additional program?
Below I added a screenshot of the frameworks I have installed. Any direction or advice would be appreciated. Thank you!
Jodie.
I think that "Re-install Visual Studio from scratch" is not a solution.
I have faced with the described problem and found much faster way to fix it:
First of all, try to repair Visual Studio installation (in "Control Panel\Programs\Programs and Features" find your Visual Studio, right-click and select "Repair"). Reboot after (!).
Check if template appeared in the Visual Studio. If not, then: in the "Control Panel\Programs\Programs and Features" make sure that you have "Microsoft Web Platform Installer 4.x" installed (I have 4.6 version). If not - install it from here: http://www.microsoft.com/web/downloads/platform.aspx
Run "Web Platform Installer" (it should be here: "%ProgramFiles%\Microsoft\Web Platform Installer\WebPlatformInstaller.exe")
On the "Products" tab find the line "Microsoft ASP.NET and Web Tools 2013.1 for Visual Studio 2013" (make sure that it is not for 2012!). If line has "Add" button on the right side enabled, then click it and install the tools. Reboot PC (!) and you should have your ASP.NET project template back.
If line says "Installed", then you should repair it via "Control Panel\Programs\Programs and Features", just find "Microsoft ASP.NET and Web Tools 2013.1 -Visual Studio 2013", right-click and select "Repair"). Reboot PC (!) and you should have your ASP.NET project template back!
Cheers!
After many hours of troubleshooting, these are the steps I took to fix the issue (on Windows 7 Ultimate). I assumed it was an issue with a corrupt installation and possible problems with registry keys, so I removed any and all Microsoft development tools using the following steps:
FULL VIRUS SCAN (just to make sure this was not related to a virus or malware). I used Microsoft Security Essentials
Downloaded Microsoft FixIt to help clean up registry keys as I deleted programs. After I deleted any program or program updates, I ran this tool to verify a clean uninstall had been done
Visual Studio 2010 - Ran the Visual Studio 2010 Uninstall Utility and removed the program. Went into Control Panel > Programs > Uninstall a program > View Installed Updates and searched for 'Visual Studio 2010', then removed any updates associated with VS2010 (and ran the FixIt program after every uninstall to verify the registry keys had been wiped)
Followed this MSDN post to remove Visual Studio 2012 (paying particular attention to the 'Optional Shared Packages' and removed any and all programs under this list, again running Microsoft FixIt to verify the registry keys were wiped)
Followed this blog post from Shawn Harrison to remove all SQL server; also referenced these two MSDN posts Uninstall an Existing Instance of SQL Server (Setup) and SQL Server Files Left After Uninstall
Uninstalled Visual Studio 2013, along with all references to 'Visual Studio 2013' in programs and installed updates; used FixIt to clean up registry keys after every install
Last but not least, I removed all MVC Visual Studio-related tools, references extensions including Web Tools and Web Platform Installer
This solved my problem with missing templates :)
(I'm soooooooo grateful this was all done on an SSD, however, I think it would have taken 5x longer with an old-spinning HD)
Cheers, everyone!
Not the solution in your case, but I had a similar issue where I could not find the MVC templates. Eventually I realized that I still had .NET Framework 3.5 selected, which of course does not provide MVC... switching to .NET Framework 4.5 let me find the MVC templates again.
You already had 4.5 selected in the screenshot, but I'm just posting this here for others who might make the same mistake as I did.
Don't forget to check that "Microsoft Web Developer Tool" was actually enabled during installation see this related stackoverflow question: How do I open a csproj with ProjectTypeGuids 349c5851-65df-11da-9384-00065b846f21?
"Microsoft Web Developer Tool" that was the problem for me
Have you tried updating the gallery
Tools>Extension and updates> Templates
To get up and running you could click Version 2012 under Web and get to the stock web applications templates which will provide you upto MVC 4
For MVC 5 you can either download Visual Studio 2013 Express Web, it roughly has the same ASP.NET features at Premium on MSDN License.
Update for Studio 2013:
Make sure you install express for Windows and not express for Windows Desktop. The Desktop version does not have the Web templates.
I had a similar issue with VS 2013 Web Express Update 3. After reinstalling stuff all week its fixed. I had to uninstall VS, delete the "Microsoft Visual Studio 12.0" directory, and reinstall VS. There are other workarounds that are more precise.
I'm writing a customized activity for TFS build process workflow, e.g. guideline here.
The post requires to add reference to Microsoft.TeamFoundation.TestImpact.Client.dll at path C:\Windows\assembly\GAC_MSIL\Microsoft.TeamFoundation.TestImpact.Client\10.0.0.0__b03f5f7f11d50a3a. I cannot find this path on my machine installing Visual Studio 2012.
Where would I find this reference?
This is an old thread, but in case anyone else runs into this, just download the stand alone TFS Object Model installer.
As the other answer states, it's shipped with VS 2010 so you'll need to install that and then you should be able to find it.
For any of you trying to do this with VS 2013 / TFS 2013 you need Microsoft.TeamFoundation.TestImpact.Client version=12.0.0.0
This file is located in the folder
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.TeamFoundation.TestImpact.Client\v4.0_12.0.0.0__b03f5f7f11d50a3a
Version 10.0 of the file is shipped with Team Explorer or Visual Studio 2010.
It is copied directly to the GAC but you can extract it using the command line COPY command.
Install VS 2010 on your machine, open a command prompt and navigate to C:\Windows\GAC_MSIL\Microsoft.TeamFoundation.TestImpact.Client\{Version}\
Then COPY Microsoft.TeamFoundation.TestImpact.Client.dll to a folder of your choice.
Finally, my advice would be that you use the version included in VS 2012, that would make things much easier. The method described above also works for Microsoft.TeamFoundation.TestImpact.Client.dll 11.0 (aka VS 2012 version).