Closed worldofsites closed 3 years ago
@richlander where do issues like these go?
I have similar issue. My app is packed into Windows Installer (WiX toolset). After migration to .NET 5, installer fails to start an app. EventViewer entry:
Description: A .NET application failed.
Application: *******.exe
Path: C:\Program Files\*******\*******\*******.exe
Message: Error:
An assembly specified in the application dependencies manifest (*******.deps.json) was not found:
package: 'runtimepack.Microsoft.NETCore.App.Runtime.win-x64', version: '5.0.0'
path: 'createdump.exe'
[2020-11-13 update] Issue resolved.
Details: WiX toolset project has a custom filter that excludes appsettings*
and *.exe
files from publish directory except the main app executable.
.NET 5 includes a new tool createdump.exe
(Microsoft .NET Runtime Crash Dump Generator) on publish.
After I whitelisted createdump.exe - an app is properly installed and launched.
@NikolaMilosavljevic - do you know where this should go?
@NikolaMilosavljevic - do you know where this should go?
It seems that this is not ClickOnce specific - I'd suggest dotnet/runtime to start.
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
@worldofsites -- does this only happen when you deploy with ClickOnce?
@richlander yes, only when deploy with ClickOnce. Also, I see these errors not only when I'm using Microsoft.PowerShell libraries. For example, when I have System.Data.SqlClient dependency I see the following error in Windows Application Event Log:
Message: Error:
An assembly specified in the application dependencies manifest (Dummy.deps.json) was not found:
package: 'runtime.win-x64.runtime.native.System.Data.SqlClient.sni', version: '4.4.0'
path: 'runtimes/win-x64/native/sni.dll'
Microsoft.Data.SqlClient:
Message: Error:
An assembly specified in the application dependencies manifest (Dummy.deps.json) was not found:
package: 'Microsoft.Data.SqlClient.SNI.runtime', version: '2.0.1'
path: 'runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.dll'
Is the app published as framework-dependent of self-contained? Also, do you publish in terms of a runtime (like -r win-x64
)?
@richlander
We've do some tests:
1) Framework-dependent (win-x86/win-x64/Portable)
ClickOnce publish success, install app success, trying to run app - same error:
path: 'runtimes/win-x86/native/Microsoft.Data.SqlClient.SNI.dll'
path: 'runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.dll'
path: 'runtimes/win/lib/netcoreapp3.1/Microsoft.Data.SqlClient.dll'
2) Self-Contained (win-x86/win-x64)
ClickOnce publish success, install app success, trying to run app - same error:
path: 'runtimes/win-x86/native/Microsoft.Data.SqlClient.SNI.dll'
path: 'runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.dll'
3) Framework-dependent (singlefile + win-x86/singlefile + win-x64) Works! 4) Self-Contained (singlefile + win-x86/singlefile + win-x64) Error on publish:
The "GenerateBundle" task failed unexpectedly.
System.ArgumentException: Invalid input specification: Found multiple entries with the same BundleRelativePath
at Microsoft.NET.HostModel.Bundle.Bundler.GenerateBundle(IReadOnlyList`1 fileSpecs)
at Microsoft.NET.Build.Tasks.GenerateBundle.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
Tagging subscribers to this area: @vitek-karas, @agocke
See info in area-owners.md if you want to be subscribed.
Description: |
Entry in the Windows Application Event Log after app start:
```
An assembly specified in the application dependencies manifest (TestApp.deps.json) was not found:
package: 'System.ServiceModel.Primitives', version: '4.7.0'
path: 'lib/netcoreapp2.1/System.ServiceModel.dll'
```
What in TestApp.deps.json:
```
"System.ServiceModel.Primitives/4.7.0": {
"dependencies": {
"System.Private.ServiceModel": "4.7.0"
},
"runtime": {
"lib/netcoreapp2.1/System.ServiceModel.Primitives.dll": {
"assemblyVersion": "4.7.0.0",
"fileVersion": "4.700.19.56502"
},
"lib/netcoreapp2.1/System.ServiceModel.dll": {
"assemblyVersion": "4.0.0.0",
"fileVersion": "4.700.19.56502"
}
}
},
```
Related dependencies:
```
|
---|---|
Author: | worldofsites |
Assignees: | - |
Labels: | `area-Host`, `untriaged` |
Milestone: | - |
The missing assembly is being installed by ClickOnce but, it is in the same folder as the application. As was pointed out already, it does not match the relative path that is in the dependencies manifest (*.deps.json).
We have a Visual Studio issue tracking this issue: https://developercommunity2.visualstudio.com/t/A-NET-Core-31-or-NET-50-application-/1248873
The GenerateBundle build issue when Self-Contained Single File is selected, is being tracked here: https://developercommunity2.visualstudio.com/t/The-GenerateBundle-task-failed-unexpec/1257409
I experimented with ClickOnce and .NET 5 this weekend. I can confirm @worldofsites said on Nov 12th, if native dependencies are involved, single file apps that are framework dependent is the only thing that works. I attempted to publish MSBuildStructuredLog as ClickOnce to GitHub pages. It is using Aavalonia libraries which depend on native libraries. I reproduced the issue by create a new project with dotnet new avalonia.app -o AvaloniaApp1
, updating the dependencies to latest, removing unused imports, and then trying ClickOnce.
Thanks @ctaggart for taking the time to provide us with this feedback.
We're tracking this issue also as part of this Visual Studio issue: https://developercommunity2.visualstudio.com/t/A-NET-Core-31-or-NET-50-application-/1248873.
@John-Hart https://developercommunity2.visualstudio.com/t/A-NET-Core-31-or-NET-50-application-/1248873 has been closed. Does it mean we can close this one as well?
Closing, as this is a ClickOnce issue and the runtime is behaving as designed.
Entry in the Windows Application Event Log after app start:
What in TestApp.deps.json:
Related dependencies: