|
It Is a .net assembly.
Yes, It Is ina foler that Is accessible.
Im trying to add It like a solution.
Im using Visual Studio 2015, and what I can see, they have updated the project template names to:
Class Library (Package)
These use the project.json file and the .NET Execution Environment (DNX) to build, run, and package (into a NuGet package) the project.
But how do I add a reference to this kind of template?
|
|
|
|
|
Try adding references for the other dependencies first (DNX, ...). Beyond that I'm not sure how to proceed. Other than to try the usual stuff (close VS, then reopen solution and try again - surprising how often that makes problems go away, or create new solution and load the projects into it - that often works too)
BTW You're not trying to add a reference to a template, you're adding a reference to a project within the solution, that was created using a template. Subtle difference.
|
|
|
|
|
How do I add dependencies?
|
|
|
|
|
Add them as references in the appropriate project before you try to add your assembly.
|
|
|
|
|
When Im trying to add reference to my class library, and choose the assemblies-tab, it says "No items found". No assemblies are listed
|
|
|
|
|
If nothing at all is being listed under the assemblies tab then something has gone very wrong with your VS installation or .NET installation. I suspect you have put something in the search box.
You were adding your class library under the solution tab - if it's in the solution as a project then that is the correct way.
Here's an article on managing project references[^] and another on adding references[^]
|
|
|
|
|
Don't create the reference to the library .DLL itself. Reference the PROJECT in the solution instead. Right click "References" in your project, pick "Add Reference...", In the nav bar on the left, open "Solution" and in the center box, put a check mark next to your library project. Click OK.
|
|
|
|
|
I's using c# webbrowser to filter webpage all ajax request and response content, but the webbrowser provider method can only filter post not in xmlhttprequest, how can i use webbrowser with com to implement this feature.
thanks
C# webbrowser
|
|
|
|
|
sjkbs
modified 9-Oct-15 11:41am.
|
|
|
|
|
Why are you asking for an explanation of what appears to be someone's resume here ?
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
You must realise that most of us here have a low opinion of the recruitment industry as we have been subjected to their idiocies too many times.
Now this seems to be someone trolling with a sense of the ridiculous or you really are as thick as most of us think you are.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It's a job ad: if you don't understand the requirements, then it's a waste of time applying as you won;t be able to do the job.
Keep looking for something where you understand at least 75% of what they are looking for.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
My Php file is returning this json. how can i covert it in c#.
{"response"[
{"user_id":"26","crtloc_lat":"47.678238","crtloc_lng":"-122.131416"},
{"user_id":"27","crtloc_lat":"9.350192","crtloc_lng":"-95.391006"},
{"user_id":"28","crtloc_lat":"47.678238","crtloc_lng":"-122.131416"}
]
}
php file is present at anybodyhere.net/returntest.php
My Code
public async void sendmsg() {
WebRequest request = WebRequest.Create(http://anybodyhere.net/returntest.php);
WebResponse response = await request.GetResponseAsync();
List<Responsemsg> responsemsg;
using (var stream = new StreamReader(response.GetResponseStream()))
{
responsemsg=JsonConvert.DeserializeObject<Responsemsg>(stream.ReadToEnd());
}
foreach (var item in responsemsg)
{
Console.WriteLine("id={0},latitude={1},longitude={2}", item.user_id, item.crtloc_lat, item.crtloc_lng);
}
}
}
public class Responsemsg
{
public string user_id { get; set; }
public string crtloc_lat { get; set; }
public string crtloc_lng { get; set; }
}
public class RootObject
{
public List<Responsemsg> responsemsg { get; set; }
}
</pre>
|
|
|
|
|
Your JSON is invalid - it's missing a ":" between the "response" property name and the value.
Once that's fixed, update your RootObject to match the structure, and deserialize that:
public class RootObject
{
public List<Responsemsg> response { get; set; }
}
...
RootObject responseData;
using (var stream = new StreamReader(response.GetResponseStream()))
{
responseData = JsonConvert.DeserializeObject<RootObject>(stream.ReadToEnd());
}
foreach (var item in responseData.response)
{
...
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Please how do i save frames from multiple IP Camera, i am using an update of the Camera Vision by Andrew Kirilov.
Thank you.
|
|
|
|
|
|
Thanks alot for the reply
|
|
|
|
|
I wanted to upload my pdf files in MySQL and view from datagrid....
I have an error...This is the error..
"
Additional information: Could not find a part of the path 'C:\WSmfgIT\WSmfgIT\WSmfgIT\wsmfgit\wsmfgit\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction "
asp.net:
<asp:Button ID="btn_upload" runat="server" style="z-index: 1; left: 610px; top: 337px; position: absolute; height: 23px; width: 63px" Text="Upload" OnClick="btn_upload_Click" />
<div>
<asp:GridView ID="workinstruc" CssClass="Gridview" runat="server" AutoGenerateColumns="false" DataKeyNames="FileView" >
<HeaderStyle BackColor="#df5015" />
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" />
<asp:BoundField DataField="FileName" HeaderText="FileName" />
<asp:TemplateField HeaderText="FileView">
<ItemTemplate>
<asp:LinkButton ID="lnkView" runat="server" Text="View" ></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
c#:
<pre lang="cs">using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Diagnostics;
using System.Windows.Forms;
using System.Data;
using MySql.Data.MySqlClient;
namespace wsmfgit
{
public partial class workinstruction : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
this.BindGrid();
}
}
private void BindGrid()
{
string constr = @"Data Source=192.168.8.124; Database=pmdb; User ID=client; Password=client";
using (MySqlConnection con = new MySqlConnection(constr))
{
using (MySqlCommand cmd = new MySqlCommand("SELECT ID, FileName, FileView FROM work_inst"))
{
using (MySqlDataAdapter sda = new MySqlDataAdapter())
{
cmd.Connection = con;
sda.SelectCommand = cmd;
using (DataTable dt = new DataTable())
{
sda.Fill(dt);
workinstruc.DataSource = dt;
workinstruc.DataBind();
}
}
}
}
}
protected void imgbtn_home_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("default.aspx");
}
protected void btn_upload_Click(object sender, EventArgs e)
{
string constr = @"Data Source=192.168.8.124; Database=pmdb; User ID=client; Password=client";
using (MySqlConnection con = new MySqlConnection(constr))
{
string filename = Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(Server.MapPath(@"\\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf" + filename));
con.Open();
MySqlCommand cmd = new MySqlCommand("insert into work_inst(FileName,FileView) values(@Name,@Path)");
cmd.Parameters.AddWithValue("@FileName", filename);
cmd.Parameters.AddWithValue(@"\\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf",filename);
cmd.ExecuteNonQuery();
Response.Write("Pdf File Save in Database");
con.Close();
BindGrid();
}
}
}
}
</pre>
This are my code...could anyone help me...
|
|
|
|
|
Well the error is quite clear - the path
C:\WSmfgIT\WSmfgIT\WSmfgIT\wsmfgit\wsmfgit\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction does not exist or the account that you are running this under does not have access to that folder.
For example, if you are running this on a server you won't have access to "C:\..." - Try using relative pathnames
Are you sure that the path is correctly constructed? The repeated sequence WSmfgIT\WSmfgIT\WSmfgIT\wsmfgit\wsmfgit looks as if something has gone wong
|
|
|
|
|
my actual path is this :
@"\\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf"
|
|
|
|
|
The reason you're having a problem is because you're using Server.MapPath along with mapping to a specific address. Do one, or the other, and not both.
|
|
|
|
|
this is my path
@"\\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf" so how should I declare it? can you pls help me..
|
|
|
|
|
Member 12016106 wrote: Server.MapPath(@"\\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf" + filename)
The Server.MapPath method expects a virtual path within the current application. It should look something like:
Server.MapPath("~/workinstruction/pdf/" + filename)
You've passed in a physical UNC path, which won't work.
If you want to save the file in the UNC path, don't use Server.MapPath :
FileUpload1.SaveAs(@"\\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf" + filename);
Member 12016106 wrote: cmd.Parameters.AddWithValue(@"\\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf", filename);
Your query doesn't have a parameter with the name \\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf . I suspect you meant to pass that as the path:
cmd.Parameters.AddWithValue("@Path", @"\\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf");
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I have try what you mentioned above but I still have an error...
this is the error:
An exception of type 'System.InvalidOperationException' occurred in MySql.Data.dll but was not handled in user code
Additional information: Connection must be valid and open.
c#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Diagnostics;
using System.Windows.Forms;
using System.Data;
using MySql.Data.MySqlClient;
namespace wsmfgit
{
public partial class workinstruction : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
this.BindGrid();
}
}
private void BindGrid()
{
string constr = @"Data Source=192.168.8.124; Database=pmdb; User ID=client; Password=client";
using (MySqlConnection con = new MySqlConnection(constr))
{
using (MySqlCommand cmd = new MySqlCommand("SELECT ID, FileName, FileView FROM work_inst"))
{
using (MySqlDataAdapter sda = new MySqlDataAdapter())
{
cmd.Connection = con;
sda.SelectCommand = cmd;
using (DataTable dt = new DataTable())
{
sda.Fill(dt);
workinstruc.DataSource = dt;
workinstruc.DataBind();
}
}
}
}
}
protected void imgbtn_home_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("default.aspx");
}
protected void btn_upload_Click(object sender, EventArgs e)
{
string constr = @"Data Source=192.168.8.124; Database=pmdb; User ID=client; Password=client";
using (MySqlConnection con = new MySqlConnection(constr))
{
string filename = Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(@"\\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf" + filename);
con.Open();
MySqlCommand cmd = new MySqlCommand("insert into work_inst(FileName,FileView) values(@Name,@Path)");
cmd.Parameters.AddWithValue("@FileName", filename);
cmd.Parameters.AddWithValue("@Path", @"\\192.168.5.10\fbar\TOOLS\ProbingApps\ProbingSystem\workinstruction\pdf");
cmd.ExecuteNonQuery();
Response.Write("Pdf File Save in Database");
con.Close();
BindGrid();
}
}
}
}
|
|
|
|
|
In your btn_upload_Click method, you've not set the command's connection property.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|