visual-studio-2010

Compiling an IronPython WPF project to exe

What is the best way to pack up an IronPython application for deployment? After scouring the web the best thing I've come up with (and what I'm currently doing) is using clr.CompileModules() to glue together my entire project's .py files into one .dll, and then having a single run.py do this to run the dll: import clr clr.AddReference(...

asp.net MVC "Add View" wizard won't pre-populate fields when using a ViewModel

In VS 2010, When you use the "Add View" wizard to create an Edit view with a strongly typed view, such as Models.Person, the template generates all of Person fields for you. If you use a view model instead, like this: public class PersonVM { public Person person; public List<Team> TeamList = new TeamServices().TeamPickList(); ...

Visual Studio 2010 - LINK : fatal error LNK1181: cannot open input file " ■/.obj"

I have VS 2010 on Windows 7. I create a new project, chose c++ language, Win32 project, DLL, Export symbols, then finish. Now when I compile the project without any changes to what VS generates, I get... LINK : fatal error LNK1181: cannot open input file " ■/.obj" I also have VS 2008 install on the same machine. I follow the same st...

What T4 editing tools exist?

I don't use T4 templates often; usually when I do it is editing those of other projects (specifically SubSonic & T4MVC). The experience is always quite unpleasant (and this is certainly why I don't use them more often). These are the tools I know of, and neither of them quite fit the bill. Clarius Visual T4. Does not support Visual...

Rename Web Role in VS 2010 Cloud Service Project

I just started using VS 2010 to create a Cloud Service (HealthTracker), and I attached a MVC2 web project to it. When I hit Debug, the dev fabric was started and I was able to navigate my web app on my machine as expected. I decided MVCWebRole2 was a bad name for my web app, so I renamed it to HealthTrackerMVC. I used Refactor --> Ren...

Examine the ViewState object

How can you examine what's in the ViewState for a control/page? When I try to look at the object in the debugger, the keys, the values, the Non-public members are all "turtles all the way down". ...

VS 2010 Custom Classification Format Using VS Pre-Defined Fonts and Colors

I am trying to add some basic syntax highlighting for a new content type in Visual Studio 2010. I am starting with using the Ook Language sample from Microsoft along with a number of channel 9 VSX videos. I do have a working prototype setting the formatting for each tag in the ClassificationFormatDefinition for it just like the Ook pro...

.NET, ASP.NET, SQL Server - Have interview - Looking for free online material

I have an interview with a test, and I need to fresh up ASP.NET/SQL Server/.NET - (which I mostly know well, though there is stuff I haven't done fore some time, and there are basic things I have never done). What I learn best from - and what is difficult to find with programming, is material organized like mathematics text, where you c...

Drag and Drop In WPF C#

following is my code for drag and drop in wpf. i used the same code in windowform for drag and drop images but i does not seem to work for wpf Can you help ? <Image Height="464" Name="PictureBox" Stretch="Uniform" Width="769" AllowDrop="True" DragEnter="PictureBox_DragEnter" Drop="PictureBox_Drop" /> private void PictureBox_Dra...

VS2010 - option missing

In VS 2008 there is a very useful feature of background HTML validation - it checks if CSS class name is valid i.e. it exists in one of the linked CSS files. It protects against spelling errors which are not easy to discover otherwise. But VS 2010 Express does not do that any more. And the relevant setting "Options->Text Editor->HTML->Va...

How to downgrade from SQL Server Express 2008 to SQL Server Express 2005?

Hi friends, I was using Visual Studio 2008, and I use service based database, then one day I installed Visual Studio C# Express 2010, which automatically upgraded my SQL Server the 2008 Express edition. But I want to use Visual Studio 2008, but it does not support SQL Server 2008. So, please give me the method to downgrade from SQL Ser...

How to add a path of runtime DLL in VIsual C++ Express 2010 project?

I have some external dependencies to load with my C++ program, like boost or other libraries. If those .DLL of libraries are not in $PATH, once I run my program I got a "can't load the DLL" error message. To make those .DLL can be load when running my program, I need to add those path to libraries directory. For example: PATH=$PATH;c:\...

Polymorphism broken when changing web site project to web application project

Greetings, I just converted an ASP.NET Web Site Project to a Web Application Project in VS 2010. After I run the application though it seems that my class polymorphism broke. I don't have a clue as to why this could occur. So in the following code when I call base.OnLoad(e) I am getting errors in the base class because the variable m...

How do I prevent IVsBuildPropertyStorage.SetItemAttribute from escaping special characters?

I am working on a Visual Studio 2010 extension and I want to add an attribute to an MSBuild Item, as follows: <EmbeddedResource Include="SomeFile.xml"> <FooAttribute>%(Filename)%(Extension)</FooAttribute> </EmbeddedResource> So, far the only way I found is using the method IVsBuildPropertyStorage.SetItemAttribute . This works ...

Performing a type of union of two IEnumerable collections

Let's say you have two collections of integers: IEnumerable<int> col1=new List<int> {2,3,3,5,7,11,11,11,13}; IEnumerable<int> col2=new List<int> {5,7,7,7,11,19}; Now I would like to create a third collection, col3, such that for every distinct element that appears in either col1 or col2, col3 will contain that element with at least as...

How do I change the size of a group in the Ribbon Designer?

I'm designing a ribbon in Visual Studio 2010 and I have reached a problem, that I really don't get. As the title says, how do I change the size of a group? There are no visual way to change the default size and it seems to auto-size when being used instead. My main problem is that I want to position the button labeled "test" to the rig...

MSpec in Visual Studio 2010 still does not work properly

Someone asked a similar question before, getting the following error when I run MSpec in Visual Studio 2010: Could not load file or assembly 'Machine.Specifications.dll' or one of its dependencies. The system cannot find the file specified. The solution in the other post was to download the .net4 specific version of MSpec. But, that'...

Visual Studio Setup Project Localization of System Controls

I'm trying to create a Setup using Visual Studio Setup Project. A mistake, but there's legacy work to consider here. Generally speaking, these projects do not support localization. However, almost all the Setups I've seen have some basic localization i.e., controls such as the Next button show the localized text. My setup project shows...

Can't see params while stepping through .NET 4.0 source in C#/VS2010

As I step into .NET source (.NET source stepping is enabled in Debugging Options and Just my Code is disabled), for some reason in the Autos and Watch windows in VS2010, I can't view parameters in .NET framework functions in the watch or autos panes. I can see local variables however. Why is this? Update: This is a debug 64-bit (x64) bu...

<functional> (nested bind) problems with MSVC 2010

I have the following code (I'm sorry for the lengthiness): double primeValue( const func1D &func, const double lowerBound, const double upperBound, const double pole ) { // check bounds if( lowerBound >= upperBound ) throw runtime_error( "lowerBound must be smaller than upperBound!" ...