I need to combine a VB web project and a C# web project and have them run alongside each other in the same web root. For instance, I need to be able to navigate to localhost:1234/vbProjPage.aspx and then redirect to localhost:1234/cSharpProjPage.aspx. Is this possible from within Visual Studio 2008?
I know you have the ability to create a web site and throw everything into the root, but it would be best in this scenario to keep each project separate from each other.
UPDATE: To answer Wes' question, it is possible but not desirable to change paths like that (/vb/vbPage.aspx & /cs/csPage.aspx)
UPDATE: Travis suggested using sub-web projects. This link explains how to do it but the solution involves putting a project inside of a project, that is exactly what I am trying to avoid. I need the projects physically separated.
You can do this using sub-web projects. This has been available in Visual Studio since 2005 and works with the Web Application Project style of web site. ScottGu has a great blog entry describing the process. You may face some interesting challenges getting pages to commingle in the same folder, but the sub-web project structure should still lend you some ideas.
I don't think you'll be able to have two seperate projects but intermixing them within one project isn't a problem. You could always organize the files into folder to keep things seperate if you felt the need.
Just out of curiosity, would changing your url paths be out of the question? Instead of 1234/vbpage and 1234/cspage how about something like 1234/vb/page and 1234/cs/page ? I know you said same web root, but I'm just curious :)
you could use URL re-writting with a filter to look for "cs" or "vb" at the begining of each file and direct it to the appropriate directory.
Related
How do I mount a build that has a basic web design and replicates to other projects?
I do not want replicate the basic things manually that are in common use in other projects, such as the menu, layout pattern, etc ...
I'm a few days researching solutions to this problem, but find little reference.!
Image Sample!!!
Why don't you create a Nuget package with content references
Have a look here: http://docs.nuget.org/docs/reference/nuspec-reference scroll down to the content file section for details on how to do that. This way you can keep a packaged version of your common files, if you upgrade them then you only need to upgrade the Nuget package in your solution and presto.
With the help of Etienne I managed to create a NuGetFeed site local and found this reference http://docs.nuget.org/docs/reference/package-restore-with-team-build but still do not know create packages with my base project.
I'll keep searching if they let me know news
I have many projects that I want to build using TFS Build. I have no problems with Windows Forms and WebForms PROJECTS.
But when I try to use TFS Build to build ASP.NET Website (the classic one), I have these problems:
I don't have any options to compile the project with Test Configuration (only Debug or Release).
I can't build an ASP.NET website because it's not a Web Project.
I want to know if there's a way to publish the website's precompiled files to the same shared location where I have my other projects.
I think I might need a bit more detail here, or maybe I'm just clueless :-)
Test configuration - I'm assuming you've set up a Test build configuration? If so, I'm not sure off the top of my head what's going on, but I've seen people forget to create the build configuration.
We've had no problem with our Websites, they get moved to build output or to wherever you specify in the Website properties pages
If you mean you want to use WebDeploy to publish, you're out of luck for the website - only web projects will do that. But do a little team build customization, and you should be able to emulate that.
Not super satisfied with my answer, but hopefully I've pointed you towards something helpful...
So I have a solution which contains 4 projects, a "Core" Project which is the actual application (as a class library), and 3 wrapper projects, "Console", "WinForm" and "Service" which basically wraps a Facade class in the core class and contains various settings to handle different logging strategies for each different application (Console/Trace/File) and launch the application as either a Console, WinForms or Service, depending on how the customer wishes to deploy the application.
In the Core project I have 3 resource files which contain simple template views for the Nancy web framework. However the way Nancy looks for these views are on the current path. Since the files in the Core project aren't on the current path for any of the 3 other projects I need a simple way to access these files across projects.
Somewhat naively I thought this was where the concept of a "Solution" came in, to handle dependencies between projects. However by searching the Internet, much to my surprise, it appears there is no elegant way to do this. The only two solutions I've been able to find involves copying the files to a scratch/temporary or directory in the solution, and copying them to the respective needed directories later, as post build actions, and Adding an item manually using "Add as Link". Now while both these solutions technically work, the first leaves (possibly out-of-date) build artefacts lying about where they don't really belong (IMHO), and the second is tedious, time-consuming and prone to human error (because you can't just link to a directory).
Are these really my only two options, or is there some third, totally obvious way I've just missed because I'm new to Visual Studio?
You could use a custom IRootPathProvider in Nancy, if the only things you need are Nancy specific.
The other option is to link a folder - you can do this, but it involves manually hacking on the csproj file, there's a few questions on here about it, including this one:
Visual Studio Linked Files Directory Structure
Nuget is a package management system, that I have used to share artifacts between projects as dependencies. You could include libraries available via nuget.org or have your own nuget packages defined.
Teamcity has got good support for generating nuget packages with every build and can serve as a Nuget server.
Here is a reference to include files into a nuget package.
I have recently been tasked with updating a system done in C#. I am coming from a Kohana MVC web based development but have experience in C#.
Problem is: My solution is in some 'weird' namind convention. I would like to know what it could be and how to load the solution in VS 2010 Ultimate.
MySolution.BusinessLogic
MySolution.Common
MySolution.Contracts
MySolution.DataAccess
MySolution.DatabaseInstaller
MySolution.Entities
MySolution.Reporting
MySolution.UI
MySolution.UIControls
How does this work? Do I need to edit each folder separately or there is a way to load the whole solution in my developer IDE?
There should be a .sln solution file, probably in the project root folder. That is typically what you would open in Visual Studio. You can open individual project files (.csproj), but its much easier/better to work with a solution that contains all required projects.
I have a VS2003 solution with 21 ASP.NET 1.1 projects in it. My goal is to eventually migrate them to 2.0 and then 4.0. There are mainly internal admin apps for different departments.
I want to create a multi-project solution now in VS2010 and migrate/re-code these one at a time in ASP.NET 4.0 Web Forms in VS2010. There will be some artifacts common to all projects such as CSS, scripts and images. Could the use of Resources help with the common files and would it be possible to have a single master page for all projects?
What are the best options for creating a multi-project solution here?
From what I understand, your goal is to share resources like CSS, JS files across projects. One way to do it would be to use linked files in Visual Studio. We do it extensively in one of our solutions where we share many class files and signing keys acorss projects. Linking files basically involves putting the files in one project in the solution and then linking to them from other projects of the solution.
You have to be a little careful though during deployment of projects containing linked files as linking the file does not physically copy the file to the destination project. So even if your project has a css folder, the linked file shown under that folder in VS is not physically there in the directory structure on the disk . If you link classes, the dll for the project that has the linked class file will include the linked class, but for resource files like css, JS and common masterpage, they will not be copied over when you deploy. You can leverage build scripts or some simple batch files to handle those issues. This should solve your problem.
Why not just convert them directly to .NET 4.0?
Beware when you move them to .NET 2.0 that the default project type in Visual Studio 2005 changed from the type of project you're used to in VS2003 to "web site" projects. But with Visual Studio 2010, you've got the same Web Application Project you're accustomed to, so why not just go there directly?
Also, be aware that VS2010 can target .NET 2.0 applications, so there's really no reason to stop there.