-
Notifications
You must be signed in to change notification settings - Fork 28
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
How to account for satellite dll's when using ClickOnce #116
Comments
LocateNativeDllDirectory does not account for apps delivered via ClickOnce, so this will have to be added somehow in the current logic of finding the satellite dll's. |
I tried really hard to reproduce this on a .NET 6 WinForms project in VS 2022 but ClickOnce works without any issues because it seems to check whether <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<NativeLibraries Include="$(MSBuildThisFileDirectory)**\*.dll" />
- <None Include="@(NativeLibraries)">
+ <Content Include="@(NativeLibraries)">
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
+ </Content>
</ItemGroup>
</Project> |
Fix #116 ClickOnce not including satellite DLLs in the output
My code is broken.
Am I the only one having problems with distribution by ClickOnce?
The EXE placed in the following path by ClickOnce,
C:\Users\USER\AppData\Local\Apps\2.0\2PAQMWD4.WKX\XZLEEH47.GTR\winf..tion_0000000000000000_0001.0000_5b14ef23fb2e66b5\WinFormsApp2.exe
Not reference DLL in the following path:
C:\Users\USER\AppData\Local\Apps\2.0\2PAQMWD4.WKX\XZLEEH47.GTR\winf..tion_0000000000000000_0001.0000_5b14ef23fb2e66b5\x64\Scintilla.dll and Lexilla.dll
Instead, it tries to reference the following DLLs, which results in an error:
C:\Users\USER\AppData\Local\Apps\2.0\2PAQMWD4.WKX\build\x64
( Why build\x64 ? )
.NET 6 Forms Application, publish through ClickOnce.
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for 'ScintillaNET.Scintilla' threw an exception.
---> System.InvalidOperationException: Unable to locate the Scintilla.NET satellite assemblies : directory 'C:\Users\USER\AppData\Local\Apps\2.0\2PAQMWD4.WKX\build\x64' not found
at ScintillaNET.Scintilla.LocateNativeDllDirectory()
at ScintillaNET.Scintilla..cctor()
--- End of inner exception stack trace ---
at ScintillaNET.Scintilla..ctor()
at WinFormsApp2.Form1.InitializeComponent()
at WinFormsApp2.Form1..ctor()
at WinFormsApp2.Program.Main()
It is not possible to have dlls added manually as content.
I thought these problems could be fixed by modifying the targets file in
C:\Users\USER\ .nuget\packages\scintilla5.net\5.3.3.18\build\ , but the code was incorrect.
The text was updated successfully, but these errors were encountered: