Visual studio 2010 automatically change project type - visual-studio-2010

Does anybody know why VS 10 change himself project type from Web Appliacation to Web Site when this project is downloaded from Team Foundation Server?

Sounds like someone has changed the application and checked it in that way...
Visual Studio won't change the project type on it's own.

Project type is stored in the project file, not in the solution file. Do a TFS compare (or view the history) on the project file to see if that was changed.
For C# project files the extension is .csproj
This site says "web applications" have a .csproj or .vbproj , but that a "website project" will not have a project file (http://msdn.microsoft.com/en-us/library/dd547590.aspx). If the Web Application project was blasted away, and a web site created in its place, it may be difficult to track down when the change happened.

Related

Visual Studio 2012 Business Intelligence SSIS packages missing

I have Visual Studio 2012 solution with multiple BI projects. One of the SSIS projects do not show all the ssis packages in the Solution Explorer (checked in by another teammember). But the missing files are in the TFS (Source Control Explorer) and are visible in the physical folder.
I tried "Show all files" did not work.
I tried adding the file again but the project does not allow that saying "file with same name exists".
Any idea what is going on here
The authoritative source of what's in a project is going to be the ProjectName.dtproj file.
Inside of that will be entries for the packages that comprise the project. For a non-package deployment model, it's trivial to edit the file by hand and make your stuff show up.
It's way too much effort to do that by hand for a 2012+ project deployment model. Open the Project in Visual Studio (ssdt/bids) and right click on the project. Click Add Existing Item (not add package) and then click the "missing" package. Check your .dtproj file in and all is right with the world.
I had the same issue in 2020, I managed to solve it by building the solution.
On the menu select Build-> Build Solution OR Ctrl+Shift+B

copying the visual studio settings for one project to another

I have a visual studio 2010 project done in VB.net and i have around 45 variables in the application settings. The one you set in the properties.settings. Now i m having a similar project and i wanna copy the settings variables to this project. Not sure how to proceed with this.
what i did is tried to copy the auto generated code for the settings into that project and it didnt work out well. I am not even sure how to google this out and tried the following.
copying application settings from one project to another in visual studio
moving application settings between visual studio projects
Both of this didnt get what i wanted and am actually out of clue on what to search for this.
So is there a way to directly copy the settings from one project to another project.
All I did was grab the physical Settings.Designer.vb and Settings.settings files found in the "My Project" folder of your applicaton (assuming it's a windows App and not web) and copied/replaced the existing settings files in the new project.
Did a rebuild of new project and errors kicked back but that was just the desinger code referencing the old project name. Corrected by replacing the old project name with the new one and voila, worked.
HTH
Dave

Precompile a asp.net4 mvc3 website using visual studio 2010

What is the best way to pre-compile a asp.net4 mvc3 website with all its view files using visual studio 2010?
I'm a little confused because MS provides multiple solutions that sound very similar.
Web Deployment Projects
http://blogs.msdn.com/b/webdevtools/archive/2010/05/26/visual-studio-2010-web-deployment-projects-rtw-available-now.aspx
Web Deployment Tool
http://www.microsoft.com/download/en/details.aspx?id=25230
or can I just do all this from the default VS2010 SP1 without additional addons?
Can someone clarify?
When you build or publish your project, the website is already compiled. Only the views are dynamically compiled. If you want your views to be compiled also, you can edit your web project file. Change this line:
<MvcBuildViews>false</MvcBuildViews>
to:
<MvcBuildViews>true</MvcBuildViews>
To be able to edit the project file within visual studio you have to unload the project first (right-click, Unload Project) and then right click the project again and choose Edit Project.
When you made the change, your views will be automatically be build also.
This is not something you want to do during development, build time significantly increases.

Sharing VS 2010 One-Click Web Publishing Settings

Anybody know where the VS 2010 One-Click Web Publishing settings are stored?
It would be awesome it a team could share the settings so a quick deployment to a test system is always a button click away.
It's stored in the same project directory as the project you've deployed, stored as an XML file. Look for a *.Publish.xml

Visual Studio opens upgraded web application as a web site

I recently upgraded a 1.1 web project to a 2.0 web application. After going through the upgrade wizard and performing the "upgrade to web application" operation, everything looked fine. After closing and reopening Visual Studio, however, it insisted on treating the project as a web site, not a web application, and the "upgrade to web application" option was missing. I understand pretty well the differences between the two project types, but does anyone have a clear understanding of the differences in the csproj/sln/etc. files that tell Visual Studio what type of project it is?
Answering my own question:
I found some information here: http://hamang.net/2008/11/03/bug-vs-2008-web-application-project-opened-as-web-site/
The article is about VS 2008, but the information seems relevant to 2005, and the solution described worked.
Summarized: The .sln file has a "Project" node that in a web site project points to the project's folder, but in a web application project points to the .csproj/.vbproj file itself. Additionally, there may be a .webinfo file, which contains Visual Studio path information for the project; removing this file solved the problem.
I've found plenty of tutorials on upgrading, but little information on the details of how Visual Studio "understands" the type of project. If anyone has more information on the specifics (what is the .webinfo file for?), it would be much appreciated.

Resources