msbuild

MSBuild: How to read Assembly Version and FIle Version from AssmeblyInfo.cs?

北城以北 提交于 2020-05-28 07:57:31
问题 Using MSBuild script how can we get AssmeblyVersion and FileVersion from AssemblyInfo.cs? 回答1: Using MSBuild script how can we get AssmeblyVersion and FileVersion from AssemblyInfo.cs? To get the AssmeblyVersion via MSBuild, you can use GetAssemblyIdentity Task. To accomplish this, unload your project. Then at the very end of the project, just before the end-tag </Project> , place below scripts: <Target Name="GetAssmeblyVersion" AfterTargets="Build"> <GetAssemblyIdentity AssemblyFiles="$

MSBuild: How to read Assembly Version and FIle Version from AssmeblyInfo.cs?

可紊 提交于 2020-05-28 07:57:05
问题 Using MSBuild script how can we get AssmeblyVersion and FileVersion from AssemblyInfo.cs? 回答1: Using MSBuild script how can we get AssmeblyVersion and FileVersion from AssemblyInfo.cs? To get the AssmeblyVersion via MSBuild, you can use GetAssemblyIdentity Task. To accomplish this, unload your project. Then at the very end of the project, just before the end-tag </Project> , place below scripts: <Target Name="GetAssmeblyVersion" AfterTargets="Build"> <GetAssemblyIdentity AssemblyFiles="$

How to speed up git pulling triggered using jenkins?

空扰寡人 提交于 2020-05-27 13:48:10
问题 This is a xamarin mobile application of size more than 2 GB. My lead was able to build it using MSBuild. I am given the task of automating the build using Jenkins with MSBuild as plugin. Since this is a very big application, git pulling has already taken more than one hour and the task progress bar is showing around 95%. Question 1) How can I speed up this jenkins/git pulling process? I am working on the client's virtual machine and internet speed is fairly good I am sharing my jenkins

How to “dotnet pack” an already compiled project

笑着哭i 提交于 2020-05-27 07:47:39
问题 I'm trying to design a build script for a dotnet core 2.0 project that does the following actions Cleans output directories Builds Solution with -o bin\Publish Runs Unit Tests with dotnet vstest Creates a Nuget package with dotnet pack Because I know the source code has been built and tested in steps 1-3 I do not want to rebuild my code for the nuget package, so I am specifying --no-build and --no-restore The difficulty I'm having is that when creating the package, because I am not building

How to “dotnet pack” an already compiled project

吃可爱长大的小学妹 提交于 2020-05-27 07:47:34
问题 I'm trying to design a build script for a dotnet core 2.0 project that does the following actions Cleans output directories Builds Solution with -o bin\Publish Runs Unit Tests with dotnet vstest Creates a Nuget package with dotnet pack Because I know the source code has been built and tested in steps 1-3 I do not want to rebuild my code for the nuget package, so I am specifying --no-build and --no-restore The difficulty I'm having is that when creating the package, because I am not building

Can I specify the output path for the MSBuild <Content> tag?

狂风中的少年 提交于 2020-05-25 04:20:21
问题 Is it possible to specify a different folder for the output of the following file? <Content Include="test.stl"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> 回答1: A different output folder can be specified by using the Link metadata on None / Content items: <Content Include="test.stl"> <Link>some\folder\%(Filename)%(Extension)</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> When using wildcards in an include statement, this is also

VSTS build fails with MSB4184 The path is not of a legal form

≡放荡痞女 提交于 2020-05-24 07:14:30
问题 I'm attempting to use the build system in VSTS to build and deploy a c# .net web app. I've created a new single-project solution (as there doesn't seem to be any way to specify which project to build/deploy in a multi project solution!?!) and set up my build definition to point to this new solution. I've set it up to use the VS2017 build agent. The NuGet restore completes and it begins to build but fails with the error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild

VSTS build fails with MSB4184 The path is not of a legal form

我是研究僧i 提交于 2020-05-24 07:14:11
问题 I'm attempting to use the build system in VSTS to build and deploy a c# .net web app. I've created a new single-project solution (as there doesn't seem to be any way to specify which project to build/deploy in a multi project solution!?!) and set up my build definition to point to this new solution. I've set it up to use the VS2017 build agent. The NuGet restore completes and it begins to build but fails with the error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild

Why am I getting different MSBuild behavior between Visual Studio 2019 Output vs admin dev cmd prompt

吃可爱长大的小学妹 提交于 2020-05-15 21:45:19
问题 Given: Visual Studio 2019 C# Console Application .Net Framework 4.6.1 I'm just testing a simple AfterBuild target with a simple message. However, I'm getting different behavior between editor output and admin cmd prompt. Message doesn't show up in output window but it does in cmd prompt. <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft

Error NU1101: Unable to find package ProjectABC.Core.Services. No packages exist with this id in source(s)

倾然丶 夕夏残阳落幕 提交于 2020-05-15 07:44:05
问题 I am trying to implement CI/CD on Azure DevOps for my Asp.net Core project. Project having Nuget packages from three different sources: MSBUild in Azure Pipeline is going to find nuget packages in Offline Packages or Nuget.org only but not going to find external source which i am also using: http://dev-abc-api-nugetserver-wi.azurewebsites.net/nuget/ I have tried below code in Azure Pipeline Build but that didn't work /p:RestoreAdditionalSources="http://dev-abc-api-nugetserver-wi.azurewebsites