projects-and-solutions

Why is only a parameter-less Main method considered as a "valid startup object" for a C# project?

I downloaded a zip of source files containing a C# project with multiple entry points / Main methods. Since I wanted to tinker around, I created another one like this in a new type/class class MyExperiments { static void Main(String[] args) { // do something } } then I switched to project properties. ...

Should a .sln be committed to source control?

Is it a best practice to commit a .sln file to source control? When is it appropriate or inappropriate to do so? Update There were several good points made in the answers. Thanks for the responses! ...

Access the project file structure within the Visual Studio Properties property grid?

I'm making a Component that will be used in a VS drag and drop designer. One of the properties on this component needs to be the pack URI of a file within the project. I'd like to make things a little easy and, from within the property editor the PropertyGrid uses for my type's property, examine the solution, construct the Uris and pre...

Is it possible for Visual Studio 2008 Automatically create XML Comments tags without "Generate XML documentation file" checked (VB.NET only)?

When in VS 2008 if a developer hits the ''' it generates the XML comment tags for you, but this only works when the project setting for "Generate XML documentation file" is checked. Is there a way to tell VS to generate the XML Comment tags, regardless of the project setting? I think it is possible that someone may want comments but no...

ASP.net MVC project structure

Hi guys I have created the following project structure for my new asp.net mvc project any I was after some feedback as how other people are structuring their projects and if I would improve mine... Here is what I have so far: +Assets -+Images -+Scripts -+Stylesheets -+... 'More things like the above here +Controllers ...

ASP.NET files necessary for development

I am just getting started in ASP.NET and have some existing projects to maintain. I have read that ASP.NET projects include a folder called app_data, a code behind DLL, .sln project files, .proj files etc Which of these files are necessary for the continued development of a ASP.NET website? Also, are there others which are key to buil...

C# - Visual Studio 2008 capable of Conditional Compilation?

Referring to the "Configuration Manager" under the Build menu. Is there a way to comment my C# code so that the commented out code does not compile while the solution is in Debug mode, but would compile if I changed it to Release mode? Update: Judging by the answers, I should have said why I wanted this. The reason I want to have code...

How do you Setup your Unit Test Project(s) in .Net?

Can you share the way you setup your unit test projects within your .net solutions? I can imagine several possible methodologies. For example: Having a separate solution for unit tests, perfectly mirroring the structure of the original code solution being tested. Inside the original code solution, have a solution folder in which you'r...

Develop office 2007 addins under .Net V2.0 and VS2008

Hello everyone, this is a serious problem I need to handle with I need to develop office 2003 and 2007 addins, both with .Net framework v2.0 Our company uses VS2008, which only allows developing 2007 addins under .Net v3.5 Does anyone knows of a way for creating 2007 addins unser .net frameworj v2.0? (**Using visual studio 2005 is no...

is it possible to generate Visual Studio solution files using StylusStudio?

Hello, i was wondering if it is possible to generate some kind of template that i give an xml or xsl file in stylus and generate c# code i made some .cs and works fine, but i couldn't with csproj and sln files, so, thats why i am asking i used to program dlls on c# is a n-tier programming ...

VS setup projects custom parameters

Hi I've created a Visual Studio Setup project which generates a .msi file that installs a windows service. That worked perfectly fine. It also asks for the user/pwd for the windows service identity during the installation process. My problem came up later. I was modifying the setup project to ask for more information to the user so I ca...

Creating same method in more than one aspx files.

I have a method which I have to use in two aspx pages. This method calls method in Data Access Layer. This method is 35 lines long. This method is not using any UI element. Structure of my project is like this. Solution MyProject - BaseWeb - CommonLib - DataAccessLayer My Data Access Layer is generated from LLBLGen Pro (an O/R map...

Should .Net test classes reside in a different project?

The convention in Java is different - every "module" (equivalent to Java in IntelliJ) has a src and test directory. jUnit can thus run per project, and there's no need for a separate test project. ...

Visual Studio: How to make one solution depend on another?

Is it possible to make a solution in VS depend on (i.e. include) an entire other solution? I've seen some stuff about "Solution Folders", but these don't seem to be the same thing....? Thanks! (BTW, I'm using VS 2008) ...

Open a VS 2005 Solution File (.sln) into memory

I would like to open into memory an existing .sln file. Example of a non-working method: private Solution2 OpenSolution(string filePath) { Solution2 sln; sln.Open(filePath); return sln; } If I have an instance of Solution2 then i can call the method Open; but how can i get an instance of Solution2? My goal is then to get...

Web Service Project vs Web Site with .asmx file: differences and worth upgrading?

Consider 2 scenarios where we want to host a .NET web service. Nothing too fancy, simple data types back and forth. They both reference out to an assembly to perform the complex business logic & data access. The project would have a couple .asmx files each with a couple methods apiece. Web Service Project When Visual Studio creates th...

Should I embed CSS/JavaScript files in a web application?

I've recently started embedding JavaScript and CSS files into our common library DLLs to make deployment and versioning a lot simpler. I was just wondering if there is any reason one might want to do the same thing with a web application, or if it's always best to just leave them as regular files in the web application, and only use embe...

How to design my solution

Hello, I am writing a web application which will include several parts - interactive calendar, todo list, managing finances,... How should I design my solution? I thought something like this: each part has 3 projects (main project, DAL, BLL). So in my case I would have 9 projects in my solution: List item Calendar CalendarDAL Calen...

How do I best organize a Visual Studio 2008 + Qt Codebase?

I have a legacy MFC app I am building in VS2008 with both x86 and x64 builds. I'm trying to add Qt support to it so I can innovate more quickly in the UI. It appears Qt has a large number of compile options that I may want to tweak specifically for my app (not source code changes...I want to be LGPL and generate the normal QtCore4.dll,...

How do I reference one VC++ project from another in the same project?

Hi, I am new to Visual Studio. Need your help with the following. Visual Studio 2005, VC++ 1 solution has 2 projects. Lets call the solution as 'solution' Project 1 is named 'p1' and project 2 is called 'p2' Do I need to export functions and classes from 'p1' so that I can use them by importing in 'p2'? What if I simply include the head...