Skip to content

Commit a251b03

Browse files
committed
Revert "Fix NPlug.Proxy when used from NuGet"
This reverts commit ba4daf0.
1 parent 0988501 commit a251b03

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
lines changed

.github/workflows/ci-publish_nplug_proxy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
- name: Build
2525
shell: bash
2626
run: |
27-
dotnet build -c Release ./src/NPlug.Proxy/NPlug.Proxy.csproj
27+
dotnet build -c Release ./src/NPlug.Proxy/NPlug.Proxy.msbuildproj
2828
2929
- name: Package
3030
shell: bash
3131
run: |
32-
dotnet pack -c Release ./src/NPlug.Proxy/NPlug.Proxy.csproj -p:IsPackable=true
32+
dotnet pack -c Release ./src/NPlug.Proxy/NPlug.Proxy.msbuildproj -p:IsPackable=true
3333
3434
- name: Publish
3535
shell: bash

src/NPlug.Proxy/NPlug.Proxy.csproj src/NPlug.Proxy/NPlug.Proxy.msbuildproj

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.Build.NoTargets/3.7.0">
22
<PropertyGroup>
3-
<OutputType>Library</OutputType>
43
<TargetFramework>net7.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
74
<IsPackable Condition="'$(IsPackable)' == ''">false</IsPackable>
8-
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
9-
<Version>1.1.0</Version>
5+
<Version>1.0.0</Version>
106
</PropertyGroup>
117

128
<PropertyGroup>

src/NPlug.Proxy/AudioPluginProxy.cs src/NPlug.Proxy/build/AudioPluginProxy.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace NPlug.Proxy;
1010

11-
public sealed class AudioPluginProxy : IDisposable
11+
internal sealed class AudioPluginProxy : IDisposable
1212
{
1313
private readonly IntPtr _nativeProxyHandle;
1414
private readonly bool _ownHandle;
@@ -126,7 +126,7 @@ public void Dispose()
126126
NativeLibrary.Free(_nativeProxyHandle);
127127
}
128128
}
129-
129+
130130
private IntPtr InternalGetFactory()
131131
{
132132
return _nativeFactory?.Invoke() ?? IntPtr.Zero;

src/NPlug.Proxy/build/NPlug.Proxy.targets

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
<NPlugProxyLibraryFile Condition="'$(NPlugProxyLibraryFile)' == ''">$(MSBuildThisFileDirectory)$(NPlugRuntimeIdentifier)\native\$(NPlugProxyLibraryLink)</NPlugProxyLibraryFile>
2727
</PropertyGroup>
2828

29+
<ItemGroup>
30+
<Compile Condition="'$(NPlugAudioPluginProxy)' == 'true'" Include="$(MSBuildThisFileDirectory)AudioPluginProxy.cs">
31+
<Visible>false</Visible>
32+
</Compile>
33+
</ItemGroup>
34+
2935
<Target Name="VerifyNPlug" BeforeTargets="Build">
3036
<Error Condition="'$(NPlugVstArch)' == ''" Text="The .NET Platform RID `$(NPlugRuntimeIdentifier)` is not supported by NPlug."></Error>
3137
<Message Importance="high" Text="NPlugRuntimeIdentifier: $(NPlugRuntimeIdentifier)"/>

src/NPlug.Validator/NPlug.Validator.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</ItemGroup>
3434

3535
<ItemGroup>
36-
<ProjectReference Include="..\NPlug.Proxy\NPlug.Proxy.csproj" />
36+
<ProjectReference Include="..\NPlug.Proxy\NPlug.Proxy.msbuildproj" />
3737
</ItemGroup>
3838

3939
<Import Project="$(MSBuildThisFileDirectory)../NPlug.Proxy/build/NPlug.Proxy.targets" />

src/NPlug.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{16297621
4646
EndProject
4747
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NPlug.SimpleProgramChange", "..\samples\NPlug.SimpleProgramChange\NPlug.SimpleProgramChange.csproj", "{B29DFB8F-EECE-4418-955D-E629C9C2B8C2}"
4848
EndProject
49-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NPlug.Proxy", "NPlug.Proxy\NPlug.Proxy.csproj", "{103E615E-DDA9-4EA0-A3CB-318BFC3D844A}"
49+
Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "NPlug.Proxy", "NPlug.Proxy\NPlug.Proxy.msbuildproj", "{103E615E-DDA9-4EA0-A3CB-318BFC3D844A}"
5050
EndProject
5151
Global
5252
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/NPlug/NPlug.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@
6262
</ItemGroup>
6363

6464
<ItemGroup>
65-
<ProjectReference Include="..\NPlug.Proxy\NPlug.Proxy.csproj" />
65+
<ProjectReference Include="..\NPlug.Proxy\NPlug.Proxy.msbuildproj" />
6666
</ItemGroup>
6767
</Project>

0 commit comments

Comments
 (0)