Cannot install in Visual Studio 2022 - c++-winrt

I get a notification telling me this is available in Visual Studio 2022 (Version 17.0.0 Preview 4.1). However, it will not install - any advice?
The errorlog shows the following:
10/1/2021 8:06:19 AM - A cycle was detected in the dependency graph:
Microsoft.VisualStudio.ComponentGroup.UWP.VC
---> Microsoft.VisualStudio.ComponentGroup.UWP.VC
10/1/2021 8:06:19 AM - Install Error : Microsoft.VisualStudio.Setup.Dependencies.DependencyGraphConstructionException: A cycle was detected in the dependency graph:
Microsoft.VisualStudio.ComponentGroup.UWP.VC
---> Microsoft.VisualStudio.ComponentGroup.UWP.VC
at Microsoft.VisualStudio.Setup.Engine.GetProductDependencyGraph(Product product, Boolean overwrite)
at Microsoft.VisualStudio.ExtensionManager.SetupEngineService.get_GetProductDependencyGraph()
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl extension, Boolean installPerMachine, Boolean isPackComponent, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, IProgress`1 progress, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion, IInstalledExtension& newExtension)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal(InstallableExtensionImpl extension, InstallFlags installFlags, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress, Version targetedVsVersion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, InstallFlags installFlags, AsyncOperation asyncOp)

This is a known issue with the C++/WinRT VSIX and Visual Studio 2022 Preview 4.1:
Unable to update from Preview 1.1 to Preview 2.0. A cycle was detected in the dependency graph: Microsoft.VisualStudio.ComponentGroup.UWP.VC (Microsoft claims to have fixed the issue, though it's still there for everyone trying to update the C++/WinRT VSIX)
VS 2022 VSIX support (Bug report against the C++/WinRT repo about the update issue; no resolution thus far)
At this time it has not been officially described, what the issue is, which team will need to resolve it or when we can expect to receive an update.

Related

SSMS 18.4 installation will not run

I am having trouble installing SSMS on a fresh installation of Windows 10 - on a new Dell XPS 15.
I am installing the latest version (18.4) from here: https://learn.microsoft.com/en-gb/sql/ssms/download-sql-server-management-studio-ssms
When I run SSMS-Setup-ENU.exe I get the User Access Control dialogue, I say Yes and nothing happens.
I cannot see any processes starting in Task Manager.
Logs indicate that the installationg cannot start. From googling this error suggests that I'm missing a version of dotnet framework.
I have installed Visual Studio 2019 + all the dotnet frameworks (everything from 4.6 to 4.8) + Dotnet Core.
Does anybody have any ideas - what am I missing or doing wrong? :/
Thanks for your help!
Error (ommitting all of the noise)
[2E90:33E8][2019-12-09T10:55:43]i000: Loading managed bootstrapper application.
[2E90:33E8][2019-12-09T10:55:43]e000: Error 0x80131902: Failed to create the managed bootstrapper application.
[2E90:33E8][2019-12-09T10:55:43]e000: Error 0x80131902: Failed to create UX.
[2E90:33E8][2019-12-09T10:55:43]e000: Error 0x80131902: Failed to load UX.
[2E90:33E8][2019-12-09T10:55:43]e000: Error 0x80131902: Failed while running
[2E90:33E8][2019-12-09T10:55:43]e000: Error 0x80131902: Failed to run per-user mode.
[2E90:33E8][2019-12-09T10:55:43]i007: Exit code: 0x80131902, restarting: No
Installed dotnet framework
PS C:\> wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version
Version
4.5.50932
4.8.03928
4.6.01055
4.7.02558
4.5.50710
24.64.28315
3.0.1.0
4.8.03761
3.0.1.014347
13.0.19213.0
4.7.03081
4.7.02053
12.16.14727
24.0.28113
4.7.02558
3.1.0.0
4.7.03062
12.2.18292.0
3.1.0.014727
12.0.30731
24.64.28315
2.1.14.014727
1.0.20910.0
4.6.01590
4.7.02053
24.4.28216
4.8.03928
2.1.14.0
24.64.28315
4.8.03761
4.8.03928
3.0.0127.060
3.1.0.0
16.120.28209
4.6.00081
24.64.28315
3.1.100.014727
3.0.1.0
24.64.28315
24.4.28216
4.0.30319
3.1.0.0
4.5.51651
4.7.02558
4.6.01055
4.7.02558
4.6.01590
24.64.28315
24.64.28315
24.64.28315
3.0.1.0
24.0.28113
24.4.28216
16.4.457.38025
4.6.01590
4.7.03062
24.64.28315
3.0.1.014727
24.4.28216
4.7.02053
24.4.28216
4.6.01055
24.64.28315
4.8.03761
Argh I have worked out my problem - it's pretty dumb.
I forgot that I updated the machine.config with some settings but there was a mistake and missing a closing ". This meant that the configuration was invalid and therefore the installer wouldn't run. šŸ™ˆšŸ™ˆ
WE had similar problem:
Issue 1:
The management studio update checker package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension.
Restarting Visual Studio could help resolve this issue.
Issue 2:
The configuration section 'system.web' cannot be read because it is a missing a section declaration.
\?D:\wwwroot\testsite\web.config
While troubleshooting, we found that .NET Framework directory for 32 bit 4.7.1 was missing required config directory which contains necessary default machine.config file. These files are necessary for all applications to run. We copied the files from a working server on to the server which had the problem. We were then able to use current SSMS (v18.4) as well as upgrade it to v18.6. Also, IIS level config errors were gone.
Directory path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config

Getting Exception While Subscribing TextBox LosingFocus Event UWP XAMl

I am Dynamically creating a TextBox Control and I have Subscribed the TextBox LosingFocus Event and Its working fine on Local Machine but it is giving exception on Virtual Machine.
Getting the Following Error:
Unable to cast object of type 'Windows.UI.Xaml.Controls.TextBox' to
type 'Windows.UI.Xaml.IUIElement5
and The Stacktrace is:
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW_WinRT(Object objSrc, IntPtr pCPCMD,
IntPtr& ppTarget) at
Windows.UI.Xaml.UIElement.add_LosingFocus(TypedEventHandler`2 value) at
System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal.NativeOrStaticEventRegistrationImpl.AddEventHandler[T](Func`2
addMethod, Action`1 removeMethod, T handler)
at
System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal.AddEventHandler[T](Func`2
addMethod, Action`1 removeMethod, T handler)
_XamlTypeInfo.XamlUserType.ActivateInstance()
Please Help me To Solve That Issue.
Thanks.
The LosingEvent has been introduced in the Windows API contract V4 (Windows build 15063+).
It is not available on the Windows build you are using in your VM (14393).
You can see the minimal OS/API contract version in the LosingEvent documentation
Additional features and requirements
Device family : Windows 10 Creators Update (introduced v10.0.15063.0)
API contract : Windows.Foundation.UniversalApiContract (introduced v4)
Since you're minimal target is Windows build 10240 (API contract V1), you need to perform a runtime check before registering to this event.
if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract"), 4, 0)
{
// This device supports all APIs in UniversalApiContract version 4.0
}
This is the only way to validate if the API is available. You will have a detailed explanation about how to target multiple Windows version here
If the event is absolutly mandatory for what you want to do, you will need to upgrade the minimum target platform to 15063. By doing this, your application will no longer be able to run on older OS builds.

Using XAML UpgradeTemplate with TFS 2015 \ 2017

I ran into this issue upgrading from TFS 2013 to 2017. If you are still using the UpgradeTemplate.xaml to run old TFS 2005\2008 style MSBuild Team Builds (TFSBuild.proj) you will find that they do not work with the TFS 2015 or 2017 XAML build agent.
You will get this error when running the build due to some breaking changes that were introduced in the core assemblies. XAML builds have been deprecated for some time... and the old MSBuild based Team Builds are waaaayyyyy out of support. So Microsoft (rightfully) doesn't care.
But is there a way to get these builds working in TFS 2015\2017? It would be a big waste of time to convert these over to using XAML builds only to then convert them to the new build engine after upgrading to TFS 2017.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets (957): The following errors were encountered while processing the workflow tree:
'VisualBasicValue<LabelChildOption>': Compiler error(s) encountered processing expression "Microsoft.TeamFoundation.VersionControl.Client.LabelChildOption.Fail".
'LabelChildOption' is ambiguous in the namespace 'Microsoft.TeamFoundation.VersionControl.Client'.
'VisualBasicValue<RecursionType>': Compiler error(s) encountered processing expression "Microsoft.TeamFoundation.VersionControl.Client.RecursionType.Full".
'RecursionType' is ambiguous in the namespace 'Microsoft.TeamFoundation.VersionControl.Client'.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets (957): The "Label" task failed unexpectedly.
System.Activities.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:
'VisualBasicValue<LabelChildOption>': Compiler error(s) encountered processing expression "Microsoft.TeamFoundation.VersionControl.Client.LabelChildOption.Fail".
'LabelChildOption' is ambiguous in the namespace 'Microsoft.TeamFoundation.VersionControl.Client'.
'VisualBasicValue<RecursionType>': Compiler error(s) encountered processing expression "Microsoft.TeamFoundation.VersionControl.Client.RecursionType.Full".
'RecursionType' is ambiguous in the namespace 'Microsoft.TeamFoundation.VersionControl.Client'.
at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.WorkflowApplication.EnsureInitialized()
at System.Activities.WorkflowApplication.RunInstance(WorkflowApplication instance)
at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
at Microsoft.TeamFoundation.Build.Tasks.WorkflowTask.ExecuteInternal()
at Microsoft.TeamFoundation.Build.Tasks.Task.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
You can work around this error if you donā€™t care about labeling your code as part of the build process or updating associated work items. In my case I was still using the UpgradeTemplate as a convenient way of performing a check-in based ā€œGet-Latestā€ of source code in TFVC to the builds folder on the build machineā€¦ not really a ā€œbuildā€ at all. So this was A-OK.
Set these two properties to true in your TFSBuild.proj
This will cause MSBuild to skip execution of the CoreLabel and the CoreGetChangesetsAndUpdateWorkItems targets. CoreLabel is the one which loads the task that is failing the build... and CoreGetChangesetsAndUpdateWorkItems needs the label to exist or it will also fail.
I found these properties by digging through the old C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets - which is the team build script that shipped with TFS 2005 \ 2008.
<SkipLabel>true</SkipLabel>
<SkipGetChangesetsAndUpdateWorkItems>true</SkipGetChangesetsAndUpdateWorkItems>

Converting to VS 2017 .csproj format with PackageReference

I have a legacy solution which I've been gradually upgrading and now want to upgrade the .csproj and .vbproj files to the new 2017 format with PackageReference rather than the packages.config.
The overall solution has around 60+ projects so migrating by hand would be VERY painful. I've been searching for a utility to automate the process without success. Does anyone know of any scripts out there for doing this?
I've tried using NuGet PackageReference Upgrader but id doesn't work. I get the following error in my output window
24/05/2018 8:37:22 AM: Update failed. Exceptions:
24/05/2018 8:37:22 AM: Message: Object reference not set to an instance of an object.
at CloudNimble.PackageReferenceUpgrader.NuGetUpgraderPackage.<>c__DisplayClass9_1.<UpgradePackagesConfig>b__12(XElement c) in C:\projects\packagereferenceupgrader\src\CloudNimble.PackageReferenceUpgrader\NuGetUpgraderPackage.cs:line 187
at System.Linq.Enumerable.<>c__DisplayClass6_0`1.<CombinePredicates>b__0(TSource x)
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at CloudNimble.PackageReferenceUpgrader.NuGetUpgraderPackage.<>c__DisplayClass9_0.<UpgradePackagesConfig>b__1(Int32 i) in C:\projects\packagereferenceupgrader\src\CloudNimble.PackageReferenceUpgrader\NuGetUpgraderPackage.cs:line 187
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
24/05/2018 8:37:43 AM: Backup created for D:\workspace\e5tfs\dataract461\e5 Releases\Dev\e5 Foundation\e5 Legacy\Source\SharedAssemblies\Repository\packages.config.
24/05/2018 8:37:43 AM: Update failed. Exceptions:
24/05/2018 8:37:43 AM: Message: Object reference not set to an instance of an object.
at CloudNimble.PackageReferenceUpgrader.NuGetUpgraderPackage.<>c__DisplayClass9_1.<UpgradePackagesConfig>b__12(XElement c) in C:\projects\packagereferenceupgrader\src\CloudNimble.PackageReferenceUpgrader\NuGetUpgraderPackage.cs:line 187
at System.Linq.Enumerable.<>c__DisplayClass6_0`1.<CombinePredicates>b__0(TSource x)
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at CloudNimble.PackageReferenceUpgrader.NuGetUpgraderPackage.<>c__DisplayClass9_0.<UpgradePackagesConfig>b__1(Int32 i) in C:\projects\packagereferenceupgrader\src\CloudNimble.PackageReferenceUpgrader\NuGetUpgraderPackage.cs:line 187
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
Converting to VS 2017 .csproj format with PackageReference
I have created a simple sample with packages.config, I can migrate it to PackageReference via the tool NuGet PackageReference Upgrader. It is difficult to figure out the reason why you get that error based on the error log.
You can contact the owner of that extension by Q & A, If you are interested in.
To accomplish migrate Packages.config to PackageReference, you can download the Visual Studio Version 15.7 Preview 3, which supports migrating a project from the packages.config management format to the PackageReference format. Check the Visual Studio Blog: Visual Studio 2017 version 15.7 Preview 3 for some more details.

Rider got "There was no build tools found" error

I installed the Jetbrains Rider IDE EAP 12 (163.6834) in macOS, and create a new project of asp.net core mvc, but I got a error when I press Run button as below, I guess this is because my System toolset is empty in Preferences as screenshot, but I dont' know how to solve it.
ā€” EXCEPTION #1/2 [InvalidOperationException]
Message = ā€œThere was no build tools foundā€
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
HResult = COR_E_INVALIDOPERATION=80131509
Source = JetBrains.Platform.ProjectModel.Host
StackTraceString = ā€œ
at JetBrains.ProjectModel.ProjectsHost.MsBuild.MsBuildSessionHolder.CreateSession () [0x00036] in <d56975ff7c7b45ca9ece62fa812698e6>:0
at JetBrains.ProjectModel.ProjectsHost.MsBuild.MsBuildSessionHolder.get_Session () [0x0000a] in <d56975ff7c7b45ca9ece62fa812698e6>:0
at JetBrains.ReSharper.Host.Features.EditProjectProperties.EditProjectProperties.<.ctor>b__0 (JetBrains.DataFlow.Lifetime lt, JetBrains.Rider.Model.EditProjectPropertiesSession editSession) [0x0011a] in <ec4b565dcde946098d9abab7af9373d2>:0
at JetBrains.Platform.RdFramework.Util.ReactiveEx+<>c__DisplayClass41[T].<ViewNotNull>b__3 (JetBrains.DataFlow.Lifetime lf, T v) [0x00008] in <1c6833f330ab4917b71044a5ce3ead83>:0
at JetBrains.Platform.RdFramework.Util.ReactiveEx+<>c__DisplayClass1 1[T].<View>b__0 (T v) [0x00011] in <1c6833f330ab4917b71044a5ce3ead83>:0
at JetBrains.Platform.RdFramework.Util.Signal1[T].Fire0 (System.Action 1[T][] listeners, T value) [0x0000a] in <1c6833f330ab4917b71044a5ce3ead83>:0
ā€
Are you a solution .NET Core only or you use mixed xproj and csproj solution? Currently, Rider support to build a mixed solution only on Windows platform with installed VS 2015 and .NET Core VS tools.