我正在创建一个Xamarin Forms项目,我根据不同的设备找不到当前的屏幕宽度.
我知道如何在android和ios中完成它,但需要一种方法来在便携式中找到宽度.
我需要在设置页面中显示应用程序的构建版本.
那么我怎样才能以编程方式获取versionCode
和versionName
从AndroidManifest.xml
文件中获取.
要么
有没有办法以编程方式获取构建版本xamarin.forms
.
我已启用 Cobertura 格式的代码覆盖率,并且尝试从 Azure DevOps 管道中的代码覆盖率分析中排除一些文件(尤其是第 3 方 DLL)。目前,下面是我在管道中得到的输出
这里,第 3 方 DLL 也包含在覆盖率报告中。我想排除所有第 3 方 DLL,例如 FluentAssertion、Microsoft.Azure 等。
下面是我的 YAML 文件中产生上述输出的一些行
- task: VSTest@2
displayName: 'Run .NET Core Unit Tests $(ucSolution)'
continueOnError: true
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\MyApp.*.UnitTests.dll
!**\*TestAdapter.dll
!**\obj\**
!**\ref\**
searchFolder: '$(System.DefaultWorkingDirectory)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
diagnosticsEnabled: true
rerunFailedTests: true
rerunFailedThreshold: '10'
rerunMaxAttempts: '1'
resultsFolder: '$(build.ArtifactStagingDirectory)\Test\Results\core'
otherConsoleOptions: '/collect:"Code Coverage;Format=Cobertura"'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage results'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(build.ArtifactStagingDirectory)/Test/Results/**/**/*.cobertura.xml
Run Code Online (Sandbox Code Playgroud)
谁能建议我如何从分析或代码覆盖率报告中排除第 3 方 DLL?
我非常感谢您提供的任何帮助。
我的项目中有服务器端渲染的要求。所以,我已经使用下一个 js 开发了它,现在我在部署中获得了结构。
我需要在 iis 中部署我的项目,但不知道如何实现。我尝试了很多没有运气。它在开发模式下工作正常,但在生产模式下不工作。
我试过,next export
但这是用于静态页面部署,我的项目使用动态页面。
任何帮助将不胜感激。提前致谢。
我在 azure 函数中有 cosmos db 触发器,当文档更改时它会触发,这很好。
但我的文档很大,我只需要触发器中更新的属性。
我可以通过比较新旧文档来解决这个问题,但在触发器中我只得到更新的文档。
那么有没有办法在触发器中获取旧的和更新的文档。
我的 Azure Function 触发器是
module.exports = async function (context, documents) {
if (!!documents && documents.length > 0) {
context.log('Document Id: ', documents[0].id);
context.log('Document : ', documents[0]);
}
context.done(); }
Run Code Online (Sandbox Code Playgroud)
我的函数绑定是
{ "bindings": [
{
"type": "cosmosDBTrigger",
"name": "documents",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "AzureWebJobsCosmosDBConnectionString",
"databaseName": "ToDoList",
"collectionName": "Items",
"createLeaseCollectionIfNotExists": true
} ], "disabled": false }
Run Code Online (Sandbox Code Playgroud)
提前致谢
xamarin ×2
azure-devops ×1
cobertura ×1
deployment ×1
iis ×1
next.js ×1
triggers ×1
unit-testing ×1
width ×1