Errors in my debugger environment, does an upgrade exist? - c#

As mentioned yesterday, I'm having some issues with my debugger (sometimes it shows wrong values).
This morning I almost exploded on this particular case:
I was interested in information about the DB, used by my application, so I put a breakpoint on a line, where the corresponding object is used. As the debugger said that particular object is null, I was extremely surprised being capable to the following line, as you can see in the screenshot.
For me, this is the clearest proof that my debugger is so bogus and I would like to update it, but I don't know how. My current visual studio about mentions the following:
In text format:
Microsoft Visual Studio Enterprise 2017
Version 15.9.44
VisualStudio.15.Release/15.9.44+28307.1800
Microsoft .NET Framework
Version 4.8.04084
Installed Version: Enterprise
Microsoft Visual Studio Tools for Applications 2017 00370-00007-85954-AA413
Microsoft Visual Studio Tools for Applications 2017
Is there a known issue for this particular visual studio version, .Net framework version, Telerik version, ...?

Version 15.9.44 is, as of today, the latest available build for VS2017. You should consider upgrading to VS2022. To upgrade, just download the latest visual studio installer from microsoft (https://microsoft.com/vstudio). It lets you select the version to install. You can install VS2017, VS2019 and VS2022 in parallel (given enough free disk space).

Related

visual studio c# extensions missing

I've search the web and found questions from 3-9 years ago.
My problem is that I can't find anywhere the .NET standard or Windows Console Application or Windows Desktop Application or class Library for C#.
When I had Visual Studio 2015 - it was there by default.
Today I have Visual Studio 2017 and window 10 and I can't get my things together.
Are they canceled?
What is the other option?
When I look at my New project library -> Online -> Visual C#
There are many different applications but non of them seems to come from Microsoft.
Meanwhile I've got a .NET Core API Solution template but it has a lot of errors.
Please help
visual studio c# extensions missing
Just like Joe said, you should use Visual Studio installer to install the modules you need. Visual Studio 2017 use the a new way to install Visual Studio! In the newest version, MS have made it easier for you to select and install just the features you need. MS have also reduced the minimum footprint of Visual Studio so that it installs more quickly and with less system impact than ever before.
After the installer is installed, you can use it to customize your installation by selecting the feature sets—or workloads—that you want.
For the .NET core API project, you need install module .NET Core cross-platform development.
Check the document Install Visual Studio 2017 for some more details.
Hope this helps.

Visual Studio LightSwitch will not Build

I'm working with an old C# LightSwitch HTML project that connects to SharePoint and I need to make a few changes. Unfortunately not enough to justify migrating to another technology/platform, but anyways...
I fire up my Visual Studio 2015 and the project won't build. I've of course googled for and tried everything I can think of and long story short even if I create a new C# LightSwitch HTML project and try to build it, it fails. Here's the error I get:
An exception occurred when building the database for the application.
An error occurred during deployment plan generation. Deployment cannot continue.
Error SQL0: Required contributor with id 'Microsoft.LightSwitch.DataRetentionDeploymentPlanModifier.v5.0' could not be loaded.
Error SQL0: Required contributor with id 'Microsoft.LightSwitch.LocalDbLocationModifier.v5.0' could not be loaded. GraphicsApp C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.targets 160
If I go to line 160 (double-clicking on the error) I see this (Starting at line 160):
<BuildSchema Inputs="#(ServerMetadataFiles)"
ServerGeneratedMetadataFiles="#(ServerGeneratedMetadataFiles)"
Collation="$(DatabaseCollation)"
DatabaseProject="#(_DatabaseProject)"
ProjectPath="$(MSBuildProjectFullPath)"
OutputDirectory="Bin\Data"
SqlExpressInstanceName="$(SqlExpressInstanceName)"
ExternalDataSources="#(ServerExternalDataSources)"
Condition="'$(SkipBuildSchema)' == ''"/>
I've tried searching everything I can think of but I'm not finding anything that even sounds remotely the same except this link. But it's talking about V4 and only says that the solution was to:
"right clicking on the project in solution explorer... [and] upgrade
the project"
But that doesn't help me at all because I don't see any option to upgrade anything and again I have the same exact problem on the brand new project I create.
Do you know what version of SQL Server Data Tools (SSDT) you have installed?
The latest update 14.0.61707.300 breaks LightSwitch with that error.
You could try uninstalling SSDT and installing the previous version.
Had same issue...
SQL Server Data Tools for Visual Studio 2015 (SSDT)
SSDT version 17.4 (14.0.61712.050) https://go.microsoft.com/fwlink/?linkid=863440
breaks our SSRS,
as does SSDT version 17.3 (14.0.61709.290)
https://go.microsoft.com/fwlink/?linkid=858660
Breaks our LightSwich.
https://learn.microsoft.com/en-us/sql/ssdt/previous-releases-of-sql-server-data-tools-ssdt-and-ssdt-bi?view=sql-server-2017
By Trail and Error, found SSDT for VS2015 17.2 Works For both LightSwitch and SSRS
https://go.microsoft.com/fwlink/?linkid=852922
For a Windows 10 machine, with previously installed Visual Studio 2017, the installation of Visual Studio 2015 and running the Lightswitch project, nothing worked, but this:
copy all the content from this location "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130\Extensions"
to
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\140\Extensions"
Found that solution on MSDN.
I just faced a similar situation here, but I could not find a version 13.x of SSDT and upgrading to the oldest version available in the Microsoft website didn't help.
The error was fixed when I decided to do some VS pending updates, on of them being the Office Developer Tools for VS, which was updated to
Try by installing microsoft office developer tools for visual studio 2015
https://www.microsoft.com/en-us/download/details.aspx?id=51683

GIT integration to show method history in Visual Studio

We use GitHub for our source code repository and Visual Studio for our development (C#). I downgraded from Visual Studio Professional (Trial) to Community Edition and somehow lost the GIT method history I had above each method signature. I've since reinstalled Pro version and still can't see it. This method history was very useful and looked something like:
Last Update 8/1/2015, 3 authors.
Void DoSomething() {}
Clicking on the status line would bring up things like "compare to previous version", history etc.
I'm not sure if it was a feature of Visual Studio Professional (doubtful) or one of the git extensions I possibly installed (see Tools->Extensions and Updates) or something else. I'm new to using GIT/GitHub, especially with Visual Studio and would appreciate some help. My specific questions
1. How do I get history/last author/etc for each method (not file)? Does it work under Professional and Community
2. What are some good Git Tools to install in Visual Studio to see changes/history, etc.? I'm using the command line to commit/push etc., but am not opposed to doing this from Visual Studio if it makes sense.
Thanks,
Dave
What you initially refer to is a feature of Visual Studio called CodeLens. It's available in the Professional and Enterprise editions of Visual Studio 2015, but not available in the Community edition.
To try and resolve this not working, I would:
Make sure you are actually running Visual Studio 2015 Professional edition, and not the Community edition.
Make sure you have Git for Windows installed.
In addition to the excellent answer by Steve (which I'm marking as answer), I'll note that I had additional problems (after installing Git for Windows).
I got errors at startup and didn't see the method info. The errors were:
The 'GitCollaborationPackage' package did not load correctly.
The 'FileIndicatorPackage' package did not load correctly.
The fix was to rename the componentmodelcache directory under C:\Users\cshar\AppData\Local\Microsoft\VisualStudio\14.0
See:
Packages not loading after installing visual studio 2015 RTM
or
http://kuebiko.blogspot.ru/2013/07/setsite-failed-for-package.html

How to fix "You must upgrade the project to target Microsoft Azure Tools 2.8"?

I've got a project that's set to Azure 2.6. I have Visual Studio 2015 installed. I get prompted to upgrade the project (see image 1 below), which I do not want to do (it's production code and I don't know what the side effects may be, how many things might break).
I tried installing Azure 2.6 and related tools, but it doesn't help. Image 2 shows all the Azure related stuff I have installed
I have a coworker who has Visual Studio 2015 and can load the Azure project in the solution without a problem (see image 3). So it's clear that you don't have to upgrade the project.
I'm going to try installing VS 2013 Community Edition + Azure 2.7 tools to see if that satisfies it. I'm grasping at straws at this point.
Any ideas?
A coworker helped me to come up with the solution:
Go to the "Microsoft Azure SDK for .NET - 2.6" page here:
https://www.microsoft.com/en-us/download/details.aspx?id=46892
Download "MicrosoftAzureTools.VS140.exe" and install it
Run appwiz.cpl from the run prompt and filter on "azure" in upper right
You should see "Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.6"
Open Visual Studio 2015 again and your project should now load without prompting to upgrade. Do a Rebuild All just in case to make sure it builds.
It turns out I had dang near everything installed except that one 2015 tools + 2.6 Azure combination.

Visual Studio version-agnostic projects/solutions: is it possible?

I remember seeing an open source project within the last year that I was able to open in both VS 2008 and VS 2010 without an upgrade wizard popping up. I think...
Is it possible to create a project/solution that will open up in any version of Visual Studio without prompting me to run the upgrade wizard? If so, how do I do this?
Information for both C++ and C# projects would be most helpful.
You can, use CMake and generate VSx solution.
I think the project that you have seen had 2 visual studio solutions for different visual studio versions.
Update:
Also, you can use http://sourceforge.net/projects/vspc/
or see http://www.emmet-gray.com/Articles/ProjectConverter.htm
The solution format hasn't changed significantly over the visual studio versions except the version number.
If the code itself is generic enough (not using linq, etc) then you can edit the first line of the solution file to "downgrade" the version.
VS2005 uses:
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
You can give the Prebuild project a try to generate needed solution files on the fly.
Prebuild is a cross-platform XML-driven pre-build tool which allows
developers to easily generate project files for major IDE's and .NET
development tools including: Visual Studio .NET 2002, 2003, 2005, 2008, 2010
SharpDevelop, MonoDevelop, NAnt and Autotools.
May be it is not what you ask about, but you can convert you project into nmake target
The only way to do this is to create separate solutions (for 2010 and 2008), and include existing projects to different solutions. Create new projects in VS2008, and then add them to VS2010 solution.
You may need something like round-tripping
Round-tripping is the ability to use a current or previous version of Visual Studio to target a platform that is supported by both versions of VS. For example, with round-tripping, you can open projects from a previous version of VS in a newer IDE without the need for conversion, thus allowing you to work side-by-side on old and upgraded projects.
Read more

Categories