Unlike previous versions, Visual Studio 2015 places build-related files in a .vs folder alongside your solution. By default, that includes a new applicationHost.config for web applications.
As stated here, You can edit the web application .csproj/.vbproj file to include <UseGlobalApplicationHostFile>True</UseGlobalApplicationHostFile>, and then it will continue to use %userprofile%\My Documents\IISExpress\config\ApplicationHost.config
But I don't want to change every web application project file. So is there a "template" for the new applicationHost.config that Visual Studio / IIS Express creates?
You can edit the template that Visual Studio uses at %ProgramFiles(x86)%\IIS Express\config\templates\PersonalWebServer\applicationhost.config
Related
I have a open source project that include Visual Studio project files. There is a solution file with four projects files. When the source files are distributed and unpacked, Visual Studio picks the wrong project as the default project. New users don't know they need to right click a certain project, and then select Set as Startup Project.
I've tried re-ordering the projects in the solution file so the appropriate project is first, and I tried changing the UUID on the appropriate project so its the lowest. Neither have helped with the problem of Visual Studio selecting the wrong startup project.
The Visual Studio versions I test against are Visual Studio 2005, 2008, 2010, 2012, 2013 and 2015.
What determines the default startup project?
What can I do to ensure Visual Studio selects the correct startup project?
A related question is Why is “Set as Startup” option stored in the suo file and not the sln file?, but it asks "Why..." and does not ask "How To...".
If there is a *.suo file, the Startup Project is saved there.
Otherwise, the first project listed in the *.sln file will be the Startup.
(tested with VS 2013)
I noticed that when you open a solution in VS 2013 Express which contains solution folders, they load properly and the solutions builds properly. Unlike the express versions of Visual Studio 2010 which showed error messages when the solution loaded.
Here's a screenshot of the AvalonDock solution which is open in Visual Studio 2013 Express:
Since Visual Studio 2013 Express can clearly use solution folders, my question is: How do you (if you can at all) create one?
Whether it is a straightforward way from inside Visual Studio or a "hacky" way (for example) of manipulating the .sln file.
To create a new solution folder in VS2013 Express...
Open your solution file in a text editor. Add the Project line to the top of the file. If you want to add more than one then you'll have to invent some new GUIDs.
Open in VS2013, you can now rename, drag/drop projects into it etc.
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "New Folder", "New Folder", " {765E7B51-3482-4523-AE2F-6299401EDD0B}"
EndProject
.
.
.
Select Solution and press Ctrl+Shift+A. Then create text file. Text file will be placed at new folder "Solution Files",
Then delete text file and rename folder.
=)
Alternatively, the Visual Studio Express 2013 Web fully supports this. If you don't want to mess around with the solution file, you can open the solution using the Web version and add the folder from there.
I don't know why the Web version supports it but not the Desktop
I've inherited a SharePoint 2010 project that was originally created in another environment using a different version of Visual Studio (2012). My issue is that the .g.cs files for some WebParts are not being [re-]generated when I make changes to the .ascx files. I know that for regular .aspx pages, you can right-click and choose "Convert to Web Application" to force generation of the designer files. Is there something similar for WebParts?
I've already tried deleting the bin\ and obj\ directories in the project, cleaning and rebuilding (both the solution and the project), as well as trying to re-create the WebPart from scratch.
Wrote about workaround here: http://sadomovalex.blogspot.com/2013/08/fix-bug-in-visual-studio-2012-with.html. You need to specify url of correct Sharepoint site on local dev environment in "Site URL" property of your project.
It seems that it's an issue from going between Visual Studio 2010 and 2012. On the 2012 box the .g.cs files are regenerated and updated fine but the 2010 box refuses to do so.
Correction: SharePointWebPartCodeGenerator wasn't being found. After re-installing the Visual Studio 2010 SharePoint Power Tools, the .g.cs files were being updated.
I searched forever for a fix and installing the 2010 SharePoint Power Tools solution fixed the issue! The solution I was working on must have been a 2012 Sandbox solution.
I have a mvc4 project which has four solution configurations and a transform web.config file for each. I need to be able to change config and have the transforms applied so I can debug in Visual Studio 2010.
I can do this easily with console applications as they are compiled into a bin folder and the configs applied but unfortunately not with the mvc app.
Any thoughts?
Iam using visual studio 2010. i have developed one web application. my iis application pool was set to 3.5 only. when i deployed my app on iis it is showing target framework=4.0 error.
can any one tell me how to deploy my visual studio 2010 web project to run under dotnet framework 3.5?
open project files (.sln and .csproj) files in notepad and find the following lines(1st line) and replace with second line, you will convert your application to vs2008 successfully
TargetFrameworkMoniker = ".NETFramework,Version=v2.0"
TargetFramework = "3.5"
Visual Studio 2010
Visual Studio 2008
Microsoft Visual Studio Solution File, Format Version 11.00
Microsoft Visual Studio Solution File, Format Version 10.00
10.0.20506
9.0.30729
\VisualStudio\v10.0\
\VisualStudio\v9.0\
if u not find some lines dont worry , leave it
after changes, you may get a error from web.config from tag
remove this tag entirely, and also you may get config section errors like register components in web.config remove those tags also, and compile your code and run(what ever errors you may get from web.config remove them appropriately).