【发布时间】:2020-05-06 15:52:35
【问题描述】:
我在使用 ClickOnce 发布我的 .Net 应用程序时遇到问题。 我正在尝试使用以下方式发布应用程序:
C:\Windows\Microsoft.Net\Framework\v4.0.30319\MSBuild.exe /m /target:publish /property:Configuration=Release_REC2
当我“只是”编译应用程序时,一切正常,但是当我尝试使用上述命令发布它时,它会忽略解决方案项目之一 (ZedModule) 中的一些 dll。
这是 ZedModule.csproj 文件:
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5B091DB7-41A2-496B-8001-69DEA7297100}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Contacts14.ZedModule</RootNamespace>
<AssemblyName>Contacts14.ZedModule</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Geckofx-Core, Version=45.0.6.0, Culture=neutral, PublicKeyToken=3209ac31600d1857, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\GeckoFx\Geckofx-Core.dll</HintPath>
</Reference>
<Reference Include="Geckofx-Winforms, Version=45.0.6.0, Culture=neutral, PublicKeyToken=3209ac31600d1857, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\GeckoFx\Geckofx-Winforms.dll</HintPath>
</Reference>
<Reference Include="Genesyslab.Desktop.Infrastructure">
<HintPath>..\References\Genesyslab.Desktop.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Genesyslab.Desktop.Modules.Core, Version=8.5.135.5, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Genesyslab.Desktop.Modules.Core.dll</HintPath>
</Reference>
<Reference Include="Genesyslab.Desktop.Modules.Voice, Version=8.5.135.5, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Genesyslab.Desktop.Modules.Voice.dll</HintPath>
</Reference>
<Reference Include="Genesyslab.Desktop.Modules.Windows, Version=8.5.135.5, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Genesyslab.Desktop.Modules.Windows.dll</HintPath>
</Reference>
<Reference Include="Genesyslab.Desktop.WPFCommon, Version=8.5.135.5, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Genesyslab.Desktop.WPFCommon.dll</HintPath>
</Reference>
<Reference Include="Genesyslab.Enterprise.Model, Version=8.5.135.2, Culture=neutral, PublicKeyToken=95e512acdb150ec7, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Genesyslab.Enterprise.Model.dll</HintPath>
</Reference>
<Reference Include="Genesyslab.Platform.Commons.Collections, Version=9.0.3.2, Culture=neutral, PublicKeyToken=2248646200015f60, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Genesyslab.Platform.Commons.Collections.dll</HintPath>
</Reference>
<Reference Include="Genesyslab.Platform.Commons.Protocols, Version=9.0.3.2, Culture=neutral, PublicKeyToken=2248646200015f60, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Genesyslab.Platform.Commons.Protocols.dll</HintPath>
</Reference>
<Reference Include="Genesyslab.Platform.Voice.Protocols, Version=9.0.3.2, Culture=neutral, PublicKeyToken=2248646200015f60, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Genesyslab.Platform.Voice.Protocols.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<ItemGroup>
<Compile Include="Interfaces\IZedButtonView.cs" />
<Compile Include="Interfaces\IZedView.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\IZedService.cs" />
<Compile Include="Services\ZedRequest.cs" />
<Compile Include="Services\ZedResponse.cs" />
<Compile Include="Services\ZedService.cs" />
<Compile Include="Views\ZedButtonView.xaml.cs">
<DependentUpon>ZedButtonView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ZedMessageBox.xaml.cs">
<DependentUpon>ZedMessageBox.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ZedView.xaml.cs">
<DependentUpon>ZedView.xaml</DependentUpon>
</Compile>
<Compile Include="ZedCreationButton.xaml.cs">
<DependentUpon>ZedCreationButton.xaml</DependentUpon>
</Compile>
<Compile Include="ZedModule.cs" />
</ItemGroup>
<ItemGroup>
<None Include="omni.ja">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Page Include="Views\ZedButtonView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\ZedMessageBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ZedView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ZedCreationButton.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Resource Include="Images\ZedWhite.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Contacts14.Core\Contacts14.Core.csproj">
<Project>{AC8E6258-6988-40CF-9854-F6A9A3455F35}</Project>
<Name>Contacts14.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Contacts14.GEDModule\Contacts14.GEDModule.csproj">
<Project>{28402E94-9B02-41A6-B442-6D73838D6584}</Project>
<Name>Contacts14.GEDModule</Name>
</ProjectReference>
<ProjectReference Include="..\Contacts14.Models\Contacts14.Models.csproj">
<Project>{8316D803-569E-4E07-B1E0-5B20860EAA45}</Project>
<Name>Contacts14.Models</Name>
</ProjectReference>
<ProjectReference Include="..\Contacts14.Services\Contacts14.Services.csproj">
<Project>{72C75C60-FFDD-4505-8F18-CF02608568A0}</Project>
<Name>Contacts14.Services</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="AccessibleMarshal.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="breakpadinjector.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Contacts14.ZedModule.module-config">
<SubType>Designer</SubType>
</Content>
<Content Include="D3DCompiler_43.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="d3dcompiler_47.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="freebl3.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="icudt56.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="icuin56.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="icuuc56.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="lgpllibs.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libEGL.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libGLESv2.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="mozglue.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="msvcp120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="msvcr120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="nss3.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="nssckbi.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="nssdbm3.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugin-container.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugin-hang-ui.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="sandboxbroker.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="softokn3.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="xul.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
问题在于 ZedModule.dll.deploy 已正确复制到已发布文件夹中。但是所有的内容 dll:xul.dll、softokn3.dll 等……都不是
知道我在这里缺少什么吗?
我一直在使用这个命令,直到我创建了这个新的 ZedModule 项目后才遇到这个问题。
任何帮助将不胜感激。
提前致谢。
【问题讨论】: