build project under dotnet framework for deploy on linux x86

This commit is contained in:
jetsparrow 2019-02-09 19:01:12 +03:00
parent d410d7ae47
commit e2ee46eba9
3 changed files with 6 additions and 6 deletions

View File

@ -76,10 +76,10 @@ namespace JetKarmaBot
{ {
build = build + "/" + names[i] + "\n"; build = build + "/" + names[i] + "\n";
} }
build += "/" + names[names.Count - 1] + " " + string.Join(' ', c.Arguments.Select(x => (!x.Required ? "[" : "") + x.Name + (!x.Required ? "]" : ""))) + " <i>" + getLocalizedCMDDesc(c, loc) + "</i>"; build += "/" + names[names.Count - 1] + " " + string.Join(" ", c.Arguments.Select(x => (!x.Required ? "[" : "") + x.Name + (!x.Required ? "]" : ""))) + " <i>" + getLocalizedCMDDesc(c, loc) + "</i>";
pieces.Add(build); pieces.Add(build);
} }
return string.Join('\n', pieces); return string.Join("\n", pieces);
} }
internal string GetHelpTextFor(string commandname, Locale loc) internal string GetHelpTextFor(string commandname, Locale loc)
@ -91,7 +91,7 @@ namespace JetKarmaBot
{ {
build = build + "/" + names[i] + "\n"; build = build + "/" + names[i] + "\n";
} }
build += "/" + names[names.Count - 1] + " " + string.Join(' ', c.Arguments.Select(x => (!x.Required ? "[" : "") + x.Name + (!x.Required ? "]" : ""))) + " <i>" + getLocalizedCMDDesc(c, loc) + "</i>\n"; build += "/" + names[names.Count - 1] + " " + string.Join(" ", c.Arguments.Select(x => (!x.Required ? "[" : "") + x.Name + (!x.Required ? "]" : ""))) + " <i>" + getLocalizedCMDDesc(c, loc) + "</i>\n";
build += string.Join("\n", c.Arguments.Select(ca => (!ca.Required ? "[" : "") + ca.Name + (!ca.Required ? "]" : "") + ": <i>" + getLocalizedCMDArgDesc(ca, loc) + "</i>")); build += string.Join("\n", c.Arguments.Select(ca => (!ca.Required ? "[" : "") + ca.Name + (!ca.Required ? "]" : "") + ": <i>" + getLocalizedCMDArgDesc(ca, loc) + "</i>"));
return build; return build;
} }

View File

@ -36,8 +36,8 @@ namespace JetKarmaBot.Commands
if (!match.Success) if (!match.Success)
return false; return false;
string cmd = match.Groups["cmd"].Captures.First().Value; string cmd = match.Groups["cmd"].Captures[0].Value;
string username = match.Groups["name"].Captures.FirstOrDefault()?.Value; string username = match.Groups["name"].Captures.Count > 0 ? match.Groups["name"].Captures[0].Value : null;
string[] parameters = words.Skip(1).ToArray(); string[] parameters = words.Skip(1).ToArray();
result = new CommandString(cmd, parameters) { UserName = username}; result = new CommandString(cmd, parameters) { UserName = username};

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework> <TargetFrameworks>netcoreapp2.1;net47;</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.4"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.4">