This commit is contained in:
Charles Torre 2021-11-14 19:16:03 -08:00
Родитель f737f6139d
Коммит c7da7d0bac
7 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -6,9 +6,9 @@ $Configuration="Release"
try {
Push-Location $scriptPath
Remove-Item $scriptPath\Guan\bin\release\netstandard2.1\ -Recurse -Force -EA SilentlyContinue
Remove-Item $scriptPath\Guan\bin\release\netstandard2.0\ -Recurse -Force -EA SilentlyContinue
dotnet publish $scriptPath\Guan\Guan.csproj -o bin\release\netstandard2.1 -c $Configuration
dotnet publish $scriptPath\Guan\Guan.csproj -o bin\release\netstandard2.0 -c $Configuration
}
finally {
Pop-Location

Просмотреть файл

@ -22,7 +22,7 @@ function Build-Nuget {
[string] $nugetSpecTemplate = [System.IO.File]::ReadAllText([System.IO.Path]::Combine($scriptPath, "Guan.nuspec.template"))
[string] $nugetSpecPath = "$scriptPath\Guan\bin\release\netstandard2.1\$($packageId).nuspec"
[string] $nugetSpecPath = "$scriptPath\Guan\bin\release\netstandard2.0\$($packageId).nuspec"
[System.IO.File]::WriteAllText($nugetSpecPath, $nugetSpecTemplate.Replace("%PACKAGE_ID%", $packageId).Replace("%ROOT_PATH%", $scriptPath))
@ -37,7 +37,7 @@ try {
Install-Nuget
Build-Nuget "Microsoft.Logic.Guan" "$scriptPath\Guan\bin\release\netstandard2.1"
Build-Nuget "Microsoft.Logic.Guan" "$scriptPath\Guan\bin\release\netstandard2.0"
}
finally {

Просмотреть файл

@ -4,7 +4,7 @@
<id>%PACKAGE_ID%</id>
<version>1.0.1-Preview</version>
<releaseNotes>
- Refactorings, bug fixes implementation improvements, code improvements. .NET Standard 2.1.
- Refactorings, bug fixes implementation improvements, code improvements.
</releaseNotes>
<authors>Microsoft</authors>
<license type="expression">MIT</license>
@ -17,14 +17,14 @@
<files include="**" buildAction="None" copyToOutput="true" />
</contentFiles>
<dependencies>
<group targetFramework=".NETStandard2.1" />
<group targetFramework=".NETStandard2.0" />
</dependencies>
<projectUrl>https://github.com/microsoft/guan</projectUrl>
<tags>guan logic-programming netstandard21 netcore csharp</tags>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
</metadata>
<files>
<file src="Guan.dll" target="lib\netstandard2.1" />
<file src="Guan.dll" target="lib\netstandard2.0" />
<file src="%ROOT_PATH%\icon.png" target="" />
</files>
</package>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />

Просмотреть файл

@ -30,7 +30,7 @@ namespace Guan.Logic
}
index = -1;
if (name.EndsWith(']'))
if (name.EndsWith("]"))
{
index = name.LastIndexOf('[');
if (index > 0)

Просмотреть файл

@ -80,7 +80,7 @@ namespace Guan.Logic
else if (name == Trace)
{
string traceConfig = (string)value;
this.traceTypes = new List<string>(traceConfig.Split(',', System.StringSplitOptions.RemoveEmptyEntries));
this.traceTypes = new List<string>(traceConfig.Split(new char[] { ',' }, System.StringSplitOptions.RemoveEmptyEntries));
}
else if (name == "CatchException")
{

Просмотреть файл

@ -63,7 +63,7 @@ namespace Guan.Logic
StringBuilder result = new StringBuilder();
foreach (OutputVariable entry in this.entries)
{
if (!entry.Original.Name.StartsWith('_'))
if (!entry.Original.Name.StartsWith("_"))
{
Term value = entry.GetBoundTerm();
LinkedVariable linkedVariable = value as LinkedVariable;