Skip to content

Commit

Permalink
NupkgBetaRemover netcoreapp3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shimat committed Jan 24, 2021
1 parent ee1db1f commit cdb626c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -1,56 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CC19F9A5-01A7-4BDF-B34C-CF56F46A474A}</ProjectGuid>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>OpenCvSharp.NupkgBetaRemover</RootNamespace>
<AssemblyName>OpenCvSharp.NupkgBetaRemover</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<PackageId>OpenCvSharp.NupkgBetaRemover</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
24 changes: 2 additions & 22 deletions tool/OpenCvSharp.NupkgBetaRemover/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;

namespace OpenCvSharp.NupkgBetaRemover
{
class Program
{
[STAThread]
private static void Main(string[] args)
{
var nupkgFiles = SelectNupkgFiles();
if (nupkgFiles == null)
if (args.Length == 0)
return;

foreach (var nupkgFile in nupkgFiles)
foreach (var nupkgFile in args)
{
if (nupkgFile.Contains("ubuntu"))
continue;
Expand Down Expand Up @@ -66,22 +63,5 @@ private static void Main(string[] args)
File.Move(nupkgFile, newFileName);
}
}

private static string[] SelectNupkgFiles()
{
using (var dialog = new OpenFileDialog {
CheckFileExists = true,
CheckPathExists = true,
Filter = "nupkg files(*.nupkg;*.snupkg)|*.nupkg;*.snupkg",
Multiselect = true,
RestoreDirectory = true,
Title = "Select .nupkg files"
})
{
if (dialog.ShowDialog() != DialogResult.OK)
return null;
return dialog.FileNames;
}
}
}
}

0 comments on commit cdb626c

Please sign in to comment.