jaklithn / SqlGenerator

Map input from Excel/text files to SQL Server tables and generate INSERT/UPDATE/DELETE commands
33 stars 16 forks source link

Build error #2

Closed smartmeter closed 8 years ago

smartmeter commented 8 years ago

Severity Code Description Project File Line Error Unable to locate 'c:\Sql_DataGenerators\SqlGenerator\SqlGenerator-master.nuget\NuGet.exe' SqlGenerator

  1. I fixed this changing the nuget targets to true.
  2. Below was the db connection in vs 2015 _can you please include the mdf file in /AppData folder

    System.InvalidOperationException was unhandled by user code HResult=-2146233079 Message=The ConnectionString property has not been initialized. Source=System.Data StackTrace: at System.Data.SqlClient.SqlConnection.PermissionDemand() at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.Open() at SqlGenerator.DomainServices.SqlParser.GetTables(String connectionString) in D:\Sql_DataGenerators\SqlGenerator\SqlGenerator-master\SqlGenerator\DomainServices\SqlParser.cs:line 18 at SqlGenerator.Start.LoadTables() in D:\Sql_DataGenerators\SqlGenerator\SqlGenerator-master\SqlGenerator\Start.cs:line 332 at SqlGenerator.Start.cboConnection_SelectedIndexChanged(Object sender, EventArgs e) in D:\Sql_DataGenerators\SqlGenerator\SqlGenerator-master\SqlGenerator\Start.cs:line 426 at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e) at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value) at System.Windows.Forms.ComboBox.RefreshItems() at System.Windows.Forms.ComboBox.OnDataSourceChanged(EventArgs e) at System.Windows.Forms.ListControl.SetDataConnection(Object newDataSource, BindingMemberInfo newDisplayMember, Boolean force) at System.Windows.Forms.ListControl.set_DataSource(Object value) InnerException:

jaklithn commented 8 years ago

1) I noticed that Nuget.exe is in my directory but not included in the repo. I am not sure why the directory ".nuget" is included in the first place ... Exactly what change did you do to resolve: "changing the nuget targets to true"?

2) I understand you run the application in VS2015. I don't get the above exception. Why would you like to add App_Data and mdf file to the solution? What is the value of the connection string when get the exception?

jaklithn commented 8 years ago

1) Directory ".nuget" is now removed from repo and solution. I think that will solve the issue.

smartmeter commented 8 years ago
  1. Yes that's correct, the above is what I did to fix it. I edited it in notepad++ and changed the target values.
  2. In VS2015 for one, they changed it to MSSqlLocalDb I dont think its localdb or express any longer and also the build is unable to locate the DB file that the connection string is referring to. Did you intend to include one... or was it a fake place holder? I was referring to App_Data since that was the usual place the put db files for mini projects by convention, also ASP / IIS gives it different permissions for db roles.
jaklithn commented 8 years ago

2) The provided config is just enclosed as a sample. You will need to configure it to work with your own setup. You are probably correct about Microsoft swapping default targets, but that is outside the scope of my repo :)