visual-studio

A way How to Compile C library into .Net dll ?

Can we compile C library as .Net dll (containing and opening access to all C libs functions) by just compiling cpp project containing code like extern "C" { #include <library.h> } with /clr:pure argument with VS? (VS10) Or we should do something more trickey? ...

What to do with "This application has failed to start because myproject.dll was not found." error

Hi, I have a project A linked to a project B. B is compiled into a .dll while A is the main program and compiled into a .exe The compiling of the projects is done without any issues, but when I run the program, I get a pop-up window saying "This application has failed to start because B.dll was not found. Re-installing the application...

Include and Execute EXE in C# Command Line App

Hey all, So I found a great little EXE command line app (we'll call it program.exe) that outputs some data I would like to manipulate with C#. I was wondering if there was a way to "package" program.exe into my visual studio project file, so that I could hand my compiled application to a co-worker without having to send them program.ex...

View what methods/functions return a specific object in Visual Studio

I'm making a C# application in Visual Studio and am wondering if there is any way to view every method that returns a specific type? For example, I want to know which methods return an "AsymmetricAlgorithm" object. ...

VS2010 Locking up my keyboard (or at least parts of it)

I am having a problem with VS2010 randomly disabling certain keys like my arrow and backspace keys when editing files in stored in VSS. It seemed to have just started happening the other day, but simply restarting VS would fix the problem and it may come back a day or two later. Now I restart and it lasts maybe 10 minutes or until I op...

How does Visual Studio determine the order to compile IDL files?

I have a COM project that contains a number of IDL files, some of which are imported into other ones. How does Visual Studio decide which ones to compile (using MIDL) first? I want to control the order. I have a master IDL file which contains my library declaration with several imports, and I get a build error if it is not the first one...

Including extra libraries on the link line

When linking an executable, if it does not make reference to any of the symbols in one of the DLLs on the link line, will it still depend on that DLL at runtime? To make the question concrete, suppose I am building an application from Visual Studio project foo. Under Project Properties > Linker > Input > Additional Dependencies I have ...

Visual Studio - Is there any way to make the "Output" and "Error List" windows not appear after a debugging session?

It just occurred to me, after years of closing these two windows after a debugging session, that there may be a way to turn them off. I generally have the output window open while debugging and only check the error list periodically for warnings, and can always get to them if I want them anyway. Hoping someone else may know of a way to...

Visual Studio is not stopping on breakpoints after I installed Intel Parallel Studio ...

Hi, I installed Intel Parallel Studio v1.0, and now Visual Studio 2008 is not stopping on breakpoints. I can set them, but it skips right over them, and never breaks. Any ideas? ...

VS2010 takes 5 seconds to simply open any XAML files (!)

Visual Studio 2010 - release - takes about 5 seconds to open a xaml file. It does it on some machine, not all of them! .cs files open instantly. It only happens to XAML. We tried the following, unsuccessful: Run VS as Administrator import user settings from a machine that didn't have the problem clear the borked registry using cclea...

Stop xsd.exe from auto generate c++ header file from xsd schema

I am using Visual Studio 2008. I have xml files and corresponding xml schemas for validation. When I modify any of schema files and save it VS automatically generate a header file,*.dll files and some garbage from it. But I don't want this. How can I stop this behaviour? ...

How to solve warning "Referenced assembly targets a different processor than the application"

I have been able to build my windows form application that access databases in SQL Server. All parts of the application are able to access the server apart from the part where one can back up/restore a database. In this part I can not access the databases on the server and have come to believe it is because of these warnings. What do the...

How to debug AccessViolationException coming from native code

I'm writing managed code, and I'm using managed bindings (qt4dotnet) for an unmanaged library (Qt). Now and then, I get an AccessViolationException coming somewhere from Qt, but I don't know how to debug that. I don't even get a stacktrace further than the managed/unmanaged boundary (meaning I don't know what part of Qt crashed on me). ...

How do I register a DbProvideFactory?

I am trying to create a new ADO.NET connection string using the 'Add Connection' dialog. I click the 'Change' button to change the selected 'Data Source' but can't see the desired data source in the list of registered data sources. Now, I know I need to update the machine.config file 'DbProviderFactories' element with the appropriate e...

Unit testing WaitHandler.WaitAll

Is there a way to unit test WaitHandle.WaitAll() when using Visual Studio's built-in unit testing solution. When I try and run a test that uses this function within Visual Studio the test fails and when examining the test results the following error is displayed: WaitAll for multiple handles on a STA thread is not supported I'd like...

GetPublishingPage stops responding, just hangs and doesn't throw an exception

I'm running some code to get a publishing page at a certain url. In some cases the page will exist and in most it won't. Sometimes when the page doesn't exist, the following line of code just sits there being executed: PublishingPage pubPage = pubWeb.GetPublishingPage("http://some/long/url.aspx"); There is no exception being thrown ...

Visual Studio 2010 is Eating My DLLs! - referenced third party dlls missing after build

Please help I am pulling my hair out over this: I have a Visual Studio ASP.NET MVC solution in which a project references a third party DLL, log4net in this case. My solution tree is as follows: GenericLibrary MyApp.NHibernate MyApp.Library MyApp.WebUI MyApp.WebUI is the main start-up MVC web project and has references to GenericLib...

How can i add data programatically in linqqtosql?

i dislike below methods. Because more fields (suchas 150 fields) it is not good method. There is any SetValue method to add datato sql linqtosql for submitchanges? MyClass c = new MyClass (); c.FirstField = "bvnvb"; c....... c... c... // Too many rows there is... ...

Strange debugger problem?

I have created this datastructure: class Event { public: Event(EVENT_TYPE type, void* pSender = 0, int content1 = 0, int content2 = 0, int content3 = 0, int content4 = 0); ~Event(void); // ... some functions protected: EVENT_TYPE itsType; void* itsPointerToSender; int itsContent_1; int itsContent_2; ...

How do you make Visual Studio run assembly files (dependencies) from the bin?

I have a solution made up of multiple projects which have various dependencies on each other. When I build the project/solution, it creates the DLL assembly files in the Project\bin folder(s) as it should. But when I run the program, it copies everything to the temporary files folder and runs it from there: C:\WINDOWS\Microsoft.NET...