DdoubleD 315 Posting Shark

You can move the caret position in a textbox using TextBox.Select(...) . Just set the start parameter to the desired location of the caret and set length param to 0 or 1 (can't remember exactly if length needs to be 1). See: http://msdn.microsoft.com/en-us/library/system.windows.controls.textbox.select.aspx

DdoubleD 315 Posting Shark

You may wish to consider modifying your C++ program to find the file relative to where its exe/process is running, or setting the full pathname of the exe in your process call (exact issue is unclear to me), but look at changing the current working directory as a possible fix for your dilemma: http://msdn.microsoft.com/en-us/library/system.environment.currentdirectory.aspx

DdoubleD 315 Posting Shark

Are you getting a deadlock condition? Try adding proc.WaitForExit() following your call to reader.ReadToEnd() .

More information at:
http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.redirectstandardoutput.aspx

DdoubleD 315 Posting Shark

Here is an example of how you implement the BackgroundWorker instead of trying to implement the ProgressBar independently. If you use this technique, avoid using the PerformStep() altogether (even though it is possible to do).

private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;

            // Number of items to process in our loop...
            const int total = 137;

            for (int i = 0; i < total; i++)
            {
                // check cancellation flag. See documentation for multi-threading remarks!!!
                if ((worker.CancellationPending == true))
                {
                    e.Cancel = true;

                    // Optional: Set a result that can be accessed in RunWorkCompleted event...
                    e.Result = "Work haulted; failure ocurred...";

                    return;
                }
                else
                {
                    // Simulate some processing time....
                    System.Threading.Thread.Sleep(50);

                    // calculate progress...
                    int pct = (int)((i + 1.0) / total * 100);

                    // verify calculation....
                    Console.WriteLine(pct);

                    // Update the progress bar...
                    worker.ReportProgress(pct);
                }
            }
            // Optional: Set a result that can be accessed in RunWorkCompleted event...
            e.Result = "Work completed; no errors encountered...";
        }

        // using ProgressPercentage...
        private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            // Set the current progress value and update the control...
            progressBar1.Value = e.ProgressPercentage;
            progressBar1.Update();
        }

        private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            string msg;

            if (e.Cancelled == true)
            {
                // Use message we passed in 'Result'...
                if (e.Result != null)
                    msg = (string)e.Result;
                
                else
                    msg = "Canceled; Reason unknown!";
            }

            else if (e.Error != null)
                msg = ("Error: " + e.Error.Message);
            
            else
                msg = "Done!";
            

            MessageBox.Show(msg);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            // Cannot set …
DdoubleD 315 Posting Shark

the error is

System.Data.SQLite.SQLiteException: File open is not a database file file is encrypted or not a database ...

I thought I already replied to this... It sounds like you might have a compatibility issue between the DB and the client data provider. If you think this might be the case, you should verify the versions are compatible.

DdoubleD 315 Posting Shark

Yes, for example:

public class class1
        {
            public static int GetCustomerID(string lastname, string firstname)
            {
                int id = -1;
                // TODO: db query here...

                return id;
            }
        }
        public partial class Form1 : Form
        {
            TextBox textBox1 = new TextBox(); // I put here for reference only...
            TextBox textBox2 = new TextBox(); // I put here for reference only...
            //...

            private void GetCustomerID()
            {
                string lastname = textBox1.Text;
                string firstname = textBox2.Text;
                int customerId = class1.GetCustomerID(lastname, firstname);
            }
        }

Now, I suspect the answer you are looking for requires more information, but maybe not... Please elaborate if this is not a sufficient answer.

DdoubleD 315 Posting Shark

Given the code sample and question, you only need to declare the methods static within a class and you can reference/call them anywhere as long as you establish a reference within your project and call the method by it's fully qualified name. For example:

namespace MyNameSpace
{
    public class MyMathMethods
    {
        public static void MyMethod1()
        {
            Console.WriteLine("doing something in MyMathMethods.MyMethod1()...");
        }
        public static void MyMethod2()
        {
            Console.WriteLine("doing something in MyMathMethods.MyMethod2()...");
            string s = MyStringMethods.MyMethod1();
            Console.WriteLine("call to MyStringMethods.MyMethod1() returned: " + s);
        }
    }
    public class MyStringMethods
    {
        public static string MyMethod1()
        {
            return "MyStringMethods.MyMethod1() called...";
        }
        public static string MyMethod2()
        {
            return "MyStringMethods.MyMethod2() called...";
        }
    }
}

You could define these in different namepace's within the same file too (this is NOT typical way to organize namespaces, but perfectly legal):

namespace MyMathNamespace
{
    public class MyMathMethods
    {
        public static void MyMethod1()
        {
            Console.WriteLine("doing something in MyMathMethods.MyMethod1()...");
        }
        public static void MyMethod2()
        {
            Console.WriteLine("doing something in MyMathMethods.MyMethod2()...");
            string s = MyStringNamespace.MyStringMethods.MyMethod1();
            Console.WriteLine("call to MyStringNamespace.MyStringMethods.MyMethod1() returned: " + s);
        }
    }
}
namespace MyStringNamespace
{
    public class MyStringMethods
    {
        public static string MyMethod1()
        {
            return "MyStringMethods.MyMethod1() called...";
        }
        public static string MyMethod2()
        {
            return "MyStringMethods.MyMethod2() called...";
        }
    }
}

And, if you wanted to separate them (namespaces) into separate files (this IS typical way to organize namespaces):

// in MyMathNamespace.cs file
namespace MyMathNamespace
{
    public class MyMathMethods
    {
        public static void MyMethod1()
        {
            Console.WriteLine("doing something in MyMathMethods.MyMethod1()...");
        }
        public static void MyMethod2()
        {
            Console.WriteLine("doing something in MyMathMethods.MyMethod2()...");
            string s …
DdoubleD 315 Posting Shark

As ddanbe said, and you can use the FindItemWithText method to retrieve the corresponding item:

private void SetReservation(string time, string reservation)
        {
            // find item with matching time...
            ListViewItem item = listView1.FindItemWithText(time);
            if (item != null)
            {
                // Set value for reservation column...
                item.SubItems[1].Text = reservation;
            }
        }
ddanbe commented: He! did not know that. Thanks :) +6
DdoubleD 315 Posting Shark

Please refer to this example, which demonstrates (*.txt), but you can modify according to your needs: http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx

DdoubleD 315 Posting Shark

Here is an example I put together that creates a table with background image using HTML. The HTML is inline and does not import a CSS file--sorry. I'm no expert in the subject, but wouldn't the import be performed by the client (browser, outlook, etc.) and not gmail, thus eliminating gmail as the cause of any limitation? Otherwise, I suppose you should generate the HTML from the style sheet during the construction of the html body...

public static bool SendMailHtml()
        {
            try
            {
                using (MailMessage mail = new MailMessage())
                {
                    // who is sending message...
                    mail.From = new MailAddress(addressFrom, nameFrom);

                    // add as many recipients as needed...
                    mail.To.Add(new MailAddress(addressTo, nameTo));

                    // subject of message...
                    mail.Subject = "Subject text goes here...";

                    // body of message...
                    mail.Body = "Body text goes here...";

                    // HTML: Create a table with background image and some text and additional image...
                    string bodyHtml = "<html><body>"
                        // create a table border...
                        + "<table border='3' width='720' height='480' ALIGN='center' ><tr><td>"
                        // place a table inside table border with a background image...
                        // NOTE: image will repeat if smaller that table dimensions...
                        + "<table background='cid:imageId' border='0' width='715' height='475' "
                        + "ALIGN='center' ><tr><th colspan='3' height='40'></th></tr>"
                        + "<tr ><td width='200'></td>"
                        // add some font/text stuff...
                        + "<td width='350' align='center'><font color='#800000' face='Mistral' size='8' >"
                        + "<b>Have a Very Merry Christmas</b><br/>"
                        // add additional font/text stuff...
                        + "</font><b><font color='#800000' face='Comic Sans MS' size='5'>"
                        + "Best Wishes from DdoubleD</font></b></td>"
                        // overlay particular area with another image (I just used same image):
                        + "<td width='170'><img src='cid:imageId' …
sknake commented: very nice! +6
DdoubleD 315 Posting Shark

You have non-readable/printable characters in your input file. In c#, a "char" (Unicode representation) is 2 bytes, or 2^16, which has a max value of 65536. I'm not sure what it is you expect. You could force the output to be max byte length:

sw.WriteLine(Convert.ToInt16(((byte)b[i])));

but, I don't know how that helps you or what you are trying to do...

Have a look at these articles:
Unicode...
Extended ASKII...

DdoubleD 315 Posting Shark

The code I gave you uses ListBox's, but the principles are the same for ListView as far as modifying the collection of items. When you say "Refresh", I don't know what you mean exactly because it does you no good to perform a ListView.Refresh() if the form is hidden; and, it will occur automatically when the form is shown again.

Did you try the code? And, if there is something I am not understanding in your question, could you post the code or attach your project so I can see what you are trying to do?

I just added listBox1.Refresh() to the add items loop, and it doesn't care whether the form is visible or not... It doesn't error.

DdoubleD 315 Posting Shark

It doesn't matter whether the form is visible or not. I put this form demonstration together for you to see how the forms can manipulate the other forms' lists. Add them to a form project and call Application.Run(new Form_modal())

DdoubleD 315 Posting Shark

Dates need to be enclosed with hash (#) symbol. Try:

string str = "Select * from Customer where SubmitDate between #" + str1 + " 12:00:00 AM#" + " and #" + str2 + " 12:00:00 PM#";
DdoubleD 315 Posting Shark

If the record containing the values exists, then you only need:

if (dr.Read())
            {
                MessageBox.Show("Log-in Successful.");
                formMain main = new formMain();
                this.Hide();
                main.Show();
            }
            else
                MessageBox.Show("Log-in Failed.");

because if anything exists in the reader then a match was already found.

What I mean to say is that you are already performing a check against the DB for a matching record, so there is no need to also perform your CompareStrings . You can just check the reader dr.Read() contents to see if it found a match...

DdoubleD 315 Posting Shark

EDIT: NEVERMIND THIS BECAUSE I DIDN'T SEE YOU HAD THE DEFINITION POSTED: Are you sure the CompareStrings method is always return true? From what library is your CompareStrings ? Look at the definition to determine it why it is always returning true.

Why are you selecting the 'matching' record for username and password from your DB, then again checking to see if you have a match?

You are building your SqlDataReader object ( SqlDataReader dr = cmd.ExecuteReader() ), but not reading from it. See this example: http://msdn.microsoft.com/en-us/library/aa326245(VS.71).aspx

DdoubleD 315 Posting Shark

I looked at the file and it appears to be formatted, but I'm not sure what the format is. However, the question remains as to what you are trying to do as you are currently just reading in each character one at a time and storing it in your int[] , upto 5000 chars, then outputting the decimal equivalent of each of those chars. Is this intended?

DdoubleD 315 Posting Shark

You have your "sr" and "sw" naming conventions reversed :D, but that is not your problem...

Your call to b[i] = sw.Read(); will only read a character at a time, which is why you cannot get the values you expect, presumably.

Look at the Read method spec and see if this helps. Otherwise, attach your input file so we can see how it is constructed.

EDIT: I think I misunderstood what you are doing. It is your intention to read each character and convert it to it's "decimal" equivalent? Just cast the return from Read to an unsigned int.

DdoubleD 315 Posting Shark
// Set the number of rows to step through...
                progressBar1.Maximum = ds.Tables[0].Rows.Count;

                // Set the increment size...
                progressBar1.Step = 1;

then to maintain progress:

cmd1.ExecuteNonQuery();

                        // Increment progress...
                        progressBar1.PerformStep();

You should also move the sqlConn.Open(); outside of your loop, which is why I didn't include it above. There is no need to reopen the connection for every command (INSERT) you are executing.

DdoubleD 315 Posting Shark

Nope, it didn't work as well... (T-T)

What is the error you are getting?

DdoubleD 315 Posting Shark

Twice I have received "token expired" error trying to reply to this... I am really peeved! Anyway, run the program outside the debugger and check the debug\application.exe.config file for the changes. I would explain further, but I've already wasted a 1/2 hour trying too...

EDIT: I'll try to elaborate briefly and hope I don't get another "token expired"...

When you build your app, it will create the application.exe.config file. When you run in the debugger, it will update the application.vshost.exe.config file. When you make changes in the debug mode, it will update the vshost file, but not the other. However, when you run outside the debugger it will update the application.exe.config file...

tig2810 commented: you da man +1
DdoubleD 315 Posting Shark

Ensure you have all the appropriate NotifyFilter and Filter settings. Here is an excerpt from the MSDN example:

/* Watch for changes in LastAccess and LastWrite times, and
           the renaming of files or directories. */
        watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
           | NotifyFilters.FileName | NotifyFilters.DirectoryName;
        // watch all files
        watcher.Filter = "*.*";

You might also try adding NotifyFilters.CreationTime to the above flag attributes, but it would seem unnecessary due to the LastWrite attribute.

DdoubleD 315 Posting Shark

Because each element of "m" will reference the same "record" object, which will contain whatever the last items added to the record are. You need to move the creation of the "record" into the loop so that each "record" of "m" is a different object:

for (int i = 0; i < 5; i++)
            {
                string[] record = new string[3];
                record[0] = "1";
                record[1] = fr[i];
                record[2] = bd[i];
                m.Add(record);
            }

EDIT: Tower-Rounder already replied before i got to it...

DdoubleD 315 Posting Shark

Since the SetAttribute method sets the value of the name, you wouldn't want the value for "checked" to be "unchecked" because it expects a state flag value for a checkbox's state. Have you tried: SetAttribute("checked", "false") ?

DdoubleD 315 Posting Shark

You didn't call your method. At line 19 you are writing out the abbreviation. Try:

Console.WriteLine("State is {0}", FromAbbreviation(abr));

In addition, you are already comparing to lower text switch(abr.ToLower().Trim()) at line 24, so all of those case labels you have for checking upper-case abbreviations will never test true--you can remove them.

DdoubleD 315 Posting Shark

Take a look at the FileSystemWatcher component, which you can add to your form.

Here is a Daniweb snippet of its usage too:

http://www.daniweb.com/code/snippet217135.html

DdoubleD 315 Posting Shark

I'm not sure how your "web application" is deployed and you cannot simply access the file system on a client from a web service, but I won't make assumptions since you indicated you have "FCR" folders already setup on the clients. Try adding some exception handling around your file IO: FileStream Exceptions...

DdoubleD 315 Posting Shark

Try this code. I modified your path construction to use backslash and added exception handling to provide specific error information.

string database = @"C:\Users\Jessie\Documents\Visual Studio 2008\Projects\Face\DAT\DTR_DB.s3db";
            string connParams = @"Data Source={0};Version=3;New=False;Compress=True;";
            string connStr = string.Format(connParams, database);
            SQLiteConnection conn = new SQLiteConnection(connStr);

            try
            {
                conn.Open();
            }
            catch (SQLiteException ex)
            {
                Console.WriteLine("Exception: {0}\r\n   Stack Trace: {1}", ex.Message, ex.StackTrace);
                System.Diagnostics.Debugger.Break();
            }
            finally
            {
                conn.Close();
            }
DdoubleD 315 Posting Shark

UPDATE tablename SET columnname1='value' WHERE columnname2='value';

If the value is numeric, leave off the ticks ('...') around the value.

DdoubleD 315 Posting Shark

You cannot assign a CR image path dynamically in vs 2005, but here is a work around you can use: http://dotnetfish.blogspot.com/2009/02/dynamic-image-in-crystal-report-9.html

DdoubleD 315 Posting Shark

As sknake pointed out, you would probably need to count the 872 lines by reading them in, but if you have lines that are fixed length, you could calculate the position within the stream ( lineLength * 872 ) and then use the Stream.Seek method to position the file pointer to the location you want to begin searching.

In addition, if you know each of these files will contain a certain block size (number of bytes) that you always want to skip, you could use the above to seek past that position. Furthermore, if you know that your search criteria will never be past a particular block size (number of bytes), you can evaluate the Stream.Position property to determine you have read past this point.

DdoubleD 315 Posting Shark

Not sure why you would ask this question rather than just test out your code to see if it does indeed work, but the code is nicely structured for the most part.

  • Your test for valid username/password will display a message box for every line read following the initial successful read of those two line items (username/password), but if those are the only two lines I suppose that wouldn't matter... You might consider having the method return a bool (success or not) that would allow the calling code to display message box and determine whether the user can continue in the program...
  • You might consider using a single configuration file for all users instead of a separate file for each... Also, naming the file same as username, then reading the line to compare the username is redundant.
  • Not sure you can use forward slash (eg. '/'), or single dot then slash (eg. "./" for relative) for the path portion of the string, but maybe it works?
  • You really should use encryption or another way to store/obscure the password (at a minimum) for obvious reasons.

If you are interested in improving the security and design, there are many articles and posts available here and elsewhere on the web.

DdoubleD 315 Posting Shark

EDIT: Scratched response... Please see: http://msdn.microsoft.com/en-us/library/s35hcfh7(VS.71).aspx

DdoubleD 315 Posting Shark
DdoubleD 315 Posting Shark

I didn't see where there was any change to this method for Windows 7. Perhaps you want the SaveFileDialog flexibility: http://msdn.microsoft.com/en-us/library/system.windows.forms.savefiledialog.aspx

You can set the InitialDirectory to be whatever drive:path concerns your application.

DdoubleD 315 Posting Shark

You have indicated you are getting a "null reference" error, and you have provided a snippet that does not reveal the cause of the error; unless it is because "em" has not been instantiated. I suggest you zip up the project and attach it with data. If you cannot do that, at the very least you need to indicate which line causes the error so we can direct you to the possible cause.

EDIT: Just saw ddanbe replied with the same suspicion related to "em"...

DdoubleD 315 Posting Shark

You might want to check into the MS reference source server for the latest source available for VS 2008. You must follow all of the instructions. It will add some overhead to the start of your debug session, but once you are satisfied with the code already downloaded to your local cache, you can disable the search option to improve performance (Tools/Debugging/Symbols): http://referencesource.microsoft.com/

Once configured, you will be able to step into the .NET source code.

DdoubleD 315 Posting Shark

After rereading your post, it occurs to me that adatapost has probably hit more on what you are asking for. Just combine the control iteration examples with his "common" event wiring example and you have your answer.

DdoubleD 315 Posting Shark

thanks very much
the compiler give me a message
The name 'FindControlsOfType' does not exist in the current context

Sorry about that. I just realized that I had copied those methods from somewhere into a code file I have. I searched the forum to see if I found them here, but I got no matches. Anyway, I'm going to repost them since I can't locate the link to direct you too, but it's pretty straight-forward stuff that also uses recursion to search child controls:

public List<Control> ListControlsOfType(Control ctrl, Type t)
            {
                List<Control> ctrlList = new List<Control>();
                foreach (Control c in ctrl.Controls)
                {
                    // add this control if of type specified...
                    if ((c.GetType() == t) || c.GetType().IsSubclassOf(t))
                        ctrlList.Add(c);

                    // search and add all child controls too...
                    foreach (Control childCtrl in c.Controls)
                        ctrlList.AddRange(ListControlsOfType(childCtrl, t));
                }
                return ctrlList;
            }

            // use ListControlsOfType instead!!!
            public Array FindControlsOfType(Control ctrl, Type t)
            {
                System.Collections.ArrayList result = new System.Collections.ArrayList();
                foreach (Control c in ctrl.Controls)
                {
                    if ((c.GetType() == t) || c.GetType().IsSubclassOf(t))
                        result.Add(c);
                    foreach (Control childCtrl in c.Controls)
                        result.AddRange(FindControlsOfType(childCtrl, t));
                }
                return result.ToArray(t);
            }

EDIT: To whomever wrote those methods, my apologies for not giving you credit.:$

DdoubleD 315 Posting Shark
Button[] btnsAry = (Button[])FindControlsOfType(/*this*/ form1, typeof(Button));
                foreach (Button btn in btnsAry)
                    btn.BackColor = Color.Red;

Or, you could use a list (List<>):

List<Control> btnList = ListControlsOfType(/*this*/ form1, typeof(Button));
                foreach (Button btn in btnList)
                    btn.BackColor = Color.Red;
DdoubleD 315 Posting Shark

You cannot simply estimate time based on samples and, as I am sure you are aware, no progress for downloading from the web is extremely accurate. Given that is true all around, user's expect there to be plus/minus whatever they have experienced... In light of this, the best you can do is attempt to recalculate the download time at intervals based on the current sampling of progress...

Here are some links you might find useful:

http://stackoverflow.com/questions/1587333/c-calculate-download-upload-time-using-network-bandwidth
http://stackoverflow.com/questions/933242/smart-progress-bar-eta-computation
http://forums.asp.net/p/1438079/3280750.aspx#3280750

Also note that since the BackGroundWorker will only update when it receives a slice of CPU time, the thread might not be processing in exact increments.

DdoubleD 315 Posting Shark

That's my bad as I counted wrong :P
After applying that line it still gives 0 as returnvalue :(

First, check to see you saw my edits cause I made a couple.;)

Second, compare data:

Id comboId itemId itemId1
3 1 1 3
5 5 1 2
7 4 1 2
10 6 1 2
13 8 1 4


In the above, I have 3 matching records because "Hout" matches itemId in Items_1 and "Steen" matches itemId1 from Items_2...

In the middle where ItemId = 1 and itemId1 = 2 there are three records..

DdoubleD 315 Posting Shark

When I test I set item1 to Hout and item2 to Steen
That combination exists twice so.....

FYI: That combination exists 3 times in my data...

DdoubleD 315 Posting Shark

LOL... Still some holes in your answer, but I think this might be closer to what you want:

string select3 = "SELECT Count(*) FROM Combineren "
                    + "WHERE itemId1 "
                    + "IN (SELECT itemId1 FROM Items_2 WHERE Naam = '" + naam2 + "' ) "
                    + "AND ItemId "
                    + "IN (SELECT itemId FROM Items_1 WHERE Naam = '" + naam1 + "') ";

This gives me a count of 3 for naam1 = "Hout" and naam2 = "Steen".

DdoubleD 315 Posting Shark

When I test I set item1 to Hout and item2 to Steen
That combination exists twice so.....

You are going to have to explain what it is that you are wanting to compare exactly because I couldn't decipher a match based on the example SQL string you supplied given the data I have from the downloaded attachment...

Are you wanting to compare cominaren where the itemid matches the records with naam having a match in Item_1.itemid and also a match on Combinaren.itemid1 in Item_2.itemId1? None of these will ever match given the data I have because the Items_1 and Items_2 table are exactly the same, but the id fields in the cominaren table don't seem to correspond to these...

DdoubleD 315 Posting Shark

When I use this code it constantly returns with 0 :S
Any idea why?

I tested it with naam='Hout' because those were the only records in the Combineran table where itemId had a match because they are all set to '1' (itemId=1), which matches 'Hout' from the other two tables...

Returns 5 because there are 5 records with that id in the Combineran table.

DdoubleD 315 Posting Shark

What will the code look like if I want to use something similar to this:

string SQLString = "SELECT Count(*) FROM Combineren WHERE Items_1.itemId=Combineren.itemId AND Items_2.itemId1=Combineren.itemId1 AND Items_1.Naam = '" + item1 + "' AND Items_2.Naam = '" + item2 + "'";

This piece gives the error of missing parameters.

Try this:

string select2 = "SELECT Count(*) FROM Combineren "
                    + "WHERE itemId "
                    + "IN (SELECT itemId1 FROM Items_2 WHERE Naam = '" + naam + "' ) "
                    + "AND ItemId "
                    + "IN (SELECT itemId FROM Items_1 WHERE Naam = '" + naam + "') ";
DdoubleD 315 Posting Shark

Unfortunately, I don't think there a simple answer to this problem. I ran into this thread where a number of people reported problems and a "wild goose chase" ensued trying to pinpoint the problem. So, the thread is quite lengthy, but if you take the time to read through it, you might, hopefully, identify something that is relevant to your application's deployment:
ClickOnce-deployed application failure...

DdoubleD 315 Posting Shark

Here is a link that shows you how to execute an update command on the table: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.updatecommand.aspx

DdoubleD 315 Posting Shark

Hi, this image could help.

I also tried to register the functions.dll with the gac, but it still not working.

Thanks

It sounds like the plugin is expecting the functions.dll to be in the entry-assembly's path. How is the plugin referencing this dll? I assume you have the build for the plugin too since both the app and the plugin references it? Have you looked into the Assembly.LoadFrom method: http://msdn.microsoft.com/en-us/library/1009fa28.aspx?