C# ClickOnce静默安装程序不';无法识别通过NuGet包引用的库
我在Visual Studio 2015下设置了C#winforms项目。在同一解决方案下,我还有3个不同的windows服务项目。 我使用Omu.valueinjector将参数自动映射到类 我已经添加了一个安装程序项目,它基本上是在内部使用Click Once,并将所有依赖项添加到其中 我还使用MVP模式实现了该项目的UI安装。 和单独的类来处理静默安装程序。请参见下面的代码示例 早些时候,当我运行静默安装程序时,我遇到了与NLog dll相关的错误,因此我通过nuget packager解决了这个问题,并将此dll包含在project=>properties=>Application Files下。。。 但现在在修复NLog库之后,我得到Omu.valueinjector dll的文件未找到错误(文件未找到排序错误) 我确实遵循了与NLog类似的步骤,但运气不佳 下面是program.cs文件下的代码C# ClickOnce静默安装程序不';无法识别通过NuGet包引用的库,c#,visual-studio,clickonce,silent-installer,valueinjecter,C#,Visual Studio,Clickonce,Silent Installer,Valueinjecter,我在Visual Studio 2015下设置了C#winforms项目。在同一解决方案下,我还有3个不同的windows服务项目。 我使用Omu.valueinjector将参数自动映射到类 我已经添加了一个安装程序项目,它基本上是在内部使用Click Once,并将所有依赖项添加到其中 我还使用MVP模式实现了该项目的UI安装。 和单独的类来处理静默安装程序。请参见下面的代码示例 早些时候,当我运行静默安装程序时,我遇到了与NLog dll相关的错误,因此我通过nuget packager解
[STAThread]
public static void Main(string[] args)
{
if(args == null || args.Length <=0){
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Installer(args) { IsSilentInstall = false });
}
else
new SilentInstaller(args) { IsSilentInstall = true; };
}
[STAThread]
公共静态void Main(字符串[]args)
{
如果(args==null | | args.Length
public class SilentInstaller
{
public SilentInstaller(string[] args)
{
var run = OnOpen;
if (run != null) run(args);
//run?.Invoke(args);
var install = OnInstall;
install?.Invoke();
var close = OnClose;
close?.Invoke();
}
public event Action<string[]> OnOpen;
public event Action OnInstall;
public event Action OnClose;
}