Note that there are some explanatory texts on larger screens.

plurals
  1. POerror: Could not load the file or assembly 'ExcelAddIn1.XmlSerializers' or one of it's dependencies. The system cannot find the file specified
    primarykey
    data
    text
    <p>I have an Add-in project for excel. It works fine on my computer. But when I install it on a client machine it gives me the error message i mentioned.</p> <ol> <li>I have Published it using project-> properties-> publish.</li> <li>I have the 'Enable Just my code' ticked.</li> <li>I have cleared the ticks for 'thrown' and 'user-unhandled' for the 'file not found exception' </li> <li>I setup the project on the client with the "setup" file in the "publish" folder in my project folder.</li> <li><p>In publish-> prerequisites, I have these items ticked:</p> <p>.net framework sp1</p> <p>Microsoft .net framework 4 </p> <p>Microsoft office 2007 primary interop assemblies</p> <p>Microsoft visual studio 2010 tools for office runtime</p> <p>Windows installer 4.5</p></li> <li><p>I'm using JSON. this is the code for my class:</p> <pre><code>[Serializable] [JsonObject(MemberSerialization.OptIn)] public class documentSchemaRestInfo { [System.Runtime.Serialization.DataMember] [JsonProperty] public double id { get; set; } [System.Runtime.Serialization.DataMember] [JsonProperty] public string name { get; set; } [System.Runtime.Serialization.DataMember] [JsonProperty] public string description { get; set; } [System.Runtime.Serialization.DataMember] [JsonProperty] public string[] fields { get; set; } } </code></pre> <p>//************************************************************</p></li> <li><p>The code that uses the class: </p> <pre><code>public List&lt;DocumentField&gt; getSchemaOfGroup(documentGroupPk groupPK) { List&lt;DocumentField&gt; result = new List&lt;DocumentField&gt;(); HttpWebRequest request = (HttpWebRequest)WebRequest. Create(ProxyFactory.baseAddress+"/services/rest/group/" + groupPK.id + "/schema"); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader streamReader = new StreamReader(response.GetResponseStream()); string responseBody = streamReader.ReadToEnd(); dynamic ds = ((dynamic)JsonConvert.DeserializeObject(responseBody)) .documentSchemaRestInfo; foreach (dynamic f in ds.fields) { result.Add(new DocumentField( f.name.ToString(),f.internalName.ToString(),false)); } return result; } </code></pre></li> <li><p>The client machine has Excel 2010 installed on it.</p></li> <li><p>This is the line of code throwing the exception:</p> <pre><code> excelApp = (Excel.Application) System.Runtime.InteropServices.Marshal.GetActiveObject ("Excel.Application"); </code></pre></li> <li><p>What is weird is that it works when I follow the following steps: Run it on the client and get an exception. Run it on my own PC (where no exception occurs). Press the add-in button on the Excel ribbon I made, on the client machine's application AND THIS TIME I DON'T GET ANY EXCEPTION!! I checked it so many times. Every time I follow this order it works fine!</p></li> </ol> <p>11. <img src="https://i.stack.imgur.com/6XYHE.jpg" alt="This is the stack trace of the exception"></p> <p>Thanks a lot in advance.</p> <p>Edit: 12. My application works like this: The first time user clicks on my button on the ribbon, the login form appears, and if he is authorized the form he has asked for appears. The next times just the asked form appears. and the exception happens JUST the first time clicks. here is my code for that: (No exception occurs in the last line, but that's not the case with the case with the 7th line)</p> <pre><code> 1.//If there is no ticket, means we haven't had a successfull login yet.=&gt; 2.// We should show the login form instead of groups form. 3.if (string.IsNullOrEmpty(ProxyFactory.ticket)) 4.{ 5. okOrCancel = new LoginForm().ShowDialog(); 6. if (okOrCancel == DialogResult.OK) 7. new GroupsForm().ShowDialog(); 8.} 9.//If the is a ticket, means we have had a successful login. 10.else 11. new GroupsForm().ShowDialog(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload