gpt4 book ai didi

c# - 未能发布 : could not find required file 'setup.bin'

转载 作者:行者123 更新时间:2023-11-29 01:05:44 25 4
gpt4 key购买 nike

<分区>

我有一个测试 MySQL 连接性的示例控制台应用程序。代码如下。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data;
using MySql.Data.MySqlClient;

namespace MySQLConnection
{
class Program
{
static void Main(string[] args)
{
string connStr = "server=localhost;user=root;database=world;port=3306;password=Password;";
using (MySqlConnection conn = new MySqlConnection(connStr))
{
conn.Open();

string sql = "SELECT COUNT(*) FROM Country";
MySqlCommand cmd = new MySqlCommand(sql, conn);
object result = cmd.ExecuteScalar();

if (result != null)
{
int r = Convert.ToInt32(result);
Console.WriteLine("Number of countries in the World database is: " + r);
}
}
Console.ReadLine();
}
}
}

代码运行良好。但是,当我尝试发布该项目时,出现错误,如下图所示。

error description

我正在使用针对 .NET 4 的 VS2012 Update 3。有什么想法吗?

谢谢。

更新:

使用这个答案:Could not find required file 'setup.bin'我能够发布该应用程序。

我的情况是这样

  1. HKLM\Software\Microsoft\GenericBootstrapper\11.0\Path 存在。
  2. HKLM\Software\Wow6432Node\Microsoft\GenericBootstrapper\11.0\Path 存在并指向 C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\

从那个目录,我将 Engine 目录复制到我的应用程序目录,然后就可以发布该应用程序了。希望不需要每次都这样做。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com