VS 2022 Preview always crashing after adding a new file - tfs

When I try to add a new file to a project, the VS 2022 Preview always crashes. All information I can found in Event Log is the following:
Faulting application name: devenv.exe, version: 17.0.31423.177, time
stamp: 0xac8b0d94 Faulting module name: ntdll.dll, version:
10.0.19041.1023, time stamp: 0x7977b9de Exception code: 0xc0000374 Fault offset: 0x00000000000ff199 Faulting process id: 0x76a4 Faulting
application start time: 0x01d76db5c416e4bc Faulting application path:
C:\Program Files\Microsoft Visual
Studio\2022\Preview\Common7\IDE\devenv.exe Faulting module path:
C:\WINDOWS\SYSTEM32\ntdll.dll Report Id:
8f2ea6f1-6457-4367-9b8f-454e41a37167 Faulting package full name:
Faulting package-relative application ID:
Additional information:
the project is a .NET Framework project
the project is under TFS on-premise
it is under a private workspace
We can add new files without any problem to this project using VS 2019 Professional. When I open this solution with VS 2022 Preview - it loads. It compiles, everything is ok. But when I try to add a new file to the project, after a short time it crashes. Always.
Any idea?

I've had a similar issue that I can't track down, but it's having to do with adding another project to a blazor wasm project. If Ii only have the blazor prj, all is good, but the minute i add a console app or something else, the solution gets "corrupted" and won't compile and shows blank folders with ** in front of them. I've had to deleted the other apps, deleted the bin and obj folders, and just open the blazor app by itself.
I'm on .net 6/vs 2022 preview. Here are my versions:
3.1.411 [C:\Program Files\dotnet\sdk]
5.0.101 [C:\Program Files\dotnet\sdk]
5.0.203 [C:\Program Files\dotnet\sdk]
5.0.301 [C:\Program Files\dotnet\sdk]
5.0.302 [C:\Program Files\dotnet\sdk]
6.0.100-preview.6.21355.2 [C:\Program Files\dotnet\sdk]
--Visual Studio--
Microsoft Visual Studio Community 2022 Preview
Version 17.0.0 Preview 2.1
VisualStudio.17.Preview/17.0.0-pre.2.1+31521.260
Microsoft .NET Framework
Version 4.8.04084
Installed Version: Community
.NET Core Debugging with WSL 2 1.0
.NET Core Debugging with WSL 2
ASP.NET and Web Tools 2019 17.0.303.37752
ASP.NET and Web Tools 2019
ASP.NET Web Frameworks and Tools 2019 17.0.303.37752
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 17.0.303.37752
Azure App Service Tools v3.0.0
Azure Functions and Web Jobs Tools 17.0.303.37752
Azure Functions and Web Jobs Tools
C# Tools 4.0.0-2.21362.3+5f7ddf6f02d40036fdbf823cd9910027da277acd
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Fabric.DiagnosticEvents 1.0
Fabric Diagnostic Events
Microsoft Azure Service Fabric Tools for Visual Studio 17.0
Microsoft Azure Service Fabric Tools for Visual Studio
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft Library Manager 2.1.134+45632ee938.RR
Install client-side libraries easily to any web project
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio Tools for Containers 1.2
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
NuGet Package Manager 6.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
Razor (ASP.NET Core) 17.0.0.2135615+c94df2e3bebc72c937da0389b22d730b5ea7b19b
Provides languages services for ASP.NET Core Razor.
SQL Server Data Tools 17.0.62107.02200
Microsoft SQL Server Data Tools
TypeScript Tools 17.0.0701.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 4.0.0-2.21362.3+5f7ddf6f02d40036fdbf823cd9910027da277acd
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 17.0.0-beta.21352.5+3af67cd8ffd73b2dc443e1e24dc0cf28f7e1c608
Microsoft Visual F# Tools
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Container Tools Extensions 1.0
View, manage, and diagnose containers within Visual Studio.
Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.
Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers

Fortunately, after a new update the bug disappeared.

Related

Why are all my templates in visual studio gone?

I recently installed Visual Studio for Mac 2022. I had VS Mac 2019, and it had the .net templates. When I installed VS 2022, all my previous .net templates were gone, even though I selected to install .net templates. When I open VS 2019, it has all of the templates installed, even the ones that I installed with only VS 2022. Is there any way to fix this, or should I just use VS 2019? 2022 vs 2019
Could you please try to set your .NET SDK path?
You can locate it under Preferences->SDK Locations->.NET Core and set the path as /usr/local/share/dotnet/dotnet.
Hope this can help solve the problem.
Ref: https://developercommunity.visualstudio.com/t/Starter-templates-missing/10070338?space=41&q=missing+templates
The Other - .NET project templates in Visual Studio for Mac 2019 require the Mono framework.
In Visual Studio for Mac 2022 the project templates that require Mono have been removed.
Instead you can install the .NET SDK use the project templates that target .NET 6.0, .NET Core 3.1, and these are available from the Web and Console section, if the associated SDKs are installed.
To install the .NET SDK you can either download them directly from the download page or re-run the installer and ensure that .NET is selected.

Where in the Visual Studio installer do I find the BuildTools component?

In which Workload of the Visual Studio 2017 Community 15.9 installation would I find the VS2017 BuildTools component?
I am looking at the workloads in the installer options and there seems not to be any workload that has such a thing.
I even searched in the component in the Individual Components tab also but couldn't find anything matching the exact string.
The reason I am looking for it is that when I try to build the source code for ASP.NET MVC v5.2.6, I get the error message as follows.
> build
Could not find MSBuild.exe. Please install the VS2017
BuildTools component or a workload that includes it.
*** BUILD FAILED **
I had written to the ASP.NET MVC team earlier about this message before I had installed Visual Studio 2017. I had had just Visual Studio 2019 then and they asked that I install Visual Studio 2017.
I already have MS Build at various locations. I had multiple versions of MSBuild even before having installed VS 2017.
Build Tools for Visual Studio 2017 is still available as an online installer. You can get the current version here: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15.

No 'ASP.NET MVC 4' assemblies when installing Visual Studio Build Tools 2017

I have a TeamCity build machine with VS2017 build tools installed. The problem is that I don't see any 'ASP.NET MVC 4' installed in "c:\Program Files (x86)\Microsoft ASP.NET" folder. The assemblies are required to build project that reference e.g. System.Web.Http namespace. When building, I am getting exactly such errors.
When running Visual Studio Build Tools 2017 on TeamCity build machine I have following Workloads installed:
.NET desktop build tools
Web development build tools
Data storage and processing build tools
Individual components tab does not list ASP.NET MVC directly but I have "Advanced ASP.NET features installed.
Do I need to install any external component to enable building of ASP.NET MVC 4 on my build machine? Or maybe it is only including in 'Visual Studio Professional 2017' product, not the 'Visual Studio Build Tools 2017'?
Could it be the case that the installation is broken?
(Microsoft ASP.NET folder contains "ASP.NET Web Stack 5" but as said earier the entire "ASP.NET MVC 4" is missing).
Thanks, Radek
I am not familiar with Visual Studio Build Tools 2017. But you can try installing the standalone ASP.NET MVC 4 package:
https://learn.microsoft.com/en-us/aspnet/mvc/mvc4

How to get MSBuild 15 without a full install of Visual Studio?

"MSBuild is now installed in a folder under each version of Visual Studio." However, I do not want to install a full VS on the server. "MSBuild is now available as part of the .NET Core SDK."
Now that I've installed the .Net Core 2.1 SDK (and the 4.7.2 Framework), what is the path to msbuild.exe?
MSBuild.exe 15 was found after installing the VS Build Tools with no additional packages selected in the install interface.
Edit: Updated link above to go to older downloads. Expand 2017 panel, click Download, login with a Microsoft account, then you will see Build Tools for Visual Studio 2017 (version 15.9) in the list of available downloads.
Edit: increased minor version to 9 to reflect the latest of major version 15.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe

WebRole and WorkerRole Templates Missing in VS 2015

I have looked far and wide for the answer to this.
In Visual Studio 2013 I can easily create a WebRole and WorkerRole solution but in VS 2015 all I can seem to do is create a Website and WebJob.
Has the WebRole and WorkerRole been removed?
If not can you explain to me where it is - or why it is missing?
Download the Azure SDK for Visual Studio 2015 from here: https://azure.microsoft.com/en-us/downloads/
It should force you to close Visual Studio, but if it doesn't, do so anyways. Once it's installed, you can reboot it.
When you go to add a new project, you can look under Cloud and then choose Azure Cloud Service. This will give you the same old familiar screen, where you can choose a Web Role or Worker Role:
With a new install of VS2015 you have to download and install the Microsoft Azure SDK for .NET - See: https://msdn.microsoft.com/library/ff687127.aspx#Install
Microsoft Azure SDK for .NET extends Visual Studio and to install the Azure tools:
From Visual Studio's menu bar choose File -> New -> Project.
From Installed Templates choose either the Visual Basic or Visual C# node,
and then choose the Cloud node that contains a project template named Get Microsoft Azure SDK for .NET.
Note: This template only appears if you haven’t installed the Azure Tools.
To download the tools, choose the OK button.
An Azure Tools tab appears.
To start the download, choose the Download Azure Tools button to open the web installer.
Follow the instructions provided by the web installer to install the latest version of the Azure tools and the Azure SDK.
Azure Tools requires Internet Information Services (IIS) version 7, 7.5, 8, or Express. To install IIS or IIS Express, use the Microsoft Web Platform Installer.
Note: You might have to restart Visual Studio before the Azure project templates appear.

Resources