Visual Studio 2017 version 15.3 Release Notes

Release Date: August 18, 2017 – Visual Studio 2017 version 15.3.1

Issues Fixed in August 18, 2017 Release

These are the customer-reported issues addressed in this version:


Summary: What’s New in this Release

  • Accessibility Improvements make Visual Studio more accessible than ever.
  • Azure Function Tools are included in the Azure development workload. You can develop Azure Function applications locally and publish directly to Azure.
  • You can now build applications in Visual Studio 2017 that run on Azure Stack and government clouds, like Azure in China.
  • We improved .NET Core development support for .NET Core 2.0, and Windows Nano Server containers.
  • In Visual Studio IDE, we improved Sign In and Identity, the start page, Lightweight Solution Load, and setup CLI. We also improved refactoring, code generation and Quick Actions.
  • The Visual Studio Editor has better accessibility due to the new ‘Blue (Extra Contrast)’ theme and improved screen reader support.
  • We improved the Debugger and diagnostics experience. This includes Point and Click to Set Next Statement. We’ve also refreshed all nested values in variable window, and made Open Folder debugging improvements.
  • Xamarin has a new standalone editor for editing app entitlements.
  • The Open Folder and CMake Tooling experience is updated. You can now use CMake 3.8.
  • We made improvements to the IntelliSense engine, and to the project and the code wizards for C++ Language Services.
  • Visual C++ Toolset supports command-prompt initialization targeting.
  • We added the ability to use C# 7.1 Language features.
  • You can install TypeScript versions independent of Visual Studio updates.
  • We added support for Node 8 debugging.
  • NuGet has added support for new TFMs (netcoreapp2.0, netstandard2.0, Tizen), Semantic Versioning 2.0.0, and MSBuild integration of NuGet warnings and errors.
  • Visual Studio now offers .NET Framework 4.7 development tools to supported platforms with 4.7 runtime included.
  • We added clusters of related events to the search query results in the Application Insights Search tool.
  • We improved syntax support for SQL Server 2016 in Redgate SQL Search.
  • We enabled support for Microsoft Graph APIs in Connected Services.

Read more at https://www.visualstudio.com/en-gb/news/releasenotes/vs2017-relnotes#15.3.26730.08

 

.NET Core 2.0 and ASP.NET Core 2.0 Released

Been busy past couple of weeks, but if like me you are catching up… on 14th Aug, Microsoft released .NET Core 2.0, including ASP.NET Core 2.0

.NET Core 2.0

.NET and C# – Get Started in 10 Minutes

ASP.NET Core 2.0

This release features compatibility with .NET Core 2.0, tooling support in Visual Studio 2017 version 15.3, and the new Razor Pages user-interface design paradigm.  For a full list of updates, you can read the release notes and you can check the list of changed items in the ASP.NET Announcements GitHub repository for a list of changes from previous versions of ASP.NET Core.  The latest SDK and tools can be downloaded from https://dot.net/core.

Read more at https://blogs.msdn.microsoft.com/webdev/2017/08/14/announcing-asp-net-core-2-0/

 

 

.NET Conf, a free virtual event for developers

Are you ready to learn all about .NET? .NET Conf 19th to 21st September 2017 is a free virtual conference. #dotnetconf – http://www.dotnetconf.net/


More Details…

The .NET Conf is a free, 3 day virtual developer event co-organized by the .NET community and Microsoft. Some of the speakers lined up so far: –

Scott Hunter

Scott Hunter – Director of Program Management, .NET

Kasey Uhlenhuth

Kasey Uhlenhuth – Program Manager, .NET

Mads Torgersen

Mads Torgersen – C# Language Designer

Mikayla Hutchinson

Mikayla Hutchinson – Principal Program Manager, Xamarin

Scott Hanselman

Scott Hanselman – Principal Program Manager, .NET

What’s in store for you?

“Over the course of the three days you have a wide selection of live sessions that feature speakers from the community and .NET product teams. These are the experts in their field and it is a chance to learn, ask questions live, and get inspired for your next software project.

You will learn to build for web, mobile, desktop, games, services, libraries and more for a variety of platforms and devices all with .NET. We have sessions for everyone, no matter if you are just beginning or are a seasoned engineer. We’ll have presentations on .NET Core and ASP.NET Core, C#, F#, Roslyn, Visual Studio, Xamarin, and much more.”

Check out http://www.dotnetconf.net/ for more details…

Finding the columns and values from AggregateResult (or QueryResult/sObject) in Salesforce.com APEX

I have been doing some quite intensive Saleforce.com (Visualforce.com) custom site development recently. This has involved full front to back-end development on multiple levels along with integration into various jQuery and charting frameworks.

One issue I ran into I could find no immediate recommended solutions in the various forums. This was having the ability to iterate through a result set, determine the column names and values.

While retrieving the data was relatively simple through SOQL, after employing the various workarounds for the lack of ability to do simple joins. Once I had my query I needed to consume it dynamically from multiple sources (different AggregateResult sets).

In order to make the application robust the consumption of the AggregateResult set needed to be dynamic, and be able to adapt to varying data that might be supplied to it i.e. for the chart output we would have some standard fields, but there would be additional fields the number of which would vary depending on the result set.

In most development languages there is some object model to verify that a column exists and if it does get your value out of it. AggregateResult is the same if you are using C#, the result set is XML so you can confirm structure, but within APEX there is currently no ability to do that.

At first I though I could use “<my agg res>.getSObjectType().getDescribe().fields.getMap()”, but I soon found that only returned one field, an internal ID field, unrelated to my data.

After searching for a quick solution, nothing obvious could be found, so had to figures something else out.

I did try to serialize the result set but that failed as well. Apparently sObjects cannot be serialized (within APEX), which I found odd.

While trying to debug and figure out a solution, I stumbled onto the fact that the AggregateResult object would convert to a string… that led me to the solution.

The string (at least for now) follows a predictable format:

string somethingToWorkWith = string.valueOf(myAggregateResult);

Will give me a string which has the format:

AggregateResult:{MyColumn1=Value1, MyColumn2=Value2}

This allows me to pull out all of my data, with their types intact. Below are a couple of functions, one will get me all my columns in a set, the other will get me all my columns and values in a key/value map. Note that in order to preserve the original type (class) of data the later function’s value is a generic object, and it is pulled from the original AggregateResult, rather than from the converted string array.

/**
* Returns set of columns in the supplied AggregateResult.
**/
public static Set<string> AggResColumns(AggregateResult a) {
    if (a == null) return new Set<string>();
        set<string> myColumns = new set<string>();
        string ar = string.valueOf(a).removeStart(‘AggregateResult:’).removeStart(‘{‘).removeEnd(‘}’);
        string[] ars = ar.split(‘, ‘, 0);
        for (string pair :ars) {
            if (pair != null && pair != && pair.indexOf(‘=’) > 0) {
            string[] keyAndValue = pair.split(‘=’, -2); //We are using -2 deliberately.
           if (keyAndValue.size() > 0 && keyAndValue[0] != null && keyAndValue[0] != ) {
                myColumns.add(keyAndValue[0]);
            }
        }
    }

    return myColumns;
}

/**
* Returns map of columns and values in the supplied AggregateResult.
**/
public static map<string, object> AggResColumnsAndValues(AggregateResult a) {
map<string, object> myValues = new map<string, object>();
string ar = string.valueOf(a).removeStart(‘AggregateResult:’).removeStart(‘{‘).removeEnd(‘}’);
   
string[] ars = ar.split(‘, ‘, 0);
   
for (string pair :ars) {
       
if (pair != null && pair != && pair.indexOf(‘=’) > 0) {
           
string[] keyAndValue = pair.split(‘=’, -2); //We are using -2 deliberately.
           
if (keyAndValue.size() > 0 && keyAndValue[0] != null && keyAndValue[0] != ) {
               
myValues.put(keyAndValue[0], a.get(keyAndValue[0]));
           
}
        }
    }

    return myValues;
}

Visual Studio 2012 Update 2 Released

Aside

Tip

To download for team sharing/network deployment, download web installer from the link, then at command prompt use the command: –

“<download path>\VS2012.2.exe” /Layout “<my save path>”

replacing <download path> and <my save path> as required…. This will download the full install (1.8GB).

The same also works for SSDT (SQL Server Data Tools) installers.

Download now from http://www.microsoft.com/visualstudio/eng/downloads#d-visual-studio-2012-update or http://go.microsoft.com/fwlink/?LinkId=273878

Very nice code mapping features during debug and error tracing, watch the video below (or at here – about 25 minutes into video) for details.


Most of the following content has been extracted from http://www.microsoft.com/visualstudio/eng/visual-studio-update#story-update-2

46 minutes, 36 seconds

New Features include

Agile planning

Visual Studio 2012 introduced a new set of capabilities to support agile teams—on their terms. Update 2 adds new capabilities for your team to customize and get more out of its agile tooling. You can now add customizable columns to your Kanban boards so that they more accurately reflect your organization’s structure. Work item tagging helps teams to manage their work items by adding tags to get more out of their data.

Quality enablement

Maintaining quality throughout the development cycle is one of the key focus areas for Visual Studio 2012. In Update 2, you can continue to drive quality wherever you are through web access for Test Case Management. You can author and execute test cases remotely, making it easier for all members of your team to participate in test case reviews. You can also profile your unit tests to create better code by tracking the end to end flow of your code, including the unit test itself.

Line-of-business (LOB) application development

With Update 2 we continue to invest in making it easier for you to develop LOB applications. You can quickly create SharePoint apps and HTML5 client apps using LightSwitch. Just design your app and let the LightSwitch templates provide the fit and finish so you can get your LOB applications running quickly. With the addition of WPF, Silverlight and SketchFlow to Blend for Visual Studio, now you have everything you need for designing and coding your desktop applications in Visual Studio.

Developer experience

When you spend a lot of time developing software, you want tools that will provide an enjoyable developer experience. Update 2 includes enhancements and updates to improve the developer experience for Visual Studio 2012. Code map debugger integration gives you a visual representation of your code while debugging so you can identify issues faster. You can also create great apps for Windows Store using profiling enhancements to find issues earlier that could impact your users.

Plus more… Full description of Visual Studio 2012 Update 2 can be viewed at http://support.microsoft.com/kb/2797912

Additional downloads for Visual Studio 2012 Update 2 (Visual Studio 2012.2) are also available for:

Windows 8 Rocks!

Aside

Windows 8 Pro

I have been using Windows 8 full time now for just over a month, a fairly short period (I did have a VM running for a couple of months to check it out as well, though to be honest did not have much time to play with it).

I did not think I would be a fan, I tended to heavily customize and favour my start menu structure, but I can honestly say I don’t miss the start menu; hitting the start button and just typing one or two letters of what I want is so smooth and fast that I am kinda glad to be rid of my OCD organization of my start menu into organized sub folders and groupings.

The start screen is also growing on me, quite like the live tiles, even though I spend almost all my time in desktop mode and I have no touch screen, I still use it. It is easy to use and a nice change from small static icons.

Most significantly, as a rather heavy user of VMs and high memory development software, plus 30-50 windows open at any one time across 3 to 5 screens; is that the whole OS is lot faster and slicker, even with two or three VMs running in the background, all on a laptop, not a high spec desktop.

Hyper-V was the main reason I took the plunge, it’s integration is very nice; but having used the OS for everyday work, developing and maintaining everything from WPF, .NET and COM+ to old VB6 code, I actually regret not having migrated earlier…

Hyper-V On Windows 8 - Why?

Hyper-V On Windows 8 – Why?

Admittedly there are several hoops to jump through to get VB6 to install correctly, and our antivirus solution (McAfee 8.7i) took a bit of work to install (see https://developtheweb.wordpress.com/2013/02/13/trying-to-install-mcafee-8-7i-onto-a-windows-8-box/), but got them both working and do not have any apps I currently use that I have not been able to install (for Windows 7 SDK on Windows 8 box see https://developtheweb.wordpress.com/2013/03/04/windows-sdk-for-windows-7-and-net-framework-4-on-a-windows-8-pro-dev-box/ – same issue affects latest SP of Windows 7 as well).

All in all I’d happily recommend Windows 8 to anyone, whether for business, development or personal use.

Update: Forgot to mention another neat one… I use a lot of ISO disk images, Windows 8 supports them out of the box, no need for 3rd party tools and drivers, just right click and Mount; and you can mount many at once!

P.S. for VB 6 run setup in compatibility mode, deselect the Data Access components and Source Safe bits, install will say it fails at end but it hasn’t, it can be found in your program files directory. Then install VB6 SP6, which should pass. If you run into trouble with SP6 and it will not install, then make sure VB6 GUI is in the program files directory, (x86) on 64bit, and apply the following to your registry via a reg file: –

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MS Setup (ACME)]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MS Setup (ACME)\Table Files]
“Visual Basic 6.0 Enterprise Edition@v6.0.0.0.0626 (1033)”=”C:\\Program Files (x86)\\Microsoft Visual Studio\\VB98\\Setup\\1033\\setup.stf”

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Visual Basic 6.0 Enterprise Edition]
“DisplayName”=”Microsoft Visual Basic 6.0 Enterprise Edition”
“UninstallString”=”\”C:\\Program Files (x86)\\Microsoft Visual Studio\\VB98\\Setup\\1033\\Setup.exe\””

(change directories/reg key as appropriate, this one is for 64bit)


A nice vid on Windows 8, what’s changed and where to find your stuff…

(25 min)

Alternatively, from the same guy, for the tech savvy or those folks short of time – same content in just 4 minutes.

.NET Development :: Accessing Special Folders Location Across Different Windows Versions & Tightened Security Within Windows Environment

I am writing this post as I know quite a few developers only now migrating apps from Windows XP environments, most of whom are spending a lot of time fighting with the new tighter security world that started to come in with Windows Vista.

As most know; the directory structure for user files and temporary documents has changed over the life of Windows (“C:\Documents and Settings\…” is now “C:\Users\…”, Program Files location changes for 64 bit, etc).

In addition to this many of the folders and registry keys, that as a developer, you used to be able to write files and values to are no-longer accessible. In addition to this areas of the event log are also locked down, and writing to it can crash your application if not handled correctly.

So now on Windows Vista, Windows 7 and Windows 8, as a developer you cannot and should not be writing to Program Files, the root of any of your drives, Windows folder, etc, etc. This can also include the traditional temp folder (C:\Windows\Temp or C:\Temp).

The only places you can write to with any certainty are the user specific Temp folder, the ProgramData folder, or the users document store.

If you are having to deal with a legacy app you might have to manually (or programatically) override the security settings granting permissions to write files to the locations you need, though you should do so with caution, as Windows updates and security patches can reverse your changes.

All of these locations vary depending on the system setup and operating system, so what is the best way to handle it?

Well in any .NET App you can easily access any of these folders locations using the Environment namespace (System.Environment) and the SpecialFolder enumeration.

For example: –

Console.WriteLine(“Folder Path: {0}”,
System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData));

A full list of the special folders can be found at http://msdn.microsoft.com/en-gb/library/system.environment.specialfolder.aspx

This is not a list of those accessible for writing to, it is a complete list.

In addition to these you can also access the traditional list of environment variables using: –

System.Environment.GetEnvironmentVariable(string);

Though for this you need to know what is available as it will cause an exception if you call for a variable that does not exist.

You can get a full list of what is on your current system with: –

var s = System.Environment.GetEnvironmentVariables();
foreach (System.Collections.DictionaryEntry item in s)
{
Console.WriteLine(“{0} = {1}”, item.Key, item.Value);
}

But you need to avoid app specific ones, and watch out for some that may have changed names over the years.

You can access the documentation (.NET 4.5) for the System.Environment class at http://msdn.microsoft.com/en-us/library/z8te35sa.aspx or via your Visual Studio help.


With regards to the Event Log, you need to make sure you create your event source during your app install (or have an admin add it into the appropriate event log). This may not be caught during development as most developers run as admin and may even turn off all the UAC protection.

If you don’t then the kind of error you might see in Visual Studio would look something like: –

Security Exception when trying to write to Event Log

Security Exception when trying to write to Event Log.
“The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible logs: Security.”

But all your users will see is something like: –

App crash when trying to write to Event Log

App crash when trying to write to Event Log

If you need to use the event log (which is good practice), then make sure you have created your source during your install and not during your exception handling.


As for the registry, unless your app is running in elevated mode, the only hive you now have access to is HKEY_CURRENT_USER, some of which itself may have been locked down, by specific apps to prevent changes. So if you need to read from HKEY_LOCAL_MACHINE then you should not be using CreateSubKey; but creating your keys/valuse during or app elevation and using OpenSubKey for reading… remember you exception capturing though, similar to Environment Variables, you’ll get an exception if you don’t have access or the key does not exist.