msbuild

https://docs.microsoft.com/en-us/visualstudio/msbuild/walkthrough-using-msbuild?view=vs-2019

The path to MSBuild when installed with the .NET framework:

C:\Windows\Microsoft.NET\Framework[64 or empty][framework_version]

The path to MSBuild when installed with Visual Studio is:

C:\Program Files (x86)\MSBuild[version]\Bin for x86
C:\Program Files (x86)\MSBuild[version]\Bin\amd64 for x64.

The path when BuildTools_Full.exe is installed is the same as when MSBuild is installed with Visual Studio.

MSBuild is now installed in a folder under each version of Visual Studio. For example,

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild. 
msbuild Project.Build.msbuildproj /p:NuGetExe=".nuget/nuget.exe"
dotnet vstest mytestproject.dll --logger:"trx;LogFileName=custom_file_name.trx" --ResultsDirectory:custom/file/path

dotnet vstest mytestproject.dll myothertestproject.exe

dotnet build command is equivalent to dotnet msbuild -restore.

dotnet vstest command is superseded by dotnet test, which can now be used to run assemblies. See dotnet test.

dotnet publish command calls MSBuild, which invokes the Publish target.

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" CoreAgent1.csproj /t:Restore;Rebuild;Publish /p:PublishSingleFile=True /p:SelfContained=True /p:PublishProtocol=FileSystem /p:Configuration=Release /p:Platform=x64 /p:TargetFrameworks=netcoreapp3.1 /p:PublishDir=bin\Release\netcoreapp3.1\publish\win-x64 /p:RuntimeIdentifier=win-x64 /p:PublishReadyToRun=False /p:PublishTrimmed=False

MSBuild.exe" /t:restore
msbuild mysolution.sln /p:OutDir=c:\mydir

dotnet

SonarScanner.MSBuild.exe begin /k:“project-key”
MSBuild.exe

withSonarQubeEnv(credentialsId: ‘f225455e-ea59-40fa-8af7-08176e86507a’, installationName: ‘My SonarQube Server’) { // You can override the credential to be used
sh ‘mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar’
}

def sqScannerMsBuildHome = tool ‘Scanner for MSBuild 4.6’
withSonarQubeEnv(‘My SonarQube Server’) {
bat “ s q S c a n n e r M s B u i l d H o m e S o n a r Q u b e . S c a n n e r . M S B u i l d . e x e b e g i n / k : m y K e y " b a t ′ M S B u i l d . e x e / t : R e b u i l d ′ b a t " {sqScannerMsBuildHome}\\SonarQube.Scanner.MSBuild.exe begin /k:myKey" bat 'MSBuild.exe /t:Rebuild' bat " sqScannerMsBuildHomeSonarQube.Scanner.MSBuild.exebegin/k:myKey"batMSBuild.exe/t:Rebuildbat"{sqScannerMsBuildHome}\SonarQube.Scanner.MSBuild.exe end”
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值