Visual Studi0 2022 Preview 2 is released

On 14th July, 2021, VS2022 Preview 2 is released.

There are some highlighted new features.

  1. New Font that is easier to read, Cascadia Code
  2. New refreshed Icons, that are clearer and easier to distinguish.
  3. Preview 1 was available only in English. Preview 2 now is fully localized. The supported language packs: English, Chinese (Simplified), Chinese (Traditional), Czech, French, German, Italian, Japanese, Korean, Polish, Portuguese (Brazil), Russian, Spanish, and Turkish.
  4. Now VS2002 will be the best place to build cross-platform apps. With Preview 2, we’ve extended our cross-platform capabilities, adding new CMake integration and seamless targeting for WSL2—with no need for manual configuration.
  5. Next Wave of cross platform apps with .NET MAUI and Blazor are ready in Preview 2.
  6. New Live Preview experiences for both XAML and web apps. You will be able to make those iterative changes to your application in the editor. And you could see the difference in real time. No more recompile-and-run when you just want to nudge something by a pixel or two! This is also provided in Preview 2 already.
  7. Hot Reload. It is including support for C++ apps. When you are able to edit C++ or .NET projects even the application is still running. You can also apple code changes without pausing your application. An “Apply code changes” button in the toolbar is added, by clicking it you can “reload” you updated code into the running application without stop and re-run with the latest code.

And more…

There are many more other new features are available in Preview 2. You may visit this page,  Summary of What’s New in this Release of Visual Studio 2022 version 17.0 Preview 2 to view the full list and more details.

Visual Studio 2022 (v17.0) Preview 1.1

In the past, I have blog that VS2022 Public Preview will be released in the summer time. It has been released and you could download and try it now.

On 17th June, 2021, VS Team has released VS2022 Preview 1.0.
Yesterday (24th June, 2021) VS Team released, VS2022 Preview 1.1.

The only issue addressed in Preview 1.1 on top of the Preview 1.0 is,

  • Fixed an issue causing Test Explorer to run very slow

What’s New in Preview 1.0?

  • Devenv.exe is now 64-bit
  • .NET 6 SDK (preview) is included in VS2022 Preview 1.0
  • New Git experience
  • …More

Some features are not yet ready in this preview 1.0/1.1

  • Web Live Preview
  • Instrumentation profiler
  • Azure Cloud Service project support
  • T-SQL debugger
  • Web Load Test and TestController/TestAgent
  • Azure DataLake
  • Coded UI Test
  • DotFuscator
  • Incredibuild IDE integration
  • IntelliCode find and replace by example

 

Try the Preview now

More Detail: Microsoft Official Site – Visual Studio 2022 Preview

Next version of Visual Studio, “VS2022”, Public Preview will be released this summer

Amanda Silver, CVP of Product-Developer Division announce that the next version of Visual Studio will be called VS2022. And its Public Preview will be available to download this summer. Let me do a short summary about the changes and share with you.

  • IDE will be running faster
    • VS2022 will be in 64-bit
  • New Design
    • Better clarity, legibility, and contrast
    • Cascadia Code
    • Personalization, you could make your own “IDE” just right for you.
  • Develop Modern Apps
    • Azure, better integration with GitHub for CI/CD, and with Azure
    • VS2022 will have full support for .NET 6.
    • .NET Multi-platform App UI (MAUI) will be included. You could build client apps on Windows, Android, macOS, iOS. You could also use ASP.NET Blazor for Web App.
  • Innovation 
    • Performance improved for Diagnostics and Debugging
    • Using Live Share to enable Real-Time Collaboration
    • AI IntelliCode engine provide more and deeper integrations into your daily workflows.
    • New support for Git and GitHub.
    • Improved Code Search
    • refreshing VS for Mac

Well, let’s wait and test this new VS2022 in the coming summer time.  Meanwhile, you could read from the original post here.

Enable TLS 1.2 or above on your ASP.NET Web App or WebAPI

The Transport Layer Security (TLS) 1.2 is a stadnard that provides security improvements over previous versions. More and more thrid-party APIs were configured to disable any requests from clients that were using TLS 1.0/1.1. So if your ASP.NET Web App or WebAPI Services Web Site will need to update to TLS 1.2 as well if your ASP.NET Web App or WebAPI Services Web Site has some calls to the third-party APIs, otherwise they will only return empty responses.

You could disable TLS 1.0/1.1 and only enable TLS 1.2 in your Web Server or in Azure, so that your hosting environments will no longer accept requests from earlier version of TLS.

But what happens on your application (ASP.NET Web App or WebAPI Services)? Depend on what version of .NET framework your project usrs will dicate the possible solutions available to you.

  1. If your project compiles against .NET Framework 4.7 or above, then you don’t have to do anything.
  2. If your project has been developed in a earlier version of .NET Framework, then you could either
    1. Recompile your project using .NET Framework 4.7 or above
    2. If recompiling is not an option, then you will have to update your .config file as below,
<configuration>
  <runtime>
    <AppContextSwitchOverrides value="Switch.System.Net.DontEnableSystemDefaultTlsVersions=false"/>
  </runtime>
  <system.web>
    <compilation targetFramework="x.y.z" />
    <httpRuntime targetFramework="x.y.z" /> 
  </system.web>
</configuration>

It is preferred that x.y.z are the same. So if your application is 4.6.2, then replacing x.y.z into 4.6.2.

Microsoft also has post a useful document on describing the best pratices to TLS 1.2. It will be great if you could read them all and understand them in order to fully secure your application(ASP.NET Web App or WebAPI Services).
https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls

 

“Package is not found…” when updating NuGet Package from Azure DevOps

if you are using the Azure DevOps, you may already know that it provides Azure Artifacts (it was called NuGet Package Management before VSTS renamed to Azure DevOps). With that you could create and share NuGet pacakges feed from public and private sources.

With the Azure DevOps CI pipeline, you could then build your solution, pack and push the NuGet package into private Azure Artifacts.

If you are already running in this way, you may have experience on trying to update the existing NuGet Package and it returns an error,

“Attempting to gather dependency information for package ‘xxx.newer.version’ with respect to project ‘ThisProject’, targeting ‘.NETFramework,Version=v4.7’

Package ‘xxx.newer.version’ is not found in the following primary source(s): ‘https://[YourDevOps_Name].pkgs.visualstudio.com/_packaging/[Your_AzureArtifacts_Name]/nuget/v3/index.json,https://api.nuget.org/v3/index.json’. Please verify all your online package sources are available (OR) package id, version are specified correctly.”

I tried to search from internet and found someone who is working in Microsoft has replied on 10th May 2018 as the following,


“Seems you are trying to download the package or packages that where just freshly pushed to VSTS nuget feed.
Since Visual Studio 2017 is listing it correctly, then the issue should not related to the feed on VSTS server.
If this occurs very recently(download the new refresh package) and your package is very large, this maybe a network delay. Suggest you use a fiddler trace when this issue happens again. This makes “some” sense, what you see is probably an incorrect propagation of pushed packages showing up in the search results but not yet available to download.
And some other also encounter the same issue and error as you.”

Well, I tried to use fiddler to see what is happening when I tried to update the package. Because I have also set up the upstream sources, so it checks on all the available NuGet Packages in private Azure Artifact until it founds the match one. (That also explains me another question, why it takes so long to attempt the dependency information for the updating NuGet Package). I could confirm that the newer package is updated in feed and may be taking a longer time to upload the actual package.

So next time, if you found the similar message when updating NuGet Package from Azure Artifact, you could do,

  1. Wait and retry later.
  2. if the problem keep exists, you could try to clear the NuGet Cache from VS–>Tools–>Nuget Package Manager–>Package manager Settings–>General.