小编Seb*_*n S的帖子

VS2015使用TFS2013构建

我正在尝试使用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中构建失败但没有给出真正的答案.有没有人知道如何解决这个问题.

msbuild tfs

6
推荐指数
1
解决办法
1714
查看次数

通过 UDP 的实时音频流

正如标题所说,我正在尝试通过 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)

c# audio stream uwp

5
推荐指数
0
解决办法
1537
查看次数

inactivity check in typescript

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 …

javascript typescript

3
推荐指数
1
解决办法
1226
查看次数

时间触发未触发后台任务UWP

我和这里的那个人有同样的问题: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

c# uwp windows-10-universal

2
推荐指数
1
解决办法
1497
查看次数

标签 统计

c# ×2

uwp ×2

audio ×1

javascript ×1

msbuild ×1

stream ×1

tfs ×1

typescript ×1

windows-10-universal ×1