Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vstnet publish fails when trying to use unexisting path #44

Closed
LeonarddeR opened this issue Oct 21, 2020 · 8 comments
Closed

vstnet publish fails when trying to use unexisting path #44

LeonarddeR opened this issue Oct 21, 2020 · 8 comments

Comments

@LeonarddeR
Copy link

Describe the bug
When I compile my project, I get the following error in the output:

1>Command `vstnet publish D:\Development\GIT\BlueMidday\LeonarddeR.BlueMidday\bin\x64\Debug\netcoreapp3.1\LeonarddeR.BlueMidday.dll -o D:\Development\GIT\BlueMidday\LeonarddeR.BlueMidday\bin\x64\Debug\netcoreapp3.1\deploy` encountered an error.
1>System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\LeonarddeRuijter\.nuget\packages\Microsoft.NETCore.Platforms\3.0.0\lib\netcoreapp3.1\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)

To Reproduce
Steps to reproduce the behavior:

  1. Create a project with several additional external dependencies:
  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.8" />
    <PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
    <PackageReference Include="VST.NET2-Plugin" Version="2.0.0-rc3" />
  </ItemGroup>

Expected behavior
vstnet publish completes

**Des

@LeonarddeR
Copy link
Author

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.

@obiwanjacobi
Copy link
Owner

obiwanjacobi commented Oct 22, 2020

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.

@obiwanjacobi
Copy link
Owner

Since the official release (2.0.0) it has been migrated to .net5.0.

@fgoulet
Copy link

fgoulet commented Dec 30, 2020

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)

@obiwanjacobi obiwanjacobi reopened this Dec 31, 2020
@dodinhhoanganh
Copy link

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!

@fgoulet
Copy link

fgoulet commented Mar 7, 2021

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)

@obiwanjacobi
Copy link
Owner

VST.NET v2.02 should fix this.
Let me know if there are any problems.

@fgoulet
Copy link

fgoulet commented Mar 8, 2021

No more error, a nice warning instead.
EXEC : warning : No library files (*.dll) could be found for: Microsoft.NETCore.Platforms/3.1.0!
Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants