我们拥有由Visual Studio和Wix的较早版本的versino创建的旧版应用程序。使用的最新版本是Visual Studio 2015。 使用VS2019之后,在还原软件包时我们开始遇到问题: 恢复NuGet软件包时发生错误:找不到项目Setup.wixproj
的MSBuildProjectExtensionsPath MSBuild属性。 WiX 3.11.4516.0的版本 版本的Visual Studio:Visual Studio 2019(16.3.6) WiX Toolset Visual Studio扩展1.0.0.4 这些项目使用.NET Framework 4.5.2
当我创建一个新的wixsetup项目时,我注意到布局是不同的。 我试图一一更改属性,以找出哪个是问题所在,但我从未设法摆脱错误
这是我的wixproj
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProductVersion>3.0</ProductVersion>
<ProjectGuid>{99f1ae14-c5d9-4153-b9be-d4e5d6da2a2c}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Setup</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<SccProjectName>SAK</SccProjectName>
<SccProvider>SAK</SccProvider>
<SccAuxPath>SAK</SccAuxPath>
<SccLocalPath>SAK</SccLocalPath>
<RunWixToolsOutOfProc>True</RunWixToolsOutOfProc>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>Debug</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<SuppressAllWarnings>False</SuppressAllWarnings>
<Pedantic>True</Pedantic>
</PropertyGroup>
<ItemGroup>
<Compile Include="UI_InstallDir.wxs" />
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WindowsService1\WindowsService1.csproj">
<Name>WindowsService1</Name>
<Project>{720823ef-c775-4112-a906-b079ea977513}</Project>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixNetFxExtension">
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
<Name>WixNetFxExtension</Name>
</WixExtension>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Folder Include="Images\" />
</ItemGroup>
<ItemGroup>
<Content Include="Images\Banner.bmp" />
<Content Include="Images\Dialog.bmp" />
<Content Include="project.json" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
</Project>
答案 0 :(得分:0)
尽管我不确定背后的机制,但我将通过发布我的回答来回答: 自MSBuild 15(Visual Studio 2017)以来,发生了一些重大变化,似乎Wix团队更新了其Wixproj模板格式以支持该格式:https://github.com/wixtoolset/issues/issues/5525 我只需要从新模板创建一个新项目(将项目移动到项目中)并进行构建。似乎可以解决问题。