how to change the default user name in Visual C++ Express Edition? - visual-c++

I have started to use Visual C++ 2008 Express Edition and I notice that when one makes a project it appears something like this (in the folder's projects):
myFirstProgram.vcproj.Little-PC.Little.user
I would like to change the part where it appears my user name, is there any part inside the Visual C++ IDE where I can do that? I have been looking around, but found nothing at all.
Thanks

This is VS project user options file, so it is linked with the user account under which the project was opened. Seems you cannot change this. This file stores per-user debugging settings for the project.
Real source code project settings are in myFirstProgram.vcproj.

Related

How can I Get visual studio to use source server in preference to local files when debugging?

I have just started experimenting with the Microsoft tools to set up a symbol and source server.
I have successfully indexed my source files using p4index, updated the .pdb files and updated the symbol server.
I have set visual studio to use the my symbol server.
All works fine: when I step debug through my exe as a standalone exe the pdb's are loaded and the correct version of the source code is exported from perforce to temp location and displayed within visual studio.
Whats the problem then? If I try to debug on the machine on which I built my exe then visual studio finds the source code locally. The trouble is that this is a modified file and not the correct version of the source corresponding to when exe was built. VStudio even knows this and pops up a requester saying "the source file is different from when the module was built. Would you like the debugger to use it anyway?"
If I click no then I just get a file dialog to manually locate the source.
Is there a way to get vstudio to fall back to using source server or preferably to use the source server first before looking looking locally?
I'm using visual studio 2012 and perforce
After having encountered the same issue, I finally narrowed it down to the fact that Visual Studio won't run the P4 PRINT command if there is already a file at the place where the pdb/debugger expects to find it.
For example, if the indexed source file was in C:\Toto\Source.cpp, the sole presence of this file when Visual is looking for it will prevent the P4 PRINT.
If i rename it, Visual is correctly printing the file in another unrelated folder (the symbol cache pass).
It's not a fix, it's only a reason, but I'm still investigating.
This behavior is not present in windbg.
In case anyone else finds this thread and has the same problem, the solution in my case was to Enable "Require source files to exactly match the original version" in Options -> Debugging -> General.
It will still prefer the local copies, but only if they are identical, in which case it is the same version it would otherwise grab from the source control server. And if it isn't the right one, it will now display the proper one from the source control server.

Creating Content Project on Monogame

I am trying to use Monogame for the first time.
I found creating a content project is impossible on Visual Studio 2012,
so I would like to know if I can create some .xnb (contents) files from another PC and move it in my PC that Visual Studio 2012 is installed.
This is because I failed to install Windows Phone SDK in my PC for some reason.
My OS was Windows 7 so I could not install Windows Phone SDK.
So, is it possible to create a content project on another PC and move it into my PC? Or, can I copy the .xnb files to my PC?
Thanks in advance for your help.
You can create the xnb files from whichever system you want by using an XNA game project.
The steps to follow would be:
Create a new XNA Game project (it needs to be a game and not a content project).
Add the assets you want to port into the content project of the game.
Compile.
Go to the output folder and copy all the xnb files.
In your monogame project, add the existing xnb files to the project's Content folder.
Change their properties to: "Content" for "Build Action" and "Copy if newer" for output directory.
You can find a tutorial (written by me) explaining exactly how to use sounds and spritefonts in Monogame here. This can be helpful given that these files need to be created from an external project as Monogame was not able to used them without being in xnb format; and was also unable to create this format for itself.
One last thing, it is also possible to install XNA in VS 2012/2013 and Windows 8/8.1 without any problem by using XNA Refresh. This may help you in avoiding the need to use another computer for this process.

visual studio express 2012 version control

I have been sent a working project from a coworker to start learning Visual Studio. The project is under version control, however I don't want to have access to final customer product. So when I try to open the solution file I first get a message that the project is under source control:
"Team Foundation Server Version Control
The solution you are opening is bound to source control on the following Team foundation Serer:
http:// . Would you like to contact this server to try to enable source control integration?"
[yes] [no] [help]
I press no, then I get an error:
"The solution appears to be under source control, but its binding information cannot be found. Because it is not possible to recover the missing information automatically, the projects whose bindings are missing will be treated as not under source control."
[ok] [help]
I proceed and press ok, and another message pops up:
"projectname\projectname.tsproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?prd=12395&pver=11&sbp=ProjectTypeDeprecated&plcid=0x409&clcid=0x409&ar=MSDN&sar=ProjectCompatibility&o1=B1E792BE-AA5F-4E3C-8C82-674BF9C0715B"
My coworker tells me he sent the whole project, so I can't figure out why I cant get visual studio to open it. I am new to visual studio, but I have some programming experience.
Any help is much appreciated.
Thank you
It is doubtful that version control has something to do with your problem. There are two possibilities I could think of:
Your coworker uses full version of VS2012 and you are now having problems due to the fact that Visual Studio Express comes in two main flavours - Web and Desktop. It is unable to load Web(or Desktop) project because it just does not have any tools to work with it. Ask your coworker whether they mix web and desktop in their solutions. If it is so you should either use full VS or be given a reduced set of projects.
Nearly the same - your coworker uses some very old or very new version of particular project type (something like ASP.NET MVC that(as I remember) has different project type for each version). Again ask your coworker if it is so. In this case you will just have to install the needed templates and SDKs.
P.S. I was unable to open your link - it opens microsoft.com/default(maybe due to some regional problems). Search by key words brought to me similar problem for VS2010 http://connect.microsoft.com/VisualStudio/feedback/details/728847/could-not-open-vs2010-solution-with-mvc-project - may be it could help you more specifically.

Visual Studio 2012 Express Code Analysis

The Microsoft documentation talks about a limited set of code analysis tools being available for the express edition (e.g. Microsoft Visual Studio Blog ).
I am using VS 2012 update 3, and can not see any code analysis options in context menus, or any buttons or menu options. I am pretty sure I ran some code analysis at some point, but that might have been before update 2 was installed.
Does anyone know if this option has been removed from more recent express editions, and if not where I can find the appropriate menu item or settings to be able to run and view the results of code analysis.
Edit
there is a very clear description given below by Crippledsmurf, and it is obviously possible to access Code Analysis from vs express. I must have somehow changed some option, because none of the options described are accessible:
Solution explorer - solution context menu:
project context menu:
project properties:
As far as I know, code analysis is only available in VS Express 2012 For Windows Desktop - if you have some other version than the "for Windows Desktop" version, it may not be supported. Try Googling your specific version to make sure.
It may be that these options are not supported by your "platform toolset" (project properties -> general -> platform toolset).
For example, v110 supports it, v110_xp does not seem to.
You can still try the "Build" menu -> "Run Code Analysis on Solution" (or hit the hotkey Alt-F11) but this will, if this is your problem, give you "error MSB8026: Static analysis is not supported with the current platform toolset."
If that doesn't work, try project properties -> C/C++ -> General -> SDL checks and setting that to "Yes (/sdl)". I vaguely remember that it didn't show up for me until I did that, but even when I remove that option again, the code analysis option doesn't go away, so might not be related.
If you need (as I do) a different platform toolset for your normal builds, which does not support code analysis, then rather than beak your Debug or Release configurations, it may be better to create a separate "Analyze" configuration: project properties -> "Configuration Manager" -> Active solution configuration -> "New..." -> type "Analyze", copy across the settings from "Debug". Then you can set the platform toolset in there, and enable analysis, and not worry about it breaking your normal configurations.
Even after all that though, I can't get it to find any errors, even though I know errors exist. So, ymmv.
Code Analysis does indeed exist in Visual Studio 2012 Express Edition. It has been present since the initial release and is still present after Update 3.
To run code analysis on a project or solution:
Open the project or solution
From the Solution Explorer right click on the project or solution you want to run Code Analysis on
From the right click menu choose Run Code Analysis.
Having completed the steps above you should see the Code Analysis user interface which should look similar to:
Settings to control Code Analysis are found in project properties on the Code Analysis tab. Specifically in Visual Studio Express for Desktop, I am able to control:
Whether or not Code Analysis runs on build
Suppression of Code Analysis results for managed code that has been generated.
For reference, I tested this in Visual Studio Express Edition 2012 for Desktop with Update 3 applied. I can confirm the option is present for C# and Visual Basic projects
I'm using Visual Studio 2013, but my solution was to change the Target Platform in the Project settings.
Project Properties -> Configuration Properties -> General -> Platform Toolset -> VS2013 (v120), instead of VS2013 - Windows XP)

VS 2012 Intellisense broken for external DLLs

I have a Visual Studio 2012 project with a reference to a Sitecore DLL. (Sitecore is a vendor.)
For a few weeks, Intellisense has worked fine. Yesterday, after installing Patch Tuesday updates and rebooting, Intellisense no longer works for stuff in the Sitecore DLL. I don't know whether there is a correspondence.
Intellisense still works for .NET Framework stuff. E.g., if I type string. inside a method, I get Intellisense.
The project has a reference to the Sitecore namespace defined under References in Solution Explorer. Specifically, the reference is Sitecore.Kernel, and it comes from Sitecore.Kernel.dll.
If I right click on Sitecore.Kernel under References and select View in Object Browser, I can browse the DLL just fine. Also, my project builds fine; the project has a few using statements referencing parts of the Sitecore.* name space, and it uses objects in those namespaces.
If I type using Site and press Ctrl-space, I should see Intellisense suggesting {} Sitecore, but all it shows is this:
If I attempt to use Intellisense on any object in a Sitecore namespace, I get no Intellisense suggestions.
The suggestions in other areas don't work. For example:
Edit > IntelliSense > Refresh Local Cache: There is no Refresh Local Cache option. Yes, I did have a CS file open, and was editing it then.
Delete %AppData%\Roaming\Microsoft\VisualStudio\11.0\ReflectedSchemas: There is no ReflectedSchemas folder there.
TOOLS > Import and Export Settings > Reset all settings: Did not bring back Intellisense for external stuff.
In Visual Studio Command Prompt, run devenv /resetuserdata: Seems to have done something similar to the prior technique. Had no effect on Intellisense.
Check TOOLS > Options > Text Editor > C#: Both Auto list members and Parameter information are checked. I think these would have been reset by the prior two steps anyway.
Through the VS 2012 installer (Control Panel > Uninstall a program), repair the entire VS installation. Had no effect.
Remove and add back Sitecore.Kernel under References. Had no effect.
Here's where it gets really weird: if I open this project remotely from a different workstation--which also has yesterday's Patch Tuesday stuff installed and rebooted--Intellisense works fine! I am referring to it using \computername\c$....
I'm not sure what else to try.
For reasons I don't understand, I was able to get Intellisense back by creating a new project and setting it up pretty much exactly like the old project.
Your web project will also need to have some Sitecore config files in the App_Config folder in the project's directory. (Not necessarily included in the project).
I've blogged about it here:-
http://www.seanholmesby.com/fixing-visual-studio-intellisense-in-sitecore-mvc-views/

Resources