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

Post New Web Links

ManagedSpyLib.dll compiled for .NET 4.0 ??

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :.NET Framework
 Is there a version of ManagedSpyLib.dll compiled for .NET 4.0 ?? 

I have the C++ Express version but cannot compile it since I don't have the correct include files.



Tom Fisher

View Complete Post

More Related Resource Links

Web Deployment Project - "has not been pre-compiled"


I have created a Team Build that builds a solution containing a Web site, multiple class libraries (project references to the Web site) along with other compiled references, and a Web Deployment Project (WDP).  Everything is working well except when I deploy (either via Team Build or the WDP).  The deployed directory structure looks correct, but when I navigate to the first page I receive "The file '/WhatSite/FirstPage.aspx' has not been pre-compiled, and cannot be requested."

Here's the kicker:  When I set the WDP's Output Assemblies property to "Merge all outputs to a single assembly" and deploy, the default page returns the error above.  When I set the Output Assemblies to "Merge each individual folder output to its own assembly" and deploy, the default page loads correctly but all subsequent pages return the error. 

If I go back to the plain Publish Web Site under the Build menu, the site works as expected.

What am I missing or does anyone have any ideas?


CorBindToCurrentRuntime failed when C++ Project compiled using VS2005

Hi, I use unmanaged CLR Hosting APIs for loading CLR in windows native apps like notepad, calc etc. In case CLR is already hosted in the application ( like any .NET app ) I used CorBindToCurrentRuntime function published by mscoree.dll to get the handle to ICorRuntimeHost object and do some stuff by enumerating AppDomains. Things were working fine until I migrated my project from VS2003 to VS2005 IDE. I had to do this I faced some issues with my existing code when tried to get handle to Runtimehost using existing hosting APIs in CLR 4 process. I decided to check if new API i.e. "CLRCreateInstance" is exposed by mscoree.dll then use it to get handle to ICorRuntimeHost else use old function. In order to use this I included metahost.h file in my project and build my application. Now, for some reason I'm not able to get handle to ICorRuntimeHost interface inside .NET 1.1 application. If I use polcy file to run .NET 1.1 app as part of .NET 2.0 CLR, then call to "CorBindToCurrentRuntime"succeed and return the correct handle. Can anyone suggest what could possibly go wrong if I migrate from VS2003 to VS2005 IDE. I thought if it could be because of some .net framework dependeny  introduced when I built my c++/native project using VS2005, but I could not find one. My C++ project is a native project and doesn't depend on clr. Code Used to get

deployment error on x64 when compiled as x64

I have a service application that I compile as x86, x64, and any CPU.  It installs correctly on x86 using either x86 or any cpu.  It installs correctly on x64 if I compile as x86 or any CPU but if I include the wrong DLL the any CPU version crashes so I have to be careful where the any CPU version is installed.  If I compile the x64 it gives me a BadimageForamtException during install. I would prefer to only have the two installs x64 and x86 which limits the odd errors when using the any CPU version but I need to resolve the BadimageForamtException first. I know the problem is more than likely one of the related DLL is 32 bit only my problem is finding it.  Is there a quick way of determining if a DLL is 32 or 64 bit?  It would be nice if this detail was displayed in the list of properties in VS when you click on the references. John J. Hughes www.functioninternational.com/

How do I make changes in a website that has been partly pre-compiled

 I have been asked to make some changes to a website developed by someone else and it has a lot of unfamiliar stuff going on. In the first place, the website has some strange file types: csproj, csproj.user and .designer.cs. Second, there is a folder under the root folder called Datalayer. I have been making changes to code in files in this folder, but my changes are not being implemented when I build and run the website. Instead, it seems to be using some pre-compiled version of these. Many of the aspx.cs pages have a line at the top: using OceanLED.DataLayer; There is also a /bin folder under the root folder, which contains a .dll file and a .pdb file for the website. There is also a /obj/debug folder, also containing a .dll file and a .pdb file for the site. Finally, when I try to build, I get loads of these cryptic warning messages: Warning 1 The type 'OceanLED.DataLayer.WarrantyClaim' in 'C:\Inetpub\wwwroot\OceanLED\DataLayer\WarrantyClaim.cs' conflicts with the imported type 'OceanLED.DataLayer.WarrantyClaim' in 'C:\Inetpub\wwwroot\OceanLED\Bin\OceanLED.dll'. Using the type defined in 'C:\Inetpub\wwwroot\OceanLED\DataLayer\WarrantyClaim.cs'. C:\Inetpub\wwwroot\OceanLED\DataLayer\WarrantyClaim.cs 287 17 C:\...\OceanLED\ How do I get it to use MY code.

Reference a assembly compiled against .NET 4 CLR from a .NET 2 CLR

Hi, I just read this aricle http://msdn.microsoft.com/en-us/magazine/ee819091.aspx. In Figure 2 (Will These Runtimes Load in the Same Process?) You can read that it is OK to load an assembly compiled against .NET 4 CLR from an application compiled against .NET 2 CLR. But later in the aricle under "Library Developers and Consumers " you can read that it will not work for libraries. I have a web application (ASP.NET) compiled against .NET 2 CLR that needs to reference an assembly compiled against .NET 4 CLR. Will this work or not? I have tried it several times and it works fine. I don't understand the text in the aricle becase Figure 2 says it's OK but the text under "Library Developers" says it will not be OK. But for me it works. Maybe I have just had luck?

COM Server process compiled with /clr option doesn't unload itself from memory when last COM client

I created Visual C++ ATL project in VS2010, exe type, imlemented COM object, then added /clr option to project. Project uses other C# dlls (WCF service). When last COM client disconnects and last COM object instance destroys, WCF service stopped, my COM server process doesn't unload itself from memory. All managed threads in C# dll are background, COM object doesn't create threads. How can I unload server process? Thank you in advance. 

Host server says my uploaded files are not compiled

I recently published my website locally and then uploaded the .aspx files to the root directory of the host server and then uploaded all of the compiled files into a new "bin" subdirectory.  But, when I accessed my website through my domain name, I got an error message that said that my Default web page has not been compiled.The service that I am using is an ASP.NET hosted server called JodoHost.  They recommend that I contact you for help with this problem.  But I noticed that, besides the new "bin" subdirectory that I put all of my compiled files into, there was also subdirectories named aspnet_client, cgi-bin, and images.  I assume that my problem stems from not placing my compiled files into these.  Is this correct?  If so, what should I be placing into which directories?Maurice

Project publishing as a compiled package (DLL+aspx). Can I revert to aspx and editable pages?


First time 4.0, the project is a complied DLL - is there any way to revert to just normal aspx and editable cs?



Cannot launch application compiled in Visual Studio 2010


Hi all,

I have compiled and created an .msi file to install a WPF desktop application.

It installs fine but will not launch. The error is below.

The instllation machine is running windows 7, 32bit. Could it be that I am compiling a 64bit application. If so how do i change this in VS?

Cheers, Shane

Error Log:


Application: DTFStampingClient.DTFDesktop.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.Reflection.TargetInvocationException


at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)

at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)

at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)

at System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)

at System.Windows.Application.LoadComponent(System.Uri, Boolean)

at System.Windows.Application.DoStartup()

at System.Windows.Applicati

Compiled Query with Gridview


how can i bind data to gridview
when using compiles query?
load all country
GridView1.DataSource = myclas.EmployeesByManagerId(db);
this is class
static class myclas
        public static Func<Entities2, IQueryable<Country>>
              EmployeesByManagerId =
                   (Entities2 db) =>
                      from c in db.Country
                      select c);

Binding Compiled Query to Gridview


how can i bind data to gridview
when using compiles query?
load all country

GridView1.DataSource = myclas.EmployeesByManagerId(db);
this is class
static class myclas
        public static Func<Entities2, IQueryable<Country>>
              EmployeesByManagerId =
                   (Entities2 db) =>
                      from c in db.Country
                      select c);

Compiled Assembly with Framework Targeted to 3.5 will not run without Framework 4.0 installed



I'm working in VS2010, VB.Net, compiling and packaging a dll which is callled from a right click menu.  I was ordered to require .Net 4.0 as the target framework and as a prerequisite for the program, so I did and it everything worked.  A week later, a client complained, so I have to revert to requiring and targeting .Net Framework 3.5.   I went into the solution, changed the Targeted Framework, Launch Condition and Prerequisites back to 3.5.  Everything compiled fine.  

But new installs wouldn't show the right click option until .Net Framework 4 was installed too.  I've tried changing the framework target back to 3.0, 2.5 and 2.0, and reverting the vbproj back to a build where it worked, but same results.  Take a working install, uninstall 4.0 framework and it stops working.   Take a 3.5 targeted install, run the install on a clean machine, and it doesn't work.   Add the .Net Framework 4.0 and it works instantly.   Same results when a compiled dll is dropped into working installation.  (They all require 4.0, despite the selected target environment....)

Any htoughts welcome...  I'm stumped and spent all day yesterday on this.


Code in an .aspx file that has literally been commented out is being compiled anyway...Why?


A bug kept occuring in my website that was telling me a certain field/column didn't exist. It took me about 2 hours to track this bug down because it was occuring in a part of the .aspx file that I would have never even thought to look. It was occuring because of a control(ListView I believe) that had been "completely" commented out using the <!-- --> tags. The text was all green which gave me the re-assuring feeling that this code would not be included in the website. I finally decided to search my entire .aspx page for any occurences of the variable it kept insisting couldn't be "databound" and sure enough it was inside a template of a ListView control that was commented out. I changed the name of the field it kept telling me didn't exists and the bug disappeared. Im writing this question from memory so my details are somewhat sketchy but I do know one thing. It took me 2 hours to track down a bug because code that had been commented out was being compiled inside an .aspx file. So my basic question is why does this happen? Im sure this can't be a bug otherwise Microsoft would have already discovered it. Is there a configuration option I can set in Visual Studio? I couldn't find it.

How can I compare DN name with that i have compiled


What i am doing in LDAP is first i bind to our AD server and populate a listbox with user names(this is done and works)

then what i am trying to do is : using a name selected in the list box (user) find it again doing a LDAP search

when i find it i want to be able to either chenge the password or unlock the account. My first step is to be able to refind the user name buy comparing it to what the user has

selected in the list box... Here is the code:

Dim user As String

user = ListBox3.SelectedItem                                                ' this is the item returned by selection

ToolStripProgressBar1.Maximum = x

Dim users As New List(Of ADODSUser)

WorkflowDesigner and compiled Activities vs. XAML


Let's say I have an Activity that is compiled in some assembly:  MyAssembly.MyWorkflow and I have its xaml file:  MyWorkflow.xaml.  

In a rehosted designer, if I do workflowDesigner.Load("MyWorkflow.xaml"), the workflow is loaded and displayed properly, with all the activity design surfaces displayed.

However, if I do workflowDesigner.Load(new MyWorkflow()), the workflow is loaded but it is not displayed properly.  There is a single activity without a designer.

What do I have to do in order to get the second Load to have the same design time experience as the first?

mshtml on win7 x64 compiled for ANY CPU platform


Hi everyone


Our application use component 'Dynamic Html Editor' to allow user edit html text.

Our application refer to microsoft.mshtml.

When this application built in x86 mode - dynamic html editor works properly on windows 7 x64.

But now we need include other component which need application be compiled for 64 target platform. So we cannot prepare application in x86 mode any more.

So when we prepare application in Any CPU target platform, and install it on Windows 7 x64, application does not see registered dynamic html editor control and the following exception occurs:

     MESSAGE:          Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

     TYPE: System.Runtime.InteropServices.COMException

     SOURCE:           System.Windows.Forms

     STACK TRACE:     

   at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)

   at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
   at System.Windows.Fo

EXE in 32bit and DLL compiled for anyCPU


Our application is one EXE and multiple DLL's. Right now, we are compiling all of them for x86 so we are forcing 32bit because the running size of the application is a lot smaller (memory usage).

If we compile the EXE as x86 and the DLL's as anyCPU, on a 64bit machine will the DLL's be 32bit or 64bit?

the reason for my question is if i can compile the DLL's for anyCPU and then have two EXE's, one for 32bit and one for 64bit, then i have only one duplicate program for the 32 or 64 bit change, and if a user wants to run full 64bit they only need to run the 64bit EXE and everything is fine. But if a user is on a 64bit machine but wants to run in 32bit mode, they would run the 32bit EXE.

Let me know if this is true. i can't test this as i develop on a 32bit XP machine.


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