命令行MSBuild无法编译代码 [英] Command line MSBuild fails to compile code

查看:223
本文介绍了命令行MSBuild无法编译代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁能告诉我为什么命令行msbuild无法构建这个代码?

Can anyone tell me why command-line msbuild fails to build this code?

public SourceControlHandler(string sourceControlUser = null, string sourceControlPassword = null, string sourceControlDomain = null)
        {    
            var client = new SvnClient();
            if (!string.IsNullOrEmpty(SourceControlUser) && !string.IsNullOrEmpty(SourceControlPassword))
            {
                client.Authentication.Clear();
                client.Authenticatio​n.UserNameHandlers += delegate (object sender, Sv​nUserNameEventArgs e)
                {
                    e.UserName = SourceControlUser;
                };
            _svnClient = client;
        }

错误是:

d:\DEV\EP.BuildAndDeploy\BuildResources\BuildProjects.build" (Rebuild target)
1) ->
D:\DEV\EP.BuildAndDeploy\EP.BuildService\EP.BuildService.csproj" (default targ
t) (5) ->
CoreCompile target) ->
 Handlers\SourceControlHandler.cs(44,39): error CS1002: ; expected [D:\DEV\EP.
uildAndDeploy\EP.BuildService\EP.BuildService.csproj]
 Handlers\SourceControlHandler.cs(44,39): error CS1525: Invalid expression ter
 '.' [D:\DEV\EP.BuildAndDeploy\EP.BuildService\EP.BuildService.csproj]
 Handlers\SourceControlHandler.cs(44,40): error CS1002: ; expected [D:\DEV\EP.
uildAndDeploy\EP.BuildService\EP.BuildService.csproj]
 Handlers\SourceControlHandler.cs(44,107): error CS1026: ) expected [D:\DEV\EP
BuildAndDeploy\EP.BuildService\EP.BuildService.csproj]
 Handlers\SourceControlHandler.cs(44,108): error CS1002: ; expected [D:\DEV\EP
BuildAndDeploy\EP.BuildService\EP.BuildService.csproj]
 Handlers\SourceControlHandler.cs(44,108): error CS1525: Invalid expression te
m ')' [D:\DEV\EP.BuildAndDeploy\EP.BuildService\EP.BuildService.csproj]
 Handlers\SourceControlHandler.cs(44,109): error CS1002: ; expected [D:\DEV\EP
BuildAndDeploy\EP.BuildService\EP.BuildService.csproj]
 Handlers\SourceControlHandler.cs(48,14): error CS1002: ; expected [D:\DEV\EP.
uildAndDeploy\EP.BuildService\EP.BuildService.csproj]
 Handlers\SourceControlHandler.cs(50,10): error CS1513: } expected [D:\DEV\EP.
uildAndDeploy\EP.BuildService\EP.BuildService.csproj]

Visual Studio 2015没有编译它的问题,代码不会抛出任何运行时错误。
列出的代码从第38行开始。因此MSBuild / CSC抱怨 - 第一个错误 - 关于第二个点:client.Authenticatio n.UserNameHandlers;

Visual Studio 2015 has no issues compiling it and the code is not throwing any run-time errors. The listed code starts at line 38. Therefore MSBuild/CSC is complaining - first error - about the second dot in: client.Authenticatio​n.UserNameHandlers;

想法?

Ideas?

推荐答案

身份验证 o n
使用键盘上的箭头键播放时,您可以看到它。

You have a not displayable character in Authentication between oand n. You can see it when playing with arrow keys on keyboard.

这篇关于命令行MSBuild无法编译代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆