runtime: .NET 5.0 application installed by ClickOnce may fail to start after being installed
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:
<ItemGroup>
<PackageReference Include="Microsoft.PowerShell.Commands.Diagnostics" Version="7.1.0" />
<PackageReference Include="Microsoft.PowerShell.Commands.Management" Version="7.1.0" />
<PackageReference Include="Microsoft.PowerShell.Commands.Utility" Version="7.1.0" />
<PackageReference Include="Microsoft.PowerShell.ConsoleHost" Version="7.1.0" />
<PackageReference Include="Microsoft.PowerShell.CoreCLR.Eventing" Version="7.1.0" />
<PackageReference Include="Microsoft.PowerShell.MarkdownRender" Version="7.1.0" />
<PackageReference Include="Microsoft.PowerShell.Native" Version="7.1.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.1.0" />
<PackageReference Include="Microsoft.PowerShell.Security" Version="7.1.0" />
<PackageReference Include="System.Management.Automation" Version="7.1.0" />
</ItemGroup>
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 15 (9 by maintainers)
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
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.
@richlander We’ve do some tests:
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'
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'
Framework-dependent (singlefile + win-x86/singlefile + win-x64) Works!
Self-Contained (singlefile + win-x86/singlefile + win-x64) Error on publish: