【发布时间】:2024-04-28 01:20:02
【问题描述】:
当我使用 visual studio 安装程序 设置 no 先决条件 并在 Windows 7 上进行测试时,我看到了这个错误
然后我添加这个先决条件:SQL Server 2012 Express LocalDB
并再次看到该错误。
我添加:SQL Server 2012 Express、SQL Server 2012 Express LocalDB、.NET Framework 4.5.2
当我构建它时,我看到了这个警告:
------ Starting pre-build validation for project 'PlayerList' ------
------ Pre-build validation for project 'PlayerList' completed ------
------ Build started: Project: PlayerList, Configuration: Debug ------
Building file 'C:\Users\ChiKo\documents\visual studio 2015\Projects\PlayerList\PlayerList\Debug\PlayerList.msi'...
WARNING: The value of the 'PublicKey' attribute in 'Microsoft .NET Framework 4.5.2 (x86 and x64)' does not match that of file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\DotNetFX452\NDP452-KB2901907-x86-x64-AllOS-ENU.exe'.
WARNING: The value of the 'PublicKey' attribute in 'SQL Server 2012 Express' does not match that of file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\SqlExpress2012\en\SQLEXPR32_x86_ENU.EXE'.
WARNING: The value of the 'PublicKey' attribute in 'SQL Server 2012 Express' does not match that of file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\SqlExpress2012\en\SQLEXPR_x64_ENU.EXE'.
Packaging file 'Icons.ico'...
Packaging file 'Db.mdf'...
Packaging file 'Db_log.ldf'...
Packaging file 'PlayerList.exe'...
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
我构建了设置,但在目标系统中不起作用。
我不知道设置我的应用需要哪些先决条件?
我有一个简单的 C# 应用,其中包含数据库(基于服务的数据库)(*.mdf )。
【问题讨论】:
-
你的错误告诉我 SQL Server Instance not installed
-
如果是你的设置失败了,那么你需要说明你到底在做什么。看起来您有一个尝试连接到 SQL 实例的自定义操作,但我猜。
-
我同意菲尔的观点。原始错误看起来好像您正在尝试连接到本地计算机上的特定实例,但实例名称不存在。您是否配置了 SQL Express 的安装以创建正确的实例名称而不是默认的 MSSQLSERVER?还要确保您的 SQL Server 实例正在服务中运行。
标签: c# installation setuptools setup-project