我在顶级instanceOfWinRTObject.OnSuspendingEvent += async (sender, args) =>
{
var deferral = args.Deferral;
try
{
// Client does some async work with a result
args.Result = await GetSomeStringAsync(args);
}
finally
{
deferral.Complete();
}
}
上定义了4个自定义Property
:
PropertyGroup
AndroidResourcesFolder
NugetFolder
(使用BrandingFiles
)NugetFolder
(使用AssemblyFile
) ...,我想从BrandingFiles
访问AndroidResourcesFolder
。
从Target
访问AssemblyFile
时,UsingTask
已正确解析 ,但是当我从{{1}访问Property
时},Visual Studio报告AndroidResourcesFolder
没有值:
错误MSB4044:未为“ Mobile.Branding.Build.Task.CleanResources”任务提供必需参数“ AndroidResourcesFolder”的值。
这是我的Target
文件:
Property
为什么只有3个.targets
得到解决,而其余(<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AndroidResourcesFolder>$(MSBuildProjectDirectory)\Resources\</AndroidResourcesFolder>
<NugetFolder>$(MSBuildThisFileDirectory)..\..\</NugetFolder>
<BrandingFiles>$(NugetFolder)MonoAndroid81\</BrandingFiles>
<AssemblyFile>$(BrandingFiles)\Amaris.Mobile.Branding.Build.dll</AssemblyFile>
</PropertyGroup>
<UsingTask
TaskName="Mobile.Branding.Build.Task.CleanResources" AssemblyFile="$(AssemblyFile)" />
<UsingTask
TaskName="Mobile.Branding.Build.Task.ReadConfig" AssemblyFile="$(AssemblyFile)" />
<Target Name="ReadConfig" >
<PropertyGroup>
<ConfigFile>$(MSBuildProjectDirectory)\branding.xml</ConfigFile>
</PropertyGroup>
<Mobile.Branding.Build.Task.ReadConfig
ConfigFile="$(ConfigFile)" />
</Target>
<Target Name="BeforeClean" DependsOnTargets="ReadConfig" >
<Mobile.Branding.Build.Task.CleanResources
AndroidResourcesFolder="$(AndroidResourcesFolder)" />
</Target>
</Project>
)却被排除在外?
谢谢!