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/
Related
I am using sql server data tools for visual studion 2012 for SSIS package development. Visual studio 2012 is also installed on my system. Facing issues with package configuration. I am following below steps.
Go to package cofiguration.
Expand any connection or variable to add value to config file.
Expand next connection or variable. And click on properties, previously selected connection values are disappearing. But its working fine when we expand all connections, variables and then select values.
All the selected values should not disappear. it seems to be a defect. any help would be appreciated.
An old issue I know, but incase this is driving anyone else insane, there is a work around (no fix I can find yet, but then I haven't reinstalled yet either).
The work around is to expand all the properties you are going to set before setting any parameters. It appears that expanding will clear all the other settings in the wizard, hence creating the behaviour both me and the OP had.
I found an even better workaround:
Open up 'View Code' in the Solution Explorer. This will show you the underlying XML page for the package. Find the Package Configuration value you want to change, and edit it directly.
I've got 2 projects in my solution.
The one is a small win forms project, and
the other, a InstallShield Limited Edition project.
Everything works fine & installs correctly for the most part. The desktop and start menu shortut's get created also with the correct icon... except that that the target & start in properties are blank... and thus the shortcuts are useless.
Normally target should have the reference to the executable, but it seems to be populated with my project name :/
I'm not too sure how I can go about debugging this? Or what would be causing the problem?
I started going going through the sub steps in the Installer project.
Under the 3rd node - Configure the Target System, there is a Shortcuts/Folders item.
Upon opening you'll see a tree view of where the shortcuts will be created. I selected the desktop shortcut, and noticed that the working directory was not set. I changed it to point to [INSTALLDIR]
This fixed the problem for me
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.
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)
I'm on Visual Studio Premium 2012, Version 11.0.50727.1 RTMREL, Windows 7 Enterprise (SP1).
When I right click on the Solution, and click Properties, I get a popup window showing the the null reference exception (Object reference not set to an instance of an object).
When I try the same in 2010, it works fine, opening up the normal solution properties pages, allowing me to set the startup order etc.
Also, in 2012, View -> Property Pages, gives the same result.
Please advise how to solve this, is this a known bug?
UPDATE 1: Tried running devenv /resetsettings as well as devenv /safemode but the problem persists. Also tried it on a new solution, and the problem persists.
UPDATE 2: Seems that disabling any extension, and trying again, sorts out the issue. Re-enabling extension doesn't bring the bug back.
UPDATE 3: Go vote here if you're still having this issue: https://connect.microsoft.com/VisualStudio/feedback/details/763961/cannot-open-property-pages-for-solution
This happened to me as well. If you have ReSharper installed, try disabling it (Tools -> Options -> ReSharper -> General -> Suspend and restart VS2012. If you do not have ReSharper installed, I'm afraid I have no idea.
After seeing some comments here, and running into it myself, it appears that disabling Re-Sharper doesn't always fix the issue. However, if you disable, restart, re-enable 'other' add ons, the issue will eventually go away temporarily. The next time visual studio opens, you will likely be in the same spot.
In my case, the problem was solution-specific. NuGet was causing this error, but not the extension itself but a NuGet package that generated an error on VS load. When I opened NuGet Package Manager Console I saw a big red text with a description of the error. In my case it was T4Scaffolding.Core package, which in turn is a dependency of MVCMailer.
If this is your case, you will probably see what package generates an error in PM Console.
I was encountering this problem on one of my solutions, while it didn't happen for others. The solution causing the trouble didn't do so until I added a certain project to it; after that I could not view the solution's properties anymore or set the startup projects.
Removing the project from the solution didn't solve it, the only way to 'reset' was to create a new solution file and adding all projects one by one to it. This made it work again, until of course I re-added the offending project.
Today the issue was solved for me by updating the NuGet package manager.
This is my experience with the problem:
(Running VS2012 as administrator, hoping that some setting would be sorted out).
I have a solution with two MVC projects and other projects.
If I unload the two MVC projects without restarting VS, the problem is still there. After restarting VS, with the two projects not loading, but showing in Solution explorer, the problem disappears.
Load the two projects back, Solution properties still work, but after a restart the cycle restarts.
NOTE: There is no difference in the projects and solution files when the two MVC projects are not loaded.