Closed LeonarddeR closed 3 years ago
I actually found in the code that netcoreapp3.1
is hardcoded, which clarifies my issue.
I wonder, could this be solved by using dotnet publish instead? That should gather all the dependencies just fine, and then vstnet publish could do the renaming part.
The problem is that the Interop projects do not play nice with dotnet publish. The vstnet cli is a band aid to fix that. If the C++/CLI projects targeting .NET core (or .NET 5.0) start behaving as expected, I think vstnet cli can be removed.
For now VST.NET is fixed to netcoreapp3.1
.
Since the official release (2.0.0) it has been migrated to .net5.0
.
I have this problem also, in a project referencing VST.NET2-Host package version 2.0.1. It's a WinUI 3 project targeting net5.0-windows10.0.18362.0
Copying dependencies to: C:\Users\frede\source\repos\FluentMusic\FluentMusicWinUI\FluentMusicWinUI\bin\x64\Debug\net5.0-windows10.0.18362.0\deploy
1>Command `vstnet publish C:\Users\frede\source\repos\FluentMusic\FluentMusicWinUI\FluentMusicWinUI\bin\x64\Debug\net5.0-windows10.0.18362.0\FluentMusicWinUI.dll -o C:\Users\frede\source\repos\FluentMusic\FluentMusicWinUI\FluentMusicWinUI\bin\x64\Debug\net5.0-windows10.0.18362.0\deploy` encountered an error.
1>System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\frede\.nuget\packages\Microsoft.NETCore.Platforms\3.1.0\lib\net5.0\x64'.
1> at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
1> at System.IO.Enumeration.FileSystemEnumerator`1.Init()
1> at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
1> at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
1> at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
1> at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
1> at Jacobi.Vst.CLI.FindFiles.GetFilePaths(TargetName targetName)
1> at Jacobi.Vst.CLI.PublishCommand.CopyDependencies(String depsFile, ProcessorArchitecture processorArchitecture)
1> at Jacobi.Vst.CLI.PublishCommand.Execute()
1> at Jacobi.Vst.CLI.Program.Main(String[] args)
I have this problem also, in a project referencing VST.NET2-Host package version 2.0.1. It's a WinUI 3 project targeting net5.0-windows10.0.18362.0
Copying dependencies to: C:\Users\frede\source\repos\FluentMusic\FluentMusicWinUI\FluentMusicWinUI\bin\x64\Debug\net5.0-windows10.0.18362.0\deploy 1>Command `vstnet publish C:\Users\frede\source\repos\FluentMusic\FluentMusicWinUI\FluentMusicWinUI\bin\x64\Debug\net5.0-windows10.0.18362.0\FluentMusicWinUI.dll -o C:\Users\frede\source\repos\FluentMusic\FluentMusicWinUI\FluentMusicWinUI\bin\x64\Debug\net5.0-windows10.0.18362.0\deploy` encountered an error. 1>System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\frede\.nuget\packages\Microsoft.NETCore.Platforms\3.1.0\lib\net5.0\x64'. 1> at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) 1> at System.IO.Enumeration.FileSystemEnumerator`1.Init() 1> at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options) 1> at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) 1> at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options) 1> at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) 1> at Jacobi.Vst.CLI.FindFiles.GetFilePaths(TargetName targetName) 1> at Jacobi.Vst.CLI.PublishCommand.CopyDependencies(String depsFile, ProcessorArchitecture processorArchitecture) 1> at Jacobi.Vst.CLI.PublishCommand.Execute() 1> at Jacobi.Vst.CLI.Program.Main(String[] args)
Did you update .Net 5 correctly for your project or you just start new .Net 5 project with VST.Net 2? For me after upgrade project to .Net 5 and replace VST.Net 1 by VST.Net 2 it working perfectly!
I have created a new project that target net5.0-windows and that use wpf, added VST.NET2-Host package and the build works as expected.
Then, I added the package NAudio version 2.0.0 and the error arise.
The problem seems to be related with the use of the NAudio package that somehow interfere with the vstnet publish command.
Copying dependencies to: C:\Users\frede\source\repos\TestVstWpfApp\TestVstWpfApp\bin\x64\Debug\net5.0-windows\deploy
1>Command `vstnet publish C:\Users\frede\source\repos\TestVstWpfApp\TestVstWpfApp\bin\x64\Debug\net5.0-windows\TestVstWpfApp.dll -o C:\Users\frede\source\repos\TestVstWpfApp\TestVstWpfApp\bin\x64\Debug\net5.0-windows\deploy` encountered an error.
1>System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\frede\.nuget\packages\Microsoft.NETCore.Platforms\3.1.0\lib\net5.0\x64'.
1> at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
1> at System.IO.Enumeration.FileSystemEnumerator`1.Init()
1> at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
1> at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
1> at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
1> at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
1> at Jacobi.Vst.CLI.FindFiles.GetFilePaths(TargetName targetName)
1> at Jacobi.Vst.CLI.PublishCommand.CopyDependencies(String depsFile, ProcessorArchitecture processorArchitecture)
1> at Jacobi.Vst.CLI.PublishCommand.Execute()
1> at Jacobi.Vst.CLI.Program.Main(String[] args)
VST.NET v2.02 should fix this. Let me know if there are any problems.
No more error, a nice warning instead. EXEC : warning : No library files (*.dll) could be found for: Microsoft.NETCore.Platforms/3.1.0! Thanks !
Describe the bug When I compile my project, I get the following error in the output:
To Reproduce Steps to reproduce the behavior:
Expected behavior vstnet publish completes
**Des