Posts

Showing posts with the label msbuild

MSbuild error in ASP.NET MVC

Image
Clash Royale CLAN TAG #URR8PPP MSbuild error in ASP.NET MVC I have a solution with 5 projects: This project had been building correctly until I update VS. After updated VS, I cannot rebuild or build the project. I try lots of ways for solving it but not working. I took a picture of error list and attached below. Error List Window By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

TFS2010 Build does not deploy web application

Image
Clash Royale CLAN TAG #URR8PPP TFS2010 Build does not deploy web application I'm trying to get my web application to deploy automatically at the end of an automated build and I'm obviously missing something. My setup is: VS2012 on a Win7 workstation TFS2010 repository on serverA TFS build agent on serverB Test site in IIS7 on serverC. I have created a quick test project using the default MVC4 template and created a Team Project to go with it using the MS VS Scrum 1.0 template. I created a new publish profile for the web application using the publish web dialog and the .pubxml file is checked in with the project. The .pubxml file looks something like this: <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <WebPublishMethod>MSDeploy</WebPublishMethod> <SiteUrlToLaunchAfterPublish>TestServer/DeployTest</SiteUrlToLaunchAfterPublish> <MSDeployService...

Having troubles building my solution with MSBuild on Bamboo

Having troubles building my solution with MSBuild on Bamboo I have a windows application developed in Visual Studio 2015 professional, Framework - 4.6.1 .I have written unit test cases for this windows service using MStest. If I build this application locally on my machine, the build is successful (build is done by Visual Studio -> Build-> Build Solution and through MSBuild). Now I have a VM where visual studio 2015 is not installed.But has VS2017 installed on it. Now I'm trying to build my application by MSBuild through Bamboo. It gives the following errors on it . UnitTest1.cs(2,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:UsersAdministratorbamboo-homexml-databuild-dirGUI-DEV-JOB1UnitTestGUIUnitTestGUI.csproj] UnitTest1.cs(9,10): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an ass...

Append Build ID to nuget version specified in .csproj

Image
Append Build ID to nuget version specified in .csproj In this video from MSDN (https://channel9.msdn.com/Events/Build/2018/THR5057) at the 3:34 second mark, the presenter shows how to append the Build ID to a nuget's version. In the MSBuild arguments, he specifies: /t:pack /p:PackageVersion=1.0.$(Build.BuildId) So, when the project is built by VSTS, the nuget assembly's revision number is using the build id. I would like to do something similar. Instead of hard coding the 1.0 in the build definition, I'd like to retrieve that from .csproj file. I am using the new .csproj file which stores nuget information. For example, I'd like to specify in the csproj: 0.0.1-beta Then, VSTS would append the BuildID and generate the assembly version as 0.0.0.1-beta.49 (49 being the build id) 2 Answers 2 You can create a Power Shell script that retrieves the version from csproj file, then add the ver...