C# WinForm.NET 4的app.config用于私有部署SQL Server CE SP2
我的VisualStudio2010(C#)应用程序正在运行,整个星期我都在尝试使用安装项目部署它,但没有成功 我开始关注史蒂夫·拉斯克的博客。它让我修改了项目的C# WinForm.NET 4的app.config用于私有部署SQL Server CE SP2,c#,visual-studio-2010,installation,app-config,C#,Visual Studio 2010,Installation,App Config,我的VisualStudio2010(C#)应用程序正在运行,整个星期我都在尝试使用安装项目部署它,但没有成功 我开始关注史蒂夫·拉斯克的博客。它让我修改了项目的app.config文件,以包括以下内容: <system.data> <DbProviderFactories> <remove invariant="System.Data.SqlServerCe.3.5"></remove> <add nam
app.config
文件,以包括以下内容:
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.3.5"></remove>
<add name="Microsoft SQL Server Compact Data Provider"
invariant="System.Data.SqlServerCe.3.5"
description=".NET Framework Data Provider for Microsoft SQL Server Compact"
type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.50, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</DbProviderFactories>
</system.data>
因此,我现在使用的是一个未安装的安装程序
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="LastRun" value=""/>
<add key="UserName" value=""/>
</appSettings>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
</startup>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.3.5"></remove>
<add name="Microsoft SQL Server Compact Data Provider"
invariant="System.Data.SqlServerCe.3.5"
description=".NET Framework Data Provider for Microsoft SQL Server Compact"
type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.50, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
<bindingRedirect oldVersion="3.5.1.0-3.5.1.50" newVersion="3.5.1.50"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
我的app.config
文件是否已损坏
我的应用程序仍然运行正常,但是安装程序没有安装任何东西。对于更改的临时文件名,安装程序的错误始终为2727:
调试:错误2727:目录表中不存在目录项“_1083472CD2EB47548297E3336FCD9A58”
我该怎么办
是否有人成功地为私有实例部署了Microsoft SQL CE Server SP2?在名为“立即修复我的问题”的代码项目中找到了解决方案 基本上,看起来这一切都归结为VS安装程序没有创建文件夹或复制SSCE所需的文件。上面的链接详细介绍了如何做到这一点 我希望这能帮助别人
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="LastRun" value=""/>
<add key="UserName" value=""/>
</appSettings>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
</startup>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.3.5"></remove>
<add name="Microsoft SQL Server Compact Data Provider"
invariant="System.Data.SqlServerCe.3.5"
description=".NET Framework Data Provider for Microsoft SQL Server Compact"
type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.50, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
<bindingRedirect oldVersion="3.5.1.0-3.5.1.50" newVersion="3.5.1.50"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>