问题: OpenSSL无法在我的Windows环境中运行.OpenSSL重复报告错误0x02001003,0x2006D080和0x0E064002.
环境:
Windows NT x 6.1 build 7601 (Windows 7 Business Edition Service Pack 1) i586
Apache/2.4.4 (Win32)
PHP/5.4.13 x86
PHP Directory: E:\wamp\php\
Virtual Host Directory: E:\Projects\1\public_html
Run Code Online (Sandbox Code Playgroud)
我尝试过的:
extension=php_openssl.dllE:\wamp\php\extras\openssl.cnfE:\wamp\phpconfigargs<Directory E:\wamp\php\extras>在apache配置中指定openssl.cnf到virtualhost public_html,指向并仍然得到相同的错误码:
$privateKey = openssl_pkey_new();
while($message = openssl_error_string()){
echo $message.'<br />'.PHP_EOL;
}
Run Code Online (Sandbox Code Playgroud)
结果:
error:02001003:system library:fopen:No such …Run Code Online (Sandbox Code Playgroud) 使用Visual Studio 2012,WiX 3.7,当我尝试在自定义UI中执行自定义操作以验证产品密钥输入时,安装程序只会转到"安装向导提前结束"对话框并强制您退出(没有错误)抛出的消息)无论输入什么产品密钥输入.
我关注的指南是http://www.schiffhauer.com/downloads/WiX-Walkthrough.pdf
我在启用了日志的情况下运行了.msi,但我仍然没有看到错误.我在下面列出了我认为的所有相关信息,如果你想要更多,请告诉我.我不确定如何在Visual Studio中调试它,我能够通过http://www.davidmoore.info/2010/06/28/how-to-debug-a-windows-installer-custom-action/让调试工作,但即使设置断点VS只是说System.Diagnostics.Debugger.Launch();在CustomAction中似乎没有做任何事情.msiexec.exe has triggered a breakpoint和Source Not Available.
UI.wxs:
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next">
<!-- ValidateProductID using CustomAction 'LicenseCheckAction' -->
<Publish Event="DoAction" Value="LicenseCheckAction">1</Publish>
<Publish Event="SpawnDialog" Value="InvalidPidDlg">PIDACCEPTED = "0"</Publish>
<Publish Event="NewDialog" Value="InstallDirDlg">PIDACCEPTED = "1"</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
Run Code Online (Sandbox Code Playgroud)
Product.wxs:
<Binary Id="LicenseCheckDLL" SourceFile="..\LicenseCheck\bin\$(var.MyProj.Configuration)\LicenseCheck.CA.dll" />
<CustomAction Id="LicenseCheckAction" BinaryKey="LicenseCheckDLL" DllEntry="LicenseCheck" …Run Code Online (Sandbox Code Playgroud) 我正在尝试实现自动版本控制,这样当我构建我的Bootstrapper时,MyApp和Bootstrapper版本都会自动递增和同步.否则,对于具有匹配版本的每次安装尝试,您最终会在添加/删除程序中使用重复的引导条目.
当我构建引导程序时,AfterBuild目标用于GetAssemblyIdentity成功获取自动生成的MyApp版本,并且引导程序输出文件使用递增的版本号正确命名,例如MyApp.1.0.5123.1352.exe
但是,当我安装这个Bootstrapper时,添加/删除程序中显示的版本总是如此1.0.0.0.
我已尝试在Bootstrapper Bundle Version字段中使用绑定,但我无法读取MyApp版本.
使用!(bind.packageVersion.MyApp)结果永远不会增加1.0.0.0.在构建错误中
使用!(bind.assemblyName.MyApp)结果(未解析的绑定时变量).在构建错误中
使用!(bind.FileVersion.filAAF013CA9B89B07C81031AE69884BF11)结果(未解析的绑定时变量).< - 有意义,因为Setup项目中存在FileID ,这就是Bootstrapper项目.
我该怎么做才能让我的Bootstrapper Bundle与它所包装的MyApp具有相同的版本?
===== MyApp的\ AssemblyInfo.cs中=====
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.*")]
Run Code Online (Sandbox Code Playgroud)
===== Setup.wixproj =====
<Target Name="BeforeBuild">
<PropertyGroup>
<LinkerBaseInputPaths>..\MyApp\bin\$(Configuration)\</LinkerBaseInputPaths>
</PropertyGroup>
<HeatDirectory OutputFile="MyApp_Files.wxs" Directory="..\MyApp\bin\$(Configuration)\" DirectoryRefId="INSTALLLOCATION" ComponentGroupName="MyApp_Project" SuppressCom="true" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" AutoGenerateGuids="false" GenerateGuidsNow="true" ToolPath="$(WixToolPath)" Condition="'%(ProjectReference.PackageThisProject)'=='True'" />
</Target>
Run Code Online (Sandbox Code Playgroud)
===== Bootstrapper.wixproj =====
<Target Name="AfterBuild">
<GetAssemblyIdentity AssemblyFiles="..\MyApp\bin\$(Configuration)\MyApp.exe">
<Output TaskParameter="Assemblies" ItemName="AssemblyVersion" />
</GetAssemblyIdentity>
<Copy SourceFiles=".\bin\$(Configuration)\$(OutputName).exe" DestinationFiles=".\bin\$(Configuration)\MyApp.%(AssemblyVersion.Version).exe" />
<Delete Files=".\bin\$(Configuration)\$(OutputName).exe" />
</Target>
Run Code Online (Sandbox Code Playgroud)
=====引导程序\ …
这个问题的第一个答案:当bit mask(flags)枚举变得太大时该怎么办正是我想要做的,只是我不知道如何使用LINQ to SQL将它存储在数据库中并将其绑定用户无需为每个事物/逻辑组创建2个表.
这最好通过代码解释(这些是LinqPad友好但不完整):
// Requirements:
// 1) Using LINQ to SQL
// 2) Track User's CRUD rights in different parts of an application (parts referred to below as 'Things')
// For example: ThingA.Create, ThingB.Read, ThingB.Update, ThingC.Delete
// Desired usage: if (User.IsAllowed(ThingA.Create)) { // allowed } else { // not allowed }
// 3) Allow for more than 64 'Things'
// 4) Do not want to refer to permissions using strings like User.IsAllowed("Create ThingA");
// …Run Code Online (Sandbox Code Playgroud) 在开始创建自己的自定义托管引导程序应用程序之前,我正在使用下面的现有Fragment,没有任何问题,即,如果未找到本地文件,它将从Internet下载.msi。现在,当我尝试执行MBA时,我在日志文件中收到以下错误。
[环境]
WiX 3.7,Visual Studio 2012,x64
[Bundle.wxs]
<PackageGroupRef Id="ReportViewer"/>
[Fragment.wxs]
<PackageGroup Id="ReportViewer">
<MsiPackage DisplayName="Microsoft Report Viewer 2012 Runtime"
Cache="no" Compressed="no" ForcePerMachine="yes" Permanent="yes" Vital="yes"
SourceFile="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\ReportViewer\ReportViewer.msi"
DownloadUrl="http://go.microsoft.com/fwlink/?LinkID=217022"
InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0)"/>
</PackageGroup>
Run Code Online (Sandbox Code Playgroud)
[日志]
[14:42] i101:检测到程序包:ReportViewer.msi,状态:不存在,已缓存:无
[14:54] i201:计划的软件包:ReportViewer.msi,状态:不存在,默认请求:存在,ba请求:存在,执行:安装,回滚:无,缓存:是,取消缓存:是,依赖项:注册
[15:00] w343:提示输入软件包的来源:ReportViewer.msi,有效负载:ReportViewer.msi,路径:E:\ ReportViewer.msi
[15:00] e054:无法解析文件源:E:\ ReportViewer。 msi,错误:0x80070002。
[15:00] e000:错误0x80070002:提示输入源时失败(原始路径'E:\ ReportViewer.msi')。
[15:00] e313:无法获取有效负载:ReportViewer.msi到工作路径:C:\ Users \ POS1User \ AppData \ Local \ Temp {416b9117-e1b4-4518-b13d-eb5416da8794} \ ReportViewer.msi,错误:0x80070002 。