Skip to content

Commit

Permalink
chore: updates .net to v4.8 vs2022
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Oct 3, 2023
1 parent 2f301a3 commit aba03e9
Show file tree
Hide file tree
Showing 14 changed files with 384 additions and 393 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: ci

on:
push:
branches: [main]
pull_request:
branches: [main]


jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: setup MSBuild
uses: microsoft/setup-msbuild@v1

- name: setup NuGet
uses: nuget/setup-nuget@v1

- name: restore packages
run: nuget restore MBRC.sln -OutputDirectory packages -NonInteractive

- name: build
run: msbuild MBRC.sln /p:Configuration="Release" /m /v:M /fl /nr:false

- name: copy to dist
run: |
mkdir -p build/dist
cp build/bin/plugin/Release/mb_remote.dll build/dist
cp build/bin/firewall-utility/Release/firewall-utility.exe build/dist
cp LICENSE build/dist
- uses: actions/upload-artifact@v3
with:
name: mbrc-plugin-dev
path: build/dist

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,6 @@ MB_REMOTE.XML
.idea
*.iml
*.dll

app/MusicBee
tools
17 changes: 0 additions & 17 deletions CREDITS.md

This file was deleted.

30 changes: 2 additions & 28 deletions MBRC.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio Version 17
VisualStudioVersion = 17.7.34031.279
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mbrc-plugin", "plugin\mbrc-plugin.csproj", "{F5D46BA1-6F21-40EF-9695-46105CCACD08}"
EndProject
Expand All @@ -10,48 +10,22 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|Win32.ActiveCfg = Debug|Any CPU
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|Win32.Build.0 = Debug|Any CPU
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|Any CPU.Build.0 = Release|Any CPU
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|Win32.ActiveCfg = Release|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Debug|Win32.ActiveCfg = Debug|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Debug|Win32.Build.0 = Debug|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Release|Any CPU.Build.0 = Release|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Release|Win32.ActiveCfg = Release|Any CPU
{48E9B838-6430-459B-9B44-D1E3548DF393}.Release|Win32.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs
BuildVersion_BuildVersioningStyle = None.None.Increment.None
BuildVersion_ConfigurationName = Release
BuildVersion_UpdateAssemblyVersion = True
BuildVersion_UpdateFileVersion = True
BuildVersion_UseGlobalSettings = False
BuildVersion_UseUniversalClock = True
SolutionGuid = {B3E361C2-94CF-4307-A560-AE980DE1C98A}
EndGlobalSection
EndGlobal
10 changes: 10 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# MusicBee

## Installing

For testing purposes it is preferred to use a separate instance of MusicBee than the main on.

Download the portable edition of MusicBee from [here](https://www.getmusicbee.com/downloads/) and
make sure that you install it so that the `MusicBee` folder is in this directory.

The build script will automatically copy the plugin to the Plugins folder.
6 changes: 3 additions & 3 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ if not "%PackageVersion%" == "" (
)

REM Remove Previous output
rmdir %cd%\build\bin\%config% /s /q
rmdir %cd%\build /s /q

REM Package restore
tools\nuget.exe restore mbrc-core\packages.config -OutputDirectory %cd%\packages -NonInteractive
tools\nuget.exe restore -OutputDirectory %cd%\packages -NonInteractive

REM Build
"%programfiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" MBRC.sln /p:Configuration="%config%";Platform="Any CPU" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
"%programfiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\MSBuild.exe" MBRC.sln /p:Configuration="%config%";Platform="Any CPU" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false


6 changes: 3 additions & 3 deletions firewall-utility/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
</configuration>
4 changes: 2 additions & 2 deletions firewall-utility/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ private static void CreateFirewallRuleForPort(int portNumber, string ruleName)
}
catch (COMException ex)
{
#if DEBUG
Console.WriteLine("A COMException happened will creating rule {0} for port {1}.", ruleName, portNumber);
Console.WriteLine(ex);
#if DEBUG
Console.ReadLine();
#endif
}
catch (Exception ex)
{
// I suppose it was a rights exception
Console.WriteLine("The application requires administrative rights. Please run as administrator.");
#if DEBUG
Console.WriteLine(ex);
#if DEBUG
Console.ReadLine();
#endif
}
Expand Down
11 changes: 6 additions & 5 deletions firewall-utility/firewall-utility.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>firewall_utility</RootNamespace>
<AssemblyName>firewall-utility</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AssemblyInfoFilePath>Properties\AssemblyInfo.cs</AssemblyInfoFilePath>
<UpdateAssemblyVersion>True</UpdateAssemblyVersion>
<UpdateAssemblyFileVersion>False</UpdateAssemblyFileVersion>
<UpdateAssemblyInfoVersion>False</UpdateAssemblyInfoVersion>
<AssemblyVersionSettings>None.None.None.Increment</AssemblyVersionSettings>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -26,7 +27,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<BaseIntermediateOutputPath>..\build\obj\firewall-utility\Debug\</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath>..\build\obj\firewall-utility\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -36,7 +37,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<BaseIntermediateOutputPath>..\build\obj\firewall-utility\Release\</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath>..\build\obj\firewall-utility\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
Expand Down Expand Up @@ -69,7 +70,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_BuildVersioningStyle="None.None.None.Increment" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
<UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.None.Increment" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand All @@ -79,4 +80,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
2 changes: 1 addition & 1 deletion plugin/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions plugin/app.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Loading

0 comments on commit aba03e9

Please sign in to comment.