visual-studio

xml and strongly-typed datasets with the dataset designer

I'm not sure if this is possible but here is what I want to do: I have created a strongly-typed dataset, StrTypDS using the dataset designer in Visual Studio. I have also created an blank xml file and added it to my project as a Resource so that it can be accessed through Properties.Resources.xmlData. The what I would like to do is read ...

Why am I getting error LNK2001 when linking to zlib.lib?

I'm working on a project that already contains the gzip library as follows: zlib\zlib.h zlib\zlib.lib zlib\zconf.h I would like to use the gzip functions from this .lib but am getting the following errors: Compress.cpp Linking... Compress.obj : error LNK2001: unresolved external symbol _gzclose Compress.obj : error LNK2001: unr...

Is a solution with hundreds of projects dangerous or just unwieldy?

our main client solution has 111 projects. When I first started on this team I was surprised (and alarmed) that we had so many projects and recommended consolidating the tiers into less but larger assemblies. our structure has models (DTOs) with nhibernate mapping files, and WCF services tier with data controller calls, some framework ...

aspx.designer.cs how does it work?

Hi everyone, I'm a really beginner so my question may be appear ridiculous.. But, i wonder how the files .aspx.designer.cs works.. It's the first time i work with a solution containing files .aspx.designer.cs for each pages. So i understand it's declaration of controls used in the .aspx for code-behind.. Here is my questions: Why some...

How do I use less CPU with loops?

Hi, I've got a loop that looks like this: while (elapsedTime < refreshRate) { timer.stopTimer(); elapsedTime=timer.getElapsedTime(); } I read something similar to this elsewhere (http://stackoverflow.com/questions/1222574/c-main-loop-without-100-cpu), but this loop is running a high resolution timer that must be accurate. So ...

Databinding in WPF (C#)

Hello, sorry for any inconveniece caused. Would like to ask about database or rather databinding My Window look like this: http://i25.tinypic.com/a0x5kn.jpg The browse button is look up the "My Network Place" private void browseBtn_Click(object sender, RoutedEventArgs e) { FolderBrowserDialog dialog = new FolderBrowserDialog(); Ty...

How to use Mercurial from Visual Studio 2010?

Version Control noob alert I've already installed both Mercurial, TortoiseHg and VisualHG into Visual Studio 2010. I've set in Visual Studio my source control to Mercurial. When I right click on my solution, I already see HG's buttons in the context menu that appears there. My question now is, how do I make this version control thing...

How to send Crystal Reports server and path parameters?

I'm working in Visual Studio C# and want to make reports with Crystal Reports, but this software will be installed in another computer, so my question is how I can send as a parameter the local server name and the path where the file .rpt will be located to the Crystal Report so the application would be generate the report in any compute...

Viewing cl.exe response file

Visual Studio (2005/2008/2010) appears to create a response file containing flags for the C/C++ compiler, cl.exe. As soon as compilation finishes, the response file is deleted. Is there a way to force Visual Studio not to delete the response file? Is there some other way to view the contents of the response file? ...

VS2010 C code - String pooling

Hi, Below code crash in VS 2010 when you compile with following flag and if you add /GF- or remove the opimization flag they don't crash. The crash occur at assembly code which translate 'if( path[i] == '/' )'. I like to understand the optimization that compiler does here and lead to crash. Looking forward for some pointers. -Karthik ...

CrystalReports Viewer object is not available

I'm creating a local application in C# with Crystal Reports, in the design part is all ok, but when I want to use the tool Crystal Reports Viewer it is not available in the toolbox window, how I can turn it available to use it? ...

Visual Studio 2008 ASMX files

This is not technically a programming question but it does specifically relate to a heavily used programming tool so i think this is the correct place for it. In Visual Studio 2008 if i have an asmx web service and i double click on the asmx file it opens the asmx.cs file, this is eminently sensible seens as there is just a single line ...

Viewing variable values at runtime in VisualStudio

Hello, Is there any tool I can use to view the values of variables live as the code executes in VS? Right now I can see them only when I keep a breakpoint.But,the problem is that the code works perfectly fine when I keep a breakpoint.it messes up only when it runs fast. Any help would be appreciated. Thanks ...

How to convert hash data to original data?

I hashed data with ComputeHash how can I learn original data from hashed data? private void btn_Hash_Click(object sender, EventArgs e) { HashAlgorithm ha = HashAlgorithm.Create(); Stream file = new FileStream(@"C:\temp\simetrik.txt", FileMode.Open, FileAccess.Read); hashClass.hash = ha.ComputeHash(file); listBox1.Items....

Concat Columns with NULL-values

I want to concat two Columns in the TableAdapter Wizard of the VS Dataset-Designer. The problem is that one column has NULL-Values and hence the concatination results in NULL regardless of the value of the other column. I've found out that i must SET CONCAT_NULL_YIELDS_NULL OFF, which is a Database option. How can i change this setting ...

Entity framework: How can I use more then one context and stay synchronized?

Hi, I'm new with EntityFramework. My application has a pool of context object instances (Each context has 1 connection to the DB). The problem is that when I update an object (and calling SaveChanges), the data is updated in the DB and in the updating context but when I select from other instance, it gets the old data of the selected ...

Entity framework: How can I get the new object id (generated by DB sequence)

Hi, I have table with sequence and trigger so it creates new id when inserting it to the DB. How can I get the new object id, before calling SaveChanges()? I need this id for the links between the new object and other objects. I want to do it before calling SaveChanges because I want to have the option to rollback. Can someone solve...

Prevent recompilation of oaidl.idl and ocidl.idl

I have a COM/ATL project with a number of IDL files. Most of these IDL files import oaidl.idl and ocidl.idl. Whenever I compile my project, Visual Studio calls MIDL to recompile oaidl.idl and ocidl.idl... every single time it encounters the imports. These two IDL files end up getting recompiled multiple times, making project compilation...

Visual Studio - Extension to manage loaded and unloaded projects

I'm pretty sure I've seen a visual studio extension that allowed to manage loaded and unloaded projects in a solution. For example you could create a group X that would contain projects A and C and a group Y that would contain projects B and C. When selecting a group, it would load/unload the appropriate projects. Did I dream that t...

Can I make Visual Studio create the Debug DLL as XXXd.DLL instead of XXX.DLL ?

I have found a solution for this, but it only works if you use .DEF files (I don't). I wonder if this can be done without .DEF files. ...