4
Answers

Error: nuget configuration is invalid

Nilesh Shah

Nilesh Shah

8y
2.3k
1
It's a project in Visual Studio 2015 actually, but there is no category of VS2015 in category selection so posting under VS2010.
 
Everything was working fine and suddenly I get this error while I try to add a new nuget package by right clicking on project and select "manage nuget packages...":
 
"<Project-Name> nuget configuration is invalid"
 
Any idea why this can happen?
Answers (4)
0
Mihai si atat

Mihai si atat

NA 21 0 19y
  Here are some useful links:

http://samples.gotdotnet.com/quickstart/aspplus/doc/webdataaccess.aspx.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/adon_wtaccessdb.asp.


/*for accesing a MS ACCESS Database*/
string strParameters = @Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\db\elearning.mdb;User Id=admin;Password=;
OleDbConnection oleConn = new OleDbConnection(strParameters);
OleDbCommand comGet = new OleDbCommand("SELECT * FROM Questions WHERE CourseID='" + CourseID + "'", oleConn);

oleConn.Open();
try
{
    OleDbDataReader dr = comGet.ExecuteReader(); //for reading the database
        while(dr.Read()) // returneaza false daca nu mai sunt inregistrari de citit
    {
          Response.Write(dr[0].ToString()); 
          int varsta = (int)dr["Varsta"]; 
    }
}
finally
{
    oleConn.Close();
}

/*for inserting data into a database*/
OleDbCommand com = new OleDbCommand("INSERT INTO Marks (SignInID, LessonID, PostedHomework) Values('" + SignInID + "','" + ID + "','1')", oleDbConn);

try
{
      oleDbConn.Open();
      com.ExecuteNonQuery();
}
catch(OleDbException)
{
           return "Could not mark the homework!!!";
}
finally
{
            oleDbConn.Close();
}



/* for accessing a Sql Server database */
string strParameters = @Data Source=Alex;Initial Catalog=elearning;User Id=sa;Password=parolasa;
SqlConnection sqlConn = new SqlConnection(strParameters);