Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 3.5 and Visual Studio. 2008 > Visual Studio 2008
|
Visual Studio 2008 For discussing Visual Studio 2008. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2008 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2010, 01:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default VS won't retain Start Up Page or compilation settings

Just upgraded to VISTA w/VS 2008 from XP w/VS 2005. My web applications don't seem to retain some project level settings, most notably the Start Up Page, and the Use fixed Naming and single page assemblies option, and Target Location on the Build screen. I must now manually change these settings after rebooting my computer, but could swear that these settings were saved with VS 2005.

Can somebody tell me whether this changed with VS 2008, and if not, WTF VS 2008 stores these settings now?
 
Old March 29th, 2010, 08:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

I suppose I can take some comfort in the fact that I'm not the only person who doesn't know.
 
Old March 29th, 2010, 09:08 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Ron,

It depends on whether you're using Web Site Projects or Web Application Projects. With a WAP, some settings are stored in the project file.
For both types, some settings are stored in the associated .sln file or the .suo file (with user options). Maybe one of these files isn't writable?

Also, what happens when you run VS as an administator on Vista?

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 29th, 2010, 09:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Thanks, Imar!

Given I cannot seem to find a project file, it would appear to be a Web "site" Project. Don't know if this is relevant, but this is an old VS 2005 project that was converted to 2008. I see no obviously named settings in the solution file that relate to the values sought. Eother these settings are saved elsewhere or not at all.

And I saw no differences running as Administrator. Not sure that's significant as it wasn't doing anything out of hte ordnary when NOT running as Administrator either. I'll check whether the settings were retained next time I reboot.
 
Old March 29th, 2010, 09:56 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

In that case, I would track down the .sln file and its associated .suo file and see if it gets deleted or changed when you reboot....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 29th, 2010, 04:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Copied the wrong SLN file, so ignore the previous email. These are the current contents of the .SLN file (after Set as Start Page and Save All):

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Surveys2009", "..\Surveys2009", "{24A78E3C-0825-46B3-B546-09765AD9C553}"
ProjectSection(WebsiteProperties) = preProject
SccProjectName = ""$/Web Stuff/Surveyor 2009", FEACAAAA"
SccAuxPath = ""
SccLocalPath = "."
SccProvider = "MSSCCI:Microsoft Visual SourceSafe"
TargetFramework = "3.5"
Debug.AspNetCompiler.VirtualPath = "/Surveys2009"
Debug.AspNetCompiler.PhysicalPath = "..\Surveys2009\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Surveys2009\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/Surveys2009"
Release.AspNetCompiler.PhysicalPath = "..\Surveys2009\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Surveys2009\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "51711"
EndProjectSection
EndProject
Global
GlobalSection(SourceCodeControl) = preSolution
SccNumberOfProjects = 1
SccWebProject0 = true
SccProjectUniqueName0 = .
SccProjectName0 = \u0022$/Web\u0020Stuff/Surveyor\u00202009\u0022,\u0020FEACAAAA
SccLocalPath0 = D:\\Projects\\2008\\Surveys2009
SccProvider0 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
SccProjectEnlistmentChoice0 = 2
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{24A78E3C-0825-46B3-B546-09765AD9C553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24A78E3C-0825-46B3-B546-09765AD9C553}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal


"Set as Start Page" does not appear to change the Date/Time or size of either the SLN file or the SUO file (which is pretty much unreadable anyway). And I still see nothing in the .sln file indicating the page I set as the start page. All I can say with certainty is that it retains Set As Start Page after closing and reopening VS, but NOT after a reboot.

Where could it possibly store this setting so that it works only UNTIL I reboot?!?!?!

Last edited by Ron Howerton; March 29th, 2010 at 04:21 PM..
 
Old March 30th, 2010, 03:02 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Could it be stored here? %userprofile%\AppData\Roaming\Microsoft\VisualStud io\9.0

And then maybe when you log off this folder gets synchronized incorrectly? Just a wild gues...

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 30th, 2010, 03:23 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Looks like some settings are stored here:

%userprofile%\AppData\Local\Microsoft\WebsiteCache

In the file Websites.xml you find settings like the start page for web site projects. For example:

<Website RootUrl="D:\Projects\SomeTestSite\" CacheFolder="SomeTestSite" startpage="MyStartPage.aspx" addnewitemlang="Visual C#" targetframework="3.5" vwdport="43241" addnewitemoptions="-1073741822" startaction="1" _LastAccess="3/30/2010 8:57:12 PM"/>

Some other settings can be found in the folder referenced by CacheFolder

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 30th, 2010, 03:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

There's no VisualStudio\9.0 in my roaming profile. I'm not using a roaming profile anyway. Checking the other suggestion...
 
Old March 30th, 2010, 03:49 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Imar, you're a genius!

The WEBSITES.XML file on my workstation is being generated when I close VS (rather than when I click save all, go figure.) When I reboot, the WEBSITES.XML file is gone! Time to talk to our network folks about why this isn't being saved to my profile.

Thanks, Imar!





Similar Threads
Thread Thread Starter Forum Replies Last Post
start page Philip8888 BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 2 October 30th, 2009 01:20 PM
Changing Settings.settings when assembly is in GAC evandro.paula .NET Framework 2.0 0 September 25th, 2007 09:54 AM
Listbox retain value after page refresh tvks .NET Framework 2.0 1 March 7th, 2007 03:44 PM
How to retain values of dynamic controls when page fozia_izhar .NET Framework 1.x 1 February 7th, 2007 02:32 PM
Which page is the project start page? VictorVictor BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 12 March 1st, 2006 03:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.