熬了那麽久 我们终於可以来首刻了….
我们先创出一个是至少能加入的WPF视窗的类别库
可以直接选-自订控制项程序库
建立好专案後,我们依序建立Models Views ViewModels 的资料夹
接下来九成可以参考stoneniqiu写的文章,
毕竟当初我也是跟着走就建立起来了!
↓↓↓↓↓↓↓↓ 请连过去 ↓↓↓↓↓↓↓↓↓↓
https://www.cnblogs.com/stoneniqiu/p/4399343.html
程序码的部分就大同小异了,尊重原创我就不复制贴上程序码了,
请连过去试过後再回来看接下来我改不一样的部分 。
而我没使用Prism,下面几点是不同的地方
这个assemblyName他命名这个专案时使用 CustomBA ,我们必须改成我们自己的名称
<host assemblyName="DemoUse.WPFView">
<supportedFramework version="v4\Full" />
<supportedFramework version="v4\Client" />
</host>
参考到不能再参考後,还会有两个错误
CustomBootstrapperApplication.Model.Engine.Plan(LaunchAction.Uninstall);
搜寻DIAView取代成DemoInstaller,如果你在这边有改名称就用你自己的
InstallCommand 先一律改成为true
InstallCommand = new RelayCommand(param => model.PlanAction(LaunchAction.Install), param => true);
复制到输出目录=> 一律复制,不然建置会出现错误
在引入完其他DLL後,要加入这个没讲到的,但有偷偷加的不然会出现错误
<WixVariable Id="WixMbaPrereqLicenseUrl" Value=""/>
<WixVariable Id="WixMbaPrereqPackageId" Value=""/>
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<Bundle Name="DemoUse.Bootstrapper" Version="1.0.0.0" Manufacturer="Demo" UpgradeCode="37bbfd2f-0889-4b32-90db-eea5cbea61ce" DisableModify="yes" DisableRemove="yes">
<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost" >
<Payload SourceFile="$(var.DemoUse.WPFView.TargetDir)DemoUse.WPFView.dll" />
<Payload SourceFile="$(var.DemoUse.WPFView.TargetDir)BootstrapperCore.config" />
</BootstrapperApplicationRef>
<WixVariable Id="WixMbaPrereqLicenseUrl" Value=""/>
<WixVariable Id="WixMbaPrereqPackageId" Value=""/>
<Chain>
<PackageGroupRef Id="AspNetCoreRuntime31Web"/>
<MsiPackage Id="DemoInstaller" SourceFile="$(var.DemoUse.Installer.TargetDir)DemoUse.Installer.msi"
Compressed="yes" DisplayInternalUI="yes" Visible="yes" />
</Chain>
将原本的安装包给影藏掉,DisplayInternalUI 改为no
最後应该都没问题後执行,
完成….
哈!就算我已经写过了,
真的还是得花很久时间去找相关问题….
但这还只是开始而已 哈哈!
Day22程序码
https://github.com/Aslan7826/defaultMVC/commits/Day22
2018年司法院新闻稿 有关司法院及所属网路遭网军攻击事宜,本院说明如下: 一、事实经过:107年3...
可以先把下面的范例载下来,并执行app.py: https://github.com/wilsons...
铁人赛的前20天,把常常混淆的那些观念重新理解过一遍之後,後面的10天打算来练习切版,希望透过实际练...
IF、CASE翻成中文就是「如果」,根据条件来决定要执行的事情, 在各个程序语法理面都会有类似的语法...
Hachicorp Consul: Server configuration for product...