Visual Studio 2017 debugger fails connected to a ClearCase mapped drive - visual-studio-2017

I'm using Visual Studio 2017 with a ClearCase dynamic view connected to a mapped drive.
Starting a debugger session fails with:
Unable to start program filename.exe.
Operation is not supported.
Unknown error: 0x80070057.
Using a ClearCase snapshot view, the debugging session works as expected, without error message.
Visual Studio 2013 works perfectly fine with a snapshot or dynamic view.
Any help would be appreciated.

It depends on your exact ClearCase version, as seen in this PI45450 (project issue, similar but not identical to your case)
PI45450: RUNNING AN .NET EXECUTABLE IN A DYNAMIC VIEW FAILS WITH RUNTIME ERROR SYSTEM.ARGUMENTEXCEPTION 0X80070057 (E_INVALIDARG)
Recommendation:
Running the executable by specifying its fully qualified UNC
pathname may work, such as
\\view\viewtag\vobtag\<application>.exe
In your case, with Windows:
m:\viewtag\vobtag\<application>.exe
See if the full path (M:\...\<application>.exe) works better with Visual Studio 2017.
Or try and upgrade ClearCase if possible (8.0.1.10+).

There is a new ClearCase APAR for this behavior, because it was initially reported only if the CC VS 2017 integration was installed. It actually doesn't need the integration, at least not on Windows 10 with UAC on. The APAR is PI86014, but it may not be visible yet as it's really new.
The issue is specific to Visual Studio 2017, Visual Studio 2015 will open and start the debug session fine, and the debug executables load just fine from a dynamic view.
The integration released in the technote seems to be a little buggy. Perhaps the one in 9.0.0.5 and 9.0.1.1 will behave better.

Related

Package manager console in VS 2017 cannot run exe file located in %windir%\system32

A hello world C# x64 application created in Visual Studio 2017 is executed successfully via Package Manager Console (PMC) everywhere else except %windir%\system32 location. The strange thing is that it is executed in Windows PowerShell (not as admin) but not from PMC in Visual Studio 2017. I thought it was an issue of the execution policy, but it was not. I changed the execution policy in PMC to match the windows PowerShell execution policy, but it didn't make any difference. I also executed the command Set-Location $env:windir\system32 and then Get-Location to confirm it, but it had no effect. Any ideas?System: win7x64Visual Studio 2017 15.6.0
I figured it out. Actually i had to do exactly the opposite. Visual Studio is 32-bit and therefore prefer 32-bit option must be selected in the executable build options in C#. Then the executable must be stored in %windir%\syswow64 and everything works fine.

Error loading visual studio 2015 C++ project, how to debug

I have a VS 2015 C++ project on a remote directory that I want to share between 2 computers. On one computer it loads fine (it has Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3 Microsoft .NET Framework Version 4.6.01055) on the other computer it fails to load (it also has Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3 Microsoft .NET Framework
Version 4.6.01055). When it fails to load I get the (not very informative message)
TargetImager.vcxproj: The application which this project type is based on
was not found. Please try this link for further information
[The link is completely useless!]
I opened the project file in the solution (can't remember how I managed to do this) and it presents a number of warnings eg.
Severity Code Description Project File Line Suppression State
Warning The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'PlatformToolSet' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property, VisualStudioVersion, MinimumVisualStudioVersion, AdditionalFileItemNames, AllowUnsafeBlocks, AppConfigForCompiler, ApplicationIcon, ApplicationRevision, ApplicationVersion, AppDesignerFolder, AspNetConfiguration, AssemblyKeyContainerName, AssemblyKeyProviderName, AssemblyName, AssemblyOriginatorKeyFile, AssemblyOriginatorKeyFileType, AssemblyOriginatorKeyMode, AssemblyType, AutoGenerateBindingRedirects, AutorunEnabled, BaseAddress, BootstrapperComponentsLocation, BootstrapperComponentsUrl, BootstrapperEnabled, CharacterSet, CheckForOverflowUnderflow, CLRSupport, UseDebugLibraries, CodePage, Configuration, ConfigurationName, ConfigurationOverrideFile, CreateDesktopShortcut, CreateWebPageOnPublish, CurrentSolutionConfigurationContents, DebugSecurityZoneURL, DebugSymbols, DebugType, DefaultClientScript, DefaultHTMLPageLayout, DefaultTargetSchema, DefineConstants, DefineDebug, DefineTrace, DelaySign, DisableLangXtns, DisallowUrlActivation, CodeAnalysisAdditionalOptions, CodeAnalysisApplyLogFileXsl, .... Miscellaneous Files H:\CodeProjects\QTProjects\TargetImager\TargetImager.vcxproj 20
Here is the section of the project file XML
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<PlatformToolSet>v140</PlatformToolSet>
It doesn't like this PlatformToolSet setting for instance. I don't get it because it is a setting in the property pages on VS2015 that can be selected. I anyway changed this property clicked apply then changed it back clicked apply. It is still there in the project file as before with same error message, I also changed the setting to v140_xp just to verify that it was seeing the new property which it was.
The story is that I was working on one computer with VS 2015, then I wanted to run something on another remote computer, however by then VS 2015 was replaced with VS 2017 and I installed VS 2017 on the remote. I built the project on VS2017 but then went back to the local PC with VS2015 to do some QT stuff (QT plugin is not yet available on VS2017). This was OK but then it refused to load on the remote VS2017 PC. So I uninstalled VS2017 and replaced it with VS2015, the project still doesn't load on the remote PC with VS2015.
Maybe somehow I have a VS 2017 project that for some reason loads on one computer with VS2015 and not the other, hence the settings that VS 2015 doesn't like.
So I try to create a new QT GUI project (I installed QtVsTools extension) on the remote machine that has problems with my project file. And now I get an error (the same error also occurs with a new win32 console application)
.../TarImager.vcxproj cannot be opened because its project type (.vcxproj) is not
supported by this version of the application.
To open it please use a version of the project that supports it.
As far as I know .vcxproj has been supported since MS VS 2010
Any idea how I can debug this?
The visual studio install had become corrupted, I repaired the installation then was able to create projects again. If you get weird project loading errors, then maybe your VS install is messed up.

Unrecognized error occurred in the Windows Web Services framework

I'm trying to build and run a simple project in Visual Studio 2017 (C++) in x64 using the Local Windows Debugger. However every time I try to run it using the debugger I get this error.
This error doesn't show up when I change it from x64 to x86, but I need it to compile to x64. This has happened on both computers that I've tried it on, and seems to happen in every one of my projects. I've tried reinstalling Visual Studio already and nothing's changed. I've tried adding 'devenv.exe' as an exception to the Windows Firewall but no changes there either, even when I disabled the firewall completely. My antivirus isn't affecting it at all either: still happens when I disable it.
The application runs fine when I find it in the explorer and run it manually but then I don't have any debugging tools.
What am I doing wrong here, how do I make it build and run my project as x64?
I get this error every time I have an active VPN connection. If you use a VPN, try disconnect and see if the error disappears.
If you want to use a VPN, the solution (assuming you have Visual Studio 2017 Version 15.7 or later) is as follows:
Go to the Windows Start Menu and launch the “Developer Command Prompt for VS 2017 Preview”
Run: "%DevEnvDir%vsregedit.exe" set "%VSINSTALLDIR:~0,-1%" HKCU Debugger UseAnonymousPipes dword 1
Restart VS if it is already running
That solution is from this link to Microsoft.

Unable to start VS2012 Profiler

I'm trying to start a performance profiling session in Visual Studio 2012 RTM on Windows 8 PRO 64-bit for a console program (ANALYZE / Start Performance Analysis).
I get a popup message informing me
Could not load file or assembly 'Microsoft.VisualStudio.PerformanceTools.CounterInfo.dll' or one of its dependencies. The Specified module could not be found.
Apparently this can happen under VS2010 after KB2645410 is installed. I carefully followed the procedure given for this issue with the same error message:
Visual Studio 2010 SP1, KB2645410 and Add-Ins
However, that does not resolve the issue.
I have tried running VS2012 as Administrator as well.
How can I get the profiler working?
UPDATE
I can actually attach to a running instance of the project from the command line using the steps here:
Walkthrough: Command-Line Profiling Using Sampling
However, Visual Studio does not open the resulting .vspx file (it just does nothing after I open it with File / Open File).
UPDATE 2
Fuslogvw reports two binding errors when I attempt to start the profiler:
VS 2012 Profiler Binding Errors - Pastebin
Adding the following to the system path resolved the issue for me permanently.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools
Some other answers may be appropriate to other situations.
Note that you probably will need to run Visual Studio as Administrator for profiling to work correctly.
I also struggled with that issue.
I found a working solution for me:
I opende the XXX.sln file using notepad.
There i found several parts in the Project and Global Section looking something like this:
ProjectSection(SolutionItems) = preProject
Performance1.psess = Performance1.psess
EndProjectSection
I removed all of them and that made my Analyzer work again.
I delete the .suo file and everythings works correctly now.
The same question exists here:
http://social.msdn.microsoft.com/Forums/en-US/a6487155-980c-4bc8-82de-2fe588fdf37f/windows-update-kb2645410-and-performance-tools-error
The following are suggested workarounds:
Remove windows update KB2645410
Only run one instance of Visual Studio
If you are the administrator on your development PC you can add the permission to Everyone to read and execute all the content in the folder "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Performance Tools" and subfolders/files.
"I backed everything up and did a complete repair of Visual Studio using the original disk from Microsoft. That allowed the computer to shut down normally. Then I tried the patch again. It hung again, but after a few reboots we got a message about deleting corrupt files and finally everything seems OK."
My issue was resolved when I realized that my user access control was set too high. Once that was turned off, I rebooted and it all worked great.
Once I uninstalled re-sharper my issue was resolved.

How to uninstall/remove Visual Studio SP1

I have Windows 7 64-bit with Microsoft Visual Studio 2010 and subsequent installation of SP1.
If I open up Control Panels | Programs and Features, I see 3 entries for Visual Studio 2010, the third being one ADO.Net.
I tried to uninstall SP1 first and somehow that failed. It asked for the Visual Studio 2010 setup disk, which I put in. Sadly, after the completion, SP1 stayed in the Programs and Features list.
I tried uninstalling VS2010, which uninstalled nicely, but left the entry for SP1. I tried uninstalling SP1, but got a message that I had to have VS2010 installed, so I bit my lip, shoveled down my irritation, and reinstalled VS2010. I received only one option to install SP1, which I did. I guess you can consider that a reapply.
A refresh of Programs and Features showed once again 3 entries. I was able to uninstall SP1, at least the option was there and I was able to complete the uninstall. I kept the VS2010 disk in the CD tray. Sadly, closing Control Panel Programs and Features (CPPF subsequently) and reopening it, nicely showed Microsoft's bug invested SP1. Selecting to uninstall/change the entry results in a dialog to install SP1.
It appears that SP1 might be gone in part, but obviously not entirely. The entry, the executable/DLL tied to that entry is nicely there.
How do I remove/cleanup/delete/nuke VS2010 SP1 inclusive of CPPF and any other trash that it installed?
I just ran the web installer for VS2010 SP 1 with the following parameters. That forced it to uninstall and got me past the blocking issue:
VS10sp1-KB983509.exe /uninstall /force
I tried James solution above but it still didn't work and kept requiring the installation CD.
After further search I found this solution that worked for me:
Microsoft tool to remove Visual Studio 2010
As life moves on, I chose a chose maybe not the best solution, but it is a solution, so here is what I did.
I found an article, which talked about removing the entry from Control Panel | Programs and Features. http://www.roelvanlisdonk.nl/?p=1179. I then did other steps.
First from the link as I have a Windows 7 64-bit system, I went to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
in the registry. There were two locations, one the obvious with the name completely spelled out and the other with the DisplayName property set to the product name as part of a GUIID. I deleted both entries. The main entry with the nice name as the key was the one that deletes the program ID entry from the list.
I noticed that several products share the same InstallSource. That is bizarro (Smallville rocks and sadly ended), all in the C:\Windows\TEMP folder. As the actual setup program is under ProgramData folder, I am not sure what the TEMP folder entries do.
I deleted the ProgramData portion but left the C:\Windows\TEMP, although I am still thinking of cleaning that up, just am cautious.
I then deleted all other VS2010 components leaving the runtime. By the way, do not forget to delete Premptive's expensive and end user install based pricing product. That is further up (name sort ascending) under Dotfuscator...
That more or less cleaned things up. I am not sure what uses the VS2010 runtime, so I am leaving that. I assume that is what is installed at the VS2010 folder.
A side comment: I still find it strange that Microsoft in the registry follows a ...\Software\Microsoft\ entry. They do not follow that anywhere else. Why there?
Details:
In the registry, the information was:
{5AB7D739-1735-3A9E-BE73-C43507CB4E6F}
Uninstall String: MsiExec.exe /X{5AB7D739-1735-3A9E-BE73-C43507CB4E6F}
Install Source: C:\Windows\TEMP\Microsoft Visual Studio 2010 Service Pack 1_10.0.40219\
InstallLocation: C:\ProgramData\VS\vs10sp1\SetupCache\
Uninstall Path: C:\ProgramData\VS\vs10sp1\SetupCache\
Uinstall String: C:\ProgramData\VS\vs10sp1\SetupCache\Setup.exe
Shared products using C:\Windows\TEMP...40219 folder:
Microsoft SQL Server 2008 R2 Data-Tier Application Framework
Microsoft SQL Server 2008 R2 Data-Tier Application Project
Microsoft SQL Server 2008 R2 Management Objects
Microsoft SQL Server 2008 R2 Transact-SQL Language Service
Microsoft SQL Server System CLR Types
Microsoft Visual C++ 2010 x86 Runtime - 10.0.40219
Microsoft Visual F# 2.0 Runtime
Paths used by other products:
C:\Windows\TEMP\Microsoft Visual Studio 2010 Service Pack 1_10.0.40219\
C:\Windows\TEMP\Microsoft Visual Studio 2010 Service Pack 1_10.0.40219\Dotfuscator\
2 of several keys that share the same C:\Windows\TEMP folder entry (InstallSource):
InstallSource
{09C52940-A4D1-4409-A7CC-1AAE630CF578}
{1AA5BD63-6614-44B2-88A7-605191EDB835}
This answer on the MSDN forum explains a sequence for manual removal, but more importantly it also links to a Microsoft FixIt VS2010 Uninstall Utility which was the only way I was able to get rid of SP1.
None of the solutions here worked for me to remove VS 2010 SP1.
The visual stiduio 2010 uninstall utility worked nicely to remove everything but VS 2010 SP1.
to remove SP1 I went to the setup cache and ran setup as follows:
C:\ProgramData\VS\vs10sp1\SetupCache>setup /uninstall /force