我正在尝试使用TFS2013为VS2015解决方案做一个计划.在buildserver VS2015上安装并更改了buildtemplate,因此msbuild有一个参数\ tv:14.0,但是当一个开始构建时我收到以下错误:
C:\ Program Files(x86)\ MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(96):无效的静态方法调用语法:"[Microsoft.Build.Utilities.ToolLocationHelper] :: GetPlatformSDKDisplayName($(TargetPlatformIdentifier) ,$(TargetPlatformVersion))".找不到方法'Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKDisplayName'.静态方法调用应采用以下形式:$([FullTypeName] :: Method()),例如$([System.IO.Path] :: Combine(
a,b)).
buildserver已重新启动但我仍然收到错误.我还检查了这个帖子:在TFS中构建失败但没有给出真正的答案.有没有人知道如何解决这个问题.
正如标题所说,我正在尝试通过 UDP 传输音频。我正在使用连接了麦克风的树莓派 (v3)(使用 Windows 10 IoT)。我记录到一个流,并使用该流通过 UDP 发送数据。
var socket = new DatagramSocket();
var outputStream = (await socket.GetOutputStreamAsync(new Windows.Networking.HostName(target), targetPortNo)).AsStreamForWrite();
byte[] buffer = new byte[1024];
var streamForRead = _stream.AsStreamForRead();
int bytesRead;
while((bytesRead = await streamForRead.ReadAsync(buffer, 0, buffer.Length)) > 0)
{
await outputStream.WriteAsync(buffer, 0, buffer.Length);
await outputStream.FlushAsync();
}
Run Code Online (Sandbox Code Playgroud)
在接收端,我将数据放回到 MediaElement 控件使用的流中。
private IRandomAccessStream _stream = new MemoryStream().AsRandomAccessStream();
private async void MessageReceivedFromSocket(DatagramSocket sender, DatagramSocketMessageReceivedEventArgs args)
{
var incomingStream = args.GetDataStream().AsStreamForRead();
var writeStream = _stream.AsStreamForWrite();
var buffer = new byte[1024];
int bytesRead; …Run Code Online (Sandbox Code Playgroud) I'm having a problem with an inactivity check for my website. I've found a code sample on StackOverflow on how to do a simple inactivity check. And this works
var inactivityTime = function () {
var t;
window.onload = resetTimer;
document.onmousemove = resetTimer;
document.onkeypress = resetTimer;
function logout() {
location.href = 'logout.aspx'
}
function resetTimer() {
clearTimeout(t);
t = setTimeout(logout, 1000 * 60 * 1);
}
};Run Code Online (Sandbox Code Playgroud)
Since I'm doing typescript, I rewrote the code into a class. The inactivity …
我和这里的那个人有同样的问题:UWP Timetrigger无法正常工作, 但由于我的声誉不够高而无法对此问题发表评论,所以我要创建一个新问题。
正如我所说,我有同样的问题。我注册了后台任务,但是没有任何反应。我的后台任务位于单独的项目(运行时组件)中。所以那不是问题。这是我注册任务的方法:
public static BackgroundTaskRegistration Register(string name, string taskEntryPoint, IBackgroundTrigger trigger, IBackgroundCondition condition)
{
var foundTask = BackgroundTaskRegistration.AllTasks.FirstOrDefault(x => x.Value.Name == name);
if (foundTask.Value != null)
return (BackgroundTaskRegistration)foundTask.Value;
var builder = new BackgroundTaskBuilder();
builder.Name = name;
builder.TaskEntryPoint = taskEntryPoint;
builder.SetTrigger(trigger);
if (condition != null)
builder.AddCondition(condition);
return builder.Register();
}
Run Code Online (Sandbox Code Playgroud)
这就是我所说的:
BackgroundTaskRegister.Register(nameof(NotificationTask), $"Epguides.Background.{_backgroundTaskName}", new TimeTrigger(30, true), null);
Run Code Online (Sandbox Code Playgroud)
当我调试应用程序并在Visual Studio中使用Lifecycle Events测试我的后台任务时,一切正常。因此,问题不在于任务。
当我检查BackgroundTaskRegistration结果时,我看到属性触发器为null。在BackgroundTaskRegistration 的MSDN页面上,触发以下内容
这不适用于您的代码。对于所有不受支持的触发器类型,此属性返回的值为null。
因此,据我了解,TimeTrigger是不受支持的触发器类型,因为Trigger为null。
是否有人可以解释为什么它不起作用。我正在使用版本10.0.10586