I recently started to develop a WPF project with Visual Studio 2019. (I'm new in the WPF world)
My solution has the next projects:
MyProject.App (net5.0-windows10.0.18362.0 .exe)
Dependencies:
- Microsoft.Extensions.Hosting
- Microsoft.NetCore.App
- Microsoft.WIndows.SDK.NET.Ref
- Microsoft.Windows.Desktop.App.WPF
- Newtonsoft.Json
- ModernWpfUI (ModernWpf)
- MyProject.Domain
- MyProject.Data
- MyProject.Services
MyProject.Domain (netstandard2.1 .dll)
Dependencies:
MyProject.Data (netstandard2.1 .dll)
Dependencies:
- NetStandard.Library
- Dapper (Dapper)
MyProject.Services (netstandard2.1 .dll)
Dependencies:
- NetStandard.Library
- MyProject.Domain
MyProject.Data
When I try to publish the .App project using ClickOnce, I'm getting the next error:
Publish has encountered an error.
Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details.
And the output says:
2>Metadata file 'F:\Projectes\X3\MyProject\MyProject.Data\bin\Release\net5.0-windows10.0.18362.0\MyProject.Data.dll' could not be found
2>Metadata file 'F:\Projectes\X3\MyProject\MyProject.Domain\bin\Release\net5.0-windows10.0.18362.0\MyProject.Domain.dll' could not be found
2>Metadata file 'F:\Projectes\X3\MyProject\MyProject.Services\bin\Release\net5.0-windows10.0.18362.0\MyProject.Services.dll' could not be found
It seems it is looking for my library projects at: \net5.0-windows10.0.18362.0
directory, but in fact they are generated at: \netstandard2.1
folder.
How can I solve it?