我有一个 Wix 安装程序项目,需要运行msbuild
以生成 .dll 文件和可执行文件,我目前在我的项目中拥有它,如下所示:
<Target Name="BeforeBuild">
<!-- Publish dotnet core app -->
<Exec Command="msbuild /p:configuration=release ..\Regulator2App.WPF\Regulator2App.WPF.csproj" />
...
</Target>
当我构建安装程序项目时,我收到以下错误:
The attribute "Version" in element <PackageReference> is unrecognized. Regulator2App.Installer C:\Users\Iván\Desktop\regulator2app\Regulator2App\Regulator2App\Regulator2App.csproj
指向这一行:
<ItemGroup>
<PackageReference Include="GuerrillaNtp" Version="1.4.1" />
...
</ItemGroup>
然后命令以代码 1 退出。
如何将 msbuild 命令添加到我的安装程序?需要添加/更改什么?
我的设置与本教程完全相同。