visual studio crash after update 2? - crash

using vs2013 i had no problem so far with fxcop
new 'feature': devenv crashes after i select an entry in the code analysis sidebar (fxcop)
eventlog tells me:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
Stack:
at Microsoft.VisualStudio.CodeAnalysis.SdkUiUtilities.OpenDocumentInCurrentScope(System.IServiceProvider, System.String)
at Microsoft.VisualStudio.CodeAnalysis.SdkUiUtilities.OpenDocument(System.IServiceProvider, System.String, Boolean)
at Microsoft.VisualStudio.CodeAnalysis.ViolationResult.NavigateTo(Microsoft.VisualStudio.CodeAnalysis.ResultTextMarker, Boolean, System.String, Boolean)
at Microsoft.VisualStudio.CodeAnalysis.ViolationResult.OnSelect(Microsoft.VisualStudio.CodeAnalysis.AnalysisResults.SourceLocation[])
at Microsoft.VisualStudio.CodeAnalysis.ViewModel.CodeAnalysisResult.DisplaySourceTrace(Boolean)
at Microsoft.VisualStudio.CodeAnalysis.ViewModel.CodeAnalysisResult.Select(Boolean)
at Microsoft.VisualStudio.CodeAnalysis.CodeAnalysisResultsControl.AnalysisResultList_SelectionChanged(System.Object, System.Windows.Controls.SelectionChangedEventArgs)
at System.Windows.Controls.SelectionChangedEventArgs.InvokeEventHandler(System.Delegate, System.Object)
[...]
the last thing i changed afair was installing 'update 2'
extensions:
ankhsvn
behaviors sdk
MS advertising pubCenter&sdk, asp.net&webtools, mvc5 scaffolding
nuget
productivity power tools
relativelinenumbers (nice to have w/ vsvim)
visual f#
windowslib for js
vsvim
windows phone sdk
xamarin shell, .android & .ios
am i the only one experiencing this issue? could someone verify fxcop working with vs update 2?
EDIT / new info:
it seems to happen only with our custom rules - so it might not be an issue with visualstudio at all...
just flew over the code for the custom rule - since there's no code at all to manage opening the issue i'm back to thinking it's VS's fault
uninstalled xamarin, deactivated all extensions which let me, still crashing
tried devenv.exe with /SafeMode switch, still crashes
others in my team tried update 2 now, i'm the only one experiencing this issue - so i'm currently reinstalling vs2k13
completely uninstalled/reinstalled vs2013 now, problem persists.
tried various switches, no success with:
/ResetUserData
/ResetSettings
/ResetSkipPkgs
/ResetAddin
repair installed windows sdk, didn't help...
fiddled around w/ restore points - didn't help
any thoughts anyone?

Related

"Error 0x80070005: Failed to launch clean room process" while installing .Net Core SDK 2.1

My Visual Studio 2017 Professional stopped being able to load some projects in a solution, and on investigation, VS tells me that I have to install the ASP.NET and Web development feature. I'm sure that this is already installed (I have built this solution many times), but oh, well, I decided to click Install and re-install what VS claimed to be missing.
The VS 2017 Installer window displays and starts attempting to install .Net Core SDK 2.1. For some reason this silently fails. So I downloaded the executable dotnet-sdk-2.1.101-win-x64.exe and try to Run this as Administrator. This appears to start and then stops. Checking its log (C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Setup_20180322072534_Failed.txt), I can see the following error:
[1330:15A4][2018-03-22T07:25:34]e000: Error 0x80070005: Failed to launch clean room process: "C:\Windows\Temp{6B5E7797-D824-4BF0-9B51-A0375BFCE6F3}.cr\dotnet-sdk-2.1.102-win-x64.exe" -burn.clean.room="C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.Net.Core.SDK,version=15.6.27428.2011,chip=x64\dotnet-sdk-2.1.102-win-x64.exe" -burn.filehandle.attached=212 -burn.filehandle.self=220 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional" /log "C:\Users\Administrator.DODSON\AppData\Local\Temp\2\dd_setup_20180322072448_001_Microsoft.Net.Core.SDK.log" /quiet /norestart
I googled around for this error, and tried a couple of suggestions:
Changed the permissions on the C:\Windows\Temp so that Everyone has full control
Repaired the VC 2017 Redistributables
Updated Permissions on some registry keys relating to VC 2017 Minimum (I forget the exact name of the keys)
Nothing has worked, and I seem to be stuck. I don't seem to be able to install the ASP.NET and Web development feature without the .Net Core SD. Has anyone seen or solved this problem?
In case anyone runs into the same issue, I will post my solution. Essentially, I reset the permissions on the C:\Windows\Temp directory to allow Everyone full control permissions, and then manually re-ran the dotnet-sdk-2.1.101-win-x64.exe installer again as Administrator. This time it succeeded in installing the .Net Core SDK. I then ran the Visual Studio Installer again to re-install the ASP.NET and Web development feature, and now everything is working again.

Xamarin Forms in Visual Studio 2017 XAML validation

I am really new to Xamarin.Forms and trying to learn using this nice tutorial.
I have managed to set up everything in Visual Studio 2017 Community Edition and successfully deploy to both emulated and physical devices (Android only).
During various trials, I have noticed that some XAML errors are not highlighted and build is successfully performed, but XAML failed at runtime, crashing the app. E.g. misspell a style name or any an attribute value.
Running in debug mode will just hang the app. Breaking it indicates the following line:
public partial class MainPage : global::Xamarin.Forms.ContentPage { [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
private void InitializeComponent() {
// this is the last line from my code that hands when XAML is invalid
this.LoadFromXaml(typeof(MainPage));
}
}
Resuming the execution shows a hint of what is wrong (no fancy details as provided by the new VS2017 exception interface):
Unhandled Exception:
Xamarin.Forms.Xaml.XamlParseException: occurred
Question: Is there a way to catch invalid XAML errors earlier? Or at least obtain more relevant information? Or is this a known limitation of Xamarin.Forms?
To make things worse, autocomplete for attribute values does not seem to work in VS2017 (it works in VS2015), but this is another issue for another question.
Further details about installed software:
Microsoft Visual Studio Community 2017
Version 15.0.26228.9 D15RTWSVC
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Community
Xamarin 4.3.0.795 (aece090)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 7.1.0.41 (9578cdc)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 10.4.0.123 (35d1ccd)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
To catch XAML errors at compilation time you have to add one line to AssemblyInfo.cs :
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
More information on this can be found here.
Unfortunately Xamarin.Forms XAML intellisense support in VS is not like for WPF or SilverLight, it's very limited currently. One suggestion can be to write your ui in code, this way you will get a feedback faster and if you are very new to Xamarin.Forms XAML you can get familiar with it much easier because of intellisense in code behind.
Another option is to use IDE extensions, in your case as I understand it is VS 2017 for Windows so it will not help you, but for Xamarin Studio for MC you have tools like mfractor, that build to solve the issues you addressed.

Global Assembly Cache - Assembly Install required

I am currently updating a VB.NET application with Visual Studio 2013 that possibly was originally created on VS2010 or VS2012.
This application uses a Network SQL Database
Everything goes fine up to the point of installing when just shows an error message. that says the Assembly 'Microsoft.VisualBasic.Shell.9.0' version 2.0.0.0
is required and then will not let me finish the installation.
The project has been exported using the Visual Basic tool [OneClick]
I have already checked the References list on the Project menu, and is not included there. Also not available to be added.
The project requires the Microsoft Framework 4.5, so it seems that the Shell v2.0.0.0 is pretty old...
Do you have any suggestions, this kept me scratching my head already quite a while...
I finally figured it out.
I am not too sure if this is the right solution or not but it worked for me. Hopefully this will help someone else.
It turn out to be a error with the framework I was compiling the project (v4.5),
I was trying to install it on a Windows 7 machine with a framework installed up to v4.0. I cant understand why this error message showed up instead of telling me the framework version required for the software was not installed.
But anyways, I changed the version on the compiler, build and export again. Another error pop up but it was because references to the DLL for the different framework version were not included in the project. After including them and set the value for "Copy to Local" to true, the installation worked like a charm.
So I got my program up and working.

Cannot attach to process in .net 4.0

** post was edited, more info below
I've just watched two great videos about Advanced Dotnet Debugging (by Brian Rasmussen) and I am trying to repeat some steps, but just don't know how to proceed with tis error:
An attempt to set a processes DebugPort or ExceptionPort was made,
but a port already exists in the process.
I've found some answers on google and i generally understand what the error says but I just don't understand one weird fact: when i compile my simple app < .NET 4.0, I can attach as the movie shows, trying to do the same after i compile targetting .NET 4.0 disables me from attaching.
One of google's answers says "try to attach from windbg using noninvasive mode" but.. Brian do not use any of such checkboxes. It just works on his videos.
What's the difference? Where's the catch? Is it Windows 7 vs Vista? Maybe some different compile settings matters?
I am using MS VS 2k10 with MS SDK with Windbg x86 downloaded from msdn and symbols correctly configured to http server. The system is MS Vista x86.
Resources (exact time >= 8:15):
http://channel9.msdn.com/posts/MDCC-TechTalk-Advanced-NET-Debugging-part-2
Edit:
Error shows when attaching to process that was run from VS. Trying to attach to process that was run /outside VS, windbg doesn't show any content.
Edit2:
Windbg had some refreshing problems in my system. Using few times "Windows \ [Undock | Dock all]" menu option i was able to see the content of attached process, that was missing.
So the only question now is: what's the difference when attaching to process started from VS, when it's compiled in once using target < 4.0 and again = 4.0? Why when targetting 4.0 windbg cannot attach to the process in not "noninvasive" mode. What has changed in VS 2k10?
I take it you're debugging from Visual Studio (F5) and then trying to attach. You can only have one active debugger at a time, so that is why you get this error. If you want to launch the process from VS, run it without debugging (Ctrl-F5). If you do that, you should be able to attach from WinDbg.
EDIT : I am sorry, I missed the point about various versions of .NET behaving differently in this respect, so let me try to address your questions again. The reason it "just works" in the video, is because I use run without debugging every time I launch from VS. So if you simply want to follow the examples in the videos, all you need to do is run without debugging.
I started using WinDbg/SOS on CLR2 and x86. Launching a x86 .NET process from VS back then would trigger the error, so I made a habit of just launching without debugging.
However, as you have discovered there are scenarios where you can actually attach to a process that is being debugged by VS. I can reproduce the scenarios you describe, but I can also attach to a x64, .NET 2 process started with debugging from VS2008, but I cannot attach to the same process if the platform is set to x86.
Apparently there are subtle differences that I haven't been aware of, and it doesn't seem to be related exclusively to the .NET version, as I can attach to a x64 .NET2 process even if it is under the control of the VS debugger.
I'll update my answer if I find additional details.

Silverlight designer unhandled exception

When I create a new Silverlight Application (C# if that matters) using Silverlight 4 (with or without WCF RIA Services Checked) and open the MainPage.xaml in the designer I receive an Unhandled Exception has occurred. Stack is below. This is on an unmodified project.
I have uninstalled all Silverlight and reinstalled the tools listed above. I the same error when I open the App.xaml file as well. When I compile it completes without error, however when I run the application it always comes up that Silverlight is not installed.
I have installed Visual Web Developer Express 2010 (v10.0.30319.1 RTMRel) and Silverlight Tools for VS2010 (v10.0.30319.332) on a 32bit Windows XP machine. The IDE works fine in other regards, only issue seems to be with xaml files.
Anybody run into this?
System.NullReferenceException
Object reference not set to an instance of an object.
at Microsoft.Expression.Platform.Silverlight.SilverlightDomainManager.CreateDomainCore()
at Microsoft.Expression.Platform.Silverlight.SilverlightDomainManager.CreateDomainInitial()
at Microsoft.Expression.Platform.Silverlight.SilverlightPlatformCreator.Initialize()
at MS.Internal.Platform.SilverlightPlatformImpl.Initialize()
at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.EnsurePlatformInitialized()
at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.EnsurePlatformInitialized()
at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String originalIdentifier, Boolean isGlobal, String identity, FrameworkName frameworkName, AssemblyName appAssemblyName, IVsHierarchy hierarchy)
at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProviderWorker(String identifier, IServiceProvider provider)
at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String identifier, IServiceProvider provider)
at MS.Internal.Providers.VSDesignerContext.CreateIsolationProvider(IServiceProvider provider, IVsHierarchy hierarchy)
at MS.Internal.Providers.VSDesignerContext.<>c__DisplayClass1.b__0(IsolationProviderProxy i)
at MS.Internal.Providers.IsolationProviderProxy.get_RealProvider()
at MS.Internal.Providers.IsolationProviderProxy.add_UnhandledException(UnhandledExceptionEventHandler value)
at MS.Internal.Designer.DesignerPane.LoadDesignerView()
After hours of pulling my hair out I found the following post that led me on the path to solving my problem. I had to uninstall the standard version of silverlight and then install the developer runtime and it solved all my problems. Go Figure.
Posted by Microsoft on 2/26/2010 at
12:40 PM Is what is likely
happening is that you have the
standard version of the Silverlight
runtime and you need to install the
developer runtime for Silverlight.
Blend will install and run with the
standard verison of the silverlight
runtime, but Visual Studio requires
the developer version of the runtime.
This issue is fixed in the RTM version
of Visual Studio.
For now, if you hit this issue, please
install the silverlight developer
runtime from this link:
http://go.microsoft.com/fwlink/?LinkId=146060
download Silverlight_Developer.exe
Did you install the latest Silverlight SDK?
http://www.microsoft.com/downloads/details.aspx?FamilyID=40ef0f31-cb95-426d-9ce0-00dcfabf3df5&displaylang=en