.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Using c++/cli dll from c# project does not work when published with Clickonce

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :WPF


I am having a Visual Studio 2010 solution with an WPF .exe project in C#, using another c++/cli dll project of the same solution as reference.

The c++/cli dll contains some managed and some native code, but from the C# side I am only using the managed part of the dll.

This work fairly well, when starting it from VisualStudio or from the bin/debug folder directly.

But when publishing this solution as Clickonce, after installing and running it, I am getting an exception telling me that the application cannot find the c++/cli dll.

But the c++/cli dll is part of the installer produced by the publishing.


Thank you for your help!




View Complete Post

More Related Resource Links

MVC doesn't work once is published in the WEB, "Error 404 Page Not Found" vs2010 iis7 mvc 2rc2 I up


Hi Everyone.

 I'm doing the samething in my two differents pc.

1) Windows 7,  vs2010 rc, mvc 2rc2, .Net 3.5

2) Winodws xp, vs2008, mvc 2rc2, .Net 3.5

My Hosting is in GOdaddy IIS 7, .Net 3.5.

I created a new project in both computers, i build it, i copied the 3 dll's files in the bin folder (System.Web.Mvc,  System.Web.Routing, system.Web.Abstractions), and i publish them...., i go to my website (www.luisbragagnolo) both same problem "Page Not Found"

 I tried many blogs...many advices...nothing yet....

 Any other new Advice people? Thankssssssss

C# project doesn't work with interaction with Managed C++ library


I have 2 projects in solution:

1. C# WinForms - Exe
2. Managed C++ - DLL

On machine where Visual Studio installed all works, but when i try to run it on Virtual Machine where only .NET framework installed I have following error message:

System.IO.FileLoadException: Could not load file or assembly 'ZTEInterface, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)File name: 'ZTEInterface, Version=, Culture=neutral, PublicKeyToken=null' ---> System.Runtime.InteropServices.COMException (0x800736B1): This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1) at POCUI.WDSClientDlg.WDSClientDlg_Load(Object sender, EventArgs e)


Please help me to solve it

Published WCF Service in IIS doesn't work



I'm using sync services and have a WCF service that works fine when run from teh debugger when hosted in the WCF test client that is spawned by the debugger.  But I have "published" my service to my machine and when I go to the UrL the page displays but when I try and run my sync application I get this error which make sit seem like IIS isn't "serving up" the service.  Any ideas??

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://techpcjrl03.tech.service.com:8080/WcfSynchService.LocalEnterpriseSystemDBCacheSyncService/ that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
   at System.Net.HttpWebRequest.Get

work on project from multiple locations


I want to work on a project from a desktop and a laptop and keep the two synced.  I have an ftp that can act as an in between but you don't get all the files.  Plus there are all kinds of naming issues that can come up when creating a new project in the second location, and recreating the work environment with the database etc, so all the naming conventions are the same.  

So what is the best way to go about this?  

WCF service OK when debugging but it doesn´t work when it is published.


Hi all,

I have created a WCF service in Visual Studio 2010 and it works fine in debug mode (executing it through Visual Studio) but when I publish it on localhost or on a werserver I get the following error:

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at BrightcoveAPI.HTTP.PostRequests.PostForm(String postUrl, String userAgent, String contentType, Byte[] formData) at BrightcoveAPI.BCAPIRequest.ExecuteWrite[T](Dictionary`2 postParams, AccountConfigElement a) at BrightcoveAPI.VideoAPI.UpdateVideo(BCVideo video) at ServiceBCPublisher.Service1.ActualizaVideoNameYa(Int64 VideoId, String Name) in D:\PROYECTOS2010\WS\ServiceBCPublisher\ServiceBCPublisher\ServiceBCPublisher.svc.cs:line 265 - Unabl

How do I perform "Deploying COM Components with ClickOnce" on a strong name signed project?


After reading http://msdn.microsoft.com/en-us/library/ms165432.aspx , my test C# project worked flawlessly with the isolated COM component that we want to get rid from the DLL ____.

Then my next step is to port this method to our main project which is strong name + delay signed.
Conclusion I got after trying steps below: Visual Studio 2010 just can't generate strong name signed interop files. I can't find out how to do it.

I tried these 2 methods:


  1. I disabled strong name signing in the C# project settings.
  2. Add the component into a form, then re-enable strong name signing.
  3. Compilation failed badly due to generated interop files were not strong name + delay signed.

  COM Reference 'XXXXXLib' is the interop assembly for ActiveX control 'AxXXXXXLib' but was marked to be linked by the compiler with the /link flag. This COM reference will be treated as a reference and will not be linked.
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1558,9): warning MSB3283: Cannot find wrapper assembly for type library "XXXXXLib".
  C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\AxImp.exe "C:\Blah\XXXXX.ocx" /out:obj\Debug\AxI

Project Example: ASP.NET MVC + SubSonic Architecture

use of SubSonic to provide the DAL in association with some ASP.NET MVC sites and was waylaid in my original intent to throw up a post summarizing the architecture we're using for the effort. Well I've finally gotten around to it. Recall that in his fake it till you need it post, Dave provided a window on our architecture that I'll build upon here

RadioButton inside GridView, How to get it work as normal

Did you tried before to drag a RadioButton control inside a Gridivew templatefield, and then you attempt to select these RadioButtons , you will notice that the behavior of RadioButton control will be changed and it will work just like the behavior of checkbox control! the user will be able to select more than one radiobutton in the grid!

Why isn't my Views/Home/Home.Master file published when I publish my website?


Hi All,

I spent the better part of today hunting down an elusive error.  I was getting a message saying that it couldn't find the Index view for the Home controller, and it gave a list of locations it searched, e.g., ~/Views/Home/Index.aspx.  This was really confusing as the file definitely existing and was at ~/Views/Home/Index.aspx, the first place in the list of locations it searched for the view!

What I eventually discovered was that there was a file that did not get published when I used Visual Studio's "Publish" feature (this is on the "Build" menu).  That file was Views/Home/Home.master, and (as you can probably guess) is the master file used by Views/Home/Index.aspx.

Once I copied that file into place manually, it started working.  But I am left wondering--why???  Why does this file not get published?  It's a part of my project, I can see it in the solution explorer, and it's obviously a critical file that's necessary for the MVC app to run.  It has the same permissions as every other file in my project.  So why wouldn't it get copied?  And how can I fix it so it does get copied?

Thanks for any suggestions on this!


Looking for guidance: wanting to work with AJAX architecture



I'm starting a small website that will be backed by a database, and will allow a small number of users to authenticate and select an entry in the database, and then view (and optionally update) a corresponding entry (think master-detail).

I have some flexibility in how I'll do this, but I'd really like to incorperate some newer AJAX style coding, eliminating some page postbacks. I think this is a great opportunity to learn the concepts well.

I'll probably go with an ASP.NET 4.0 site. From what I've seen there are MANY ways to go about this:

-WCF Data Services to expose the data, and consume in ASP.NET

-Page methods to expose the data, separate method to update the data

-I'd rather avoid the UpdatePanel because I'm really looking for a full hands-on approach, with learning client side scripting being an objective as well.

Beyond that, it seems that one can use jQuery to build clientside templates, but also one can use the ASP.NET AJAX template engine (in ASP.NET 4.0 I believe).

A concern I have: users should only be able to work with the data exposed via these endpoints if they are logged into the website. Hopefully I can somehow reuse the ASP.NET forms authentication cookie for this purpose. 

Well, I hope I've posted enough to a

animate effect work but the render items are messed up.


Hi all,

     I have a very unique problem, humm i think. I am using a jquery effect that animate bounce effect, i have a line in my javascript pageLoad function $("#UserBrowserInfoDIV").show('bounce'); - the effects run smoothly but what it does is mess up the bolded text in the div. I have try the items inside the div without bolding and it works fine and no render problem but when bolded the text that are bolded is quite messed up, and barely readable.

Please let me know is there anything else i can do i really would like use this effect.

P.S all the effect have the same render problem, and i am using ie8 under compatibility mode.





Why getTreeNode does not work?



I try to run a  treeview example from msdn:


I also want to use code from


Here is my code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register TagPrefix="mytree"
Assembly="Microsoft.Web.UI.WebControls" %>
 <script type="text/javascript" language="javascript">

     function xxx() {

         var myNode = treeview_one.getTreeNode(treeview_one.selectedNodeIndex);


<form id="myform" runat="server">
<mytree:treeview id="treeview_one"  runat="server" Child

VS2010 Professional .NET 4.0 Remote Debugging ASP Website Project


Trying to remote debug ASP website from VS2010 Pro to Windows Server 2003 machine.  Specifically, trying to debug a Web Service, but breakpoint says, "The breakpoint will not currently be hit. No symbols have been loaded for this document."  This happens for all compiled code though.  I have read this is due to missing PDB files and the work around is to manually copy them, as noted here.  Problem is, I cannot find any PDB files for my project, except referenced libraries, which I can remote debug.


  • web.config has <compilation debug="true">
  • Debugger is attached to wewp.exe process on remote server
  • Installed VS2010 remote debugger from DVD (as I can remote debug referenced libraries)

This is beyond frustrating.  I migrated my code from VS2008 .Net3.5 to VS2010 .Net4.0 to take advantage of the inherent multithreading framework.  Debugging works when using local host and was stable until deployment to test server.

Thanks in advance,


How can I be sure that my entire project is up-to-date and free of errors in VS2010?


Seems like a stupid question, but I will go to Build > Build Solution many many times and the build will succeed many many times, then I will put in a minor syntax error and the build will fail, BUT the build will not fail because of the minor syntax error; it will fail because of an unresolved type that I put in about twenty compiles ago. And then I will fix the minor syntax eror, and the compiler will still complain about the unresolved type. Here is my code:

<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
  <form runat="server">
  Hello World!!  

Pretty simple, really. I go to Buld > Build WebApplication1 and it runs OK. Now, if I put in a minor syntax error, such as substitute "forrrrrrrm" for "form" and then try to Build Solution, it complains not about the misspelled word, but about the FreeTextBox. And then if I correct the misspelled wird, it still complains about the FreeTextBox. Which leads me to believe that Building the Solution does not check absolutely 100% everything that needs to be checked. Is there a more thorough way of compiling a program that I need to use?

is it possible to convert whole visual studio 2008 web site project to visual studio 2010 web site p


is it possible to convert whole visual studio 2008 web site project to visual studio 2010 web site project


my current project references




i have a very annoying iis problem

iis server stops working until app pool is recycled


i am hoping that new visual studio (net framework 4.0) may solve this very annoying unsolveable problem


Business Intelligence Reports Project in Visual studio 2008 ?



I wonder how to add a project template called  Intelligence Reports, something like that, to Visual studio 2008. I have SQL 2008 installed. Do I need to install some updates to get Intelligence Reports template to Visual studio 2008 ?

Thank you..

Solution/project structure


Hello, I am working in a aspx web application that must be built in several separate "modules" with different functionality which will be partly developed by different teams.

However, I need the completed app to reside in ONE virtual directory. There will be a single startup page. I need session state to be preserved across pages in different modules.

I structured it as one solution with different Web Projects and one class library project with common functionalities.


1) is this the right approach to do this? Or which one would be better?

2) each time I add a new web project to the solution, a new web.config gets created. What do I do and where do I put them?

VS 2010 + framework 4.0 + TFS

Regarding TFS and source control, I have a single Team project, the solution and web projects are inside it.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend