My newly installed Visual studio poped up a dialog box with the message of
An exception has been encountered. This may be caused by an extension.
You can get more information by examining the file 'C:\Users....\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.
And I found the following errors in the xml file.
A MEF Component threw an exception at runtime: Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "Microsoft.VisualStudio.IntelliTrace.SourceControl.HistoricalModeHint.HistoricalModeTaggerProvider". ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Diagnostics.Utilities, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. at Microsoft.VisualStudio.IntelliTrace.SourceControl.HistoricalModeHint.HistoricalModeTaggerProvider..ctor(SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adapterFactory) --- End of inner exception stack trace --- at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose() at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.b__0()
and
Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "Microsoft.VisualStudio.IntelliTrace.SourceControl.HistoricalModeHint.HistoricalModeTaggerProvider". ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Diagnostics.Utilities, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. at Microsoft.VisualStudio.IntelliTrace.SourceControl.HistoricalModeHint.HistoricalModeTaggerProvider..ctor(SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adapterFactory) --- End of inner exception stack trace --- at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose() at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.b__0() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.b__0() at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_01.<As>b__0() at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue() at System.Lazy1.get_Value() at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
I tried to repair VS but it doesn't help. I also tried to force the cache to be rebuilt:
Delete the contents of the folder at "%LOCALAPPDATA%\Microsoft\VisualStudio\14.0\ComponentModelCache"
Run "DevEnv.exe /setup" (this is under "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE", but should be on your PATH if you open a Developer Command Prompt).
Try to run the VS with safe mode using the command: devenv /safemode, if it works fine, that means the installed extensions caused this issue, you can go to Tools—Extensions and Updates and click ‘Updates’ tab and install all updates, then reopen VS. Or click ‘Installed’ tab and remove/uninstall the installed extensions one by one to find the culprit.
Another thing you can try is to run visual studio as administrator, it can help us to excludes the permission issue.
Related
I'm working on a Hololens application using Unity 2018.2.20f1. I'm building the application for UWP from Unity without a problem. However, after opening up the generated solution in the VisualStudio 2017 (Community Edition) and trying to build it, the build process fails with the following errors:
Severity Code Description Project File Line Suppression State
Error MSB3073 The command ""D:\Projects\VSProjects\VirtualPrague\Il2CppOutputProject\\IL2CPP\build\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=x86 -configuration=Release -platform=winrt -outputpath="D:\Projects\VSProjects\VirtualPrague\\build\bin\Win32\Release\GameAssembly.dll" --data-folder="D:\Projects\VSProjects\VirtualPrague\\build\bin\Win32\Release\\" -cachedirectory="D:\Projects\VSProjects\VirtualPrague\\build\obj\il2cppOutputProject\Win32\Release\\" -generatedcppdir="D:\Projects\VSProjects\VirtualPrague\Il2CppOutputProject\\Source" --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT --additional-defines=PLATFORM_WINRT -dotnetprofile=unityjit -verbose --map-file-parser="D:\Projects\VSProjects\VirtualPrague\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" exited with code -532462766. Il2CppOutputProject C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44
and
Severity Code Description Project File Line Suppression State
Error LNK1181 cannot open input file 'D:\Projects\VSProjects\VirtualPrague\build\bin\Win32\Release\GameAssembly.lib' VirtualPrague D:\Projects\VSProjects\VirtualPrague\VirtualPrague\LINK 1
In the output there are multiple exceptions, similar to this one:
1>il2cpp.exe didn't catch exception: System.IO.IOException: The process cannot access the file 'C:\Users\dev\AppData\Local\Temp\tmpDE97.tmp' because it is being used by another process.
1> at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
1> at System.IO.File.InternalDelete(String path, Boolean checkHost)
1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
1> at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
1> at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
1> at il2cpp.Program.DoRun(String[] args)
1> at il2cpp.Program.Run(String[] args)
1> at il2cpp.Program.Main(String[] args)
The exceptions are the same but were thrown for different files. I tried to reinstall the Visual Studio and managed to get a build. The next day I turned on the PC and this error was back. I stopped all of the VS instances and processed from the task manager, deleted all of the files from the Temp folder and managed to get a build a couple more times. Then this error came back.
From what I can tell, during the build process, Visual Studio creates some *.tmp files and for some reason thinks that another process is using it.
Any idea why this is happening and how can it be solved?
Thanks a lot!
Edit: So here is what I did so far (this is more of a work around rather then a solution)
Uninstall vs and unity
Clear the registry with ccleaner and Advanced Uninstaller Pro
Install vs and Unity
Every time I want to get a build I,
Close all of vs instances
Clear Temp folder (C:\Users\dev\AppData\Local\Temp)
Delete previous vs solution
Build from Unity
Run vs as Administrator
Build and deploy the solution from vs
And it works for the most the time. Also, changing the solution configuration (from debug to release and vice versa) helps sometimes.
I'm compiling the sources in Visual Studio Community 2017 for Mac and I've got the following error:
Building: ServiceLayer.API (Debug)
Error: Build failed. See the build log for details. (ServiceLayer.API)
---------------------- Done ----------------------
Build failed.
Build: 1 error, 0 warnings
In Ide.log log file, I've the following entry:
ERROR [2017-10-08 20:20:45Z]: Inspector does not support this project type
ERROR [2017-10-08 20:20:45Z]: Build failed.
System.Exception: Did not find MSBuild for runtime Mono 4.0.2 (c99aa0c)
at MonoDevelop.Projects.MSBuild.MSBuildProjectService.GetNewestInstalledToolsVersion (MonoDevelop.Core.Assemblies.TargetRuntime runtime, System.Boolean requiresMicrosoftBuild, System.String& binDir) [0x0006e] in /Users/builder/data/lanes/5144/cab57de4/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs:1087
at MonoDevelop.Projects.MSBuild.MSBuildProjectService+<GetProjectBuilder>d__100.MoveNext () [0x00133] in /Users/builder/data/lanes/5144/cab57de4/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs:1116
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at MonoDevelop.Projects.Project+<GetProjectBuilder>d__157.MoveNext () [0x001bb] in /Users/builder/data/lanes/5144/cab57de4/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs:1418
...
ERROR [2017-10-08 20:21:16Z]: An unhandled exception has occured. Terminating Visual Studio? False
Notes: In total like 381 lines on each attempt to build. 'End of stack trace' line is repeated 52 times.
This pointed me to this line in MonoDevelop (see: MSBuildProjectService.cs):
throw new Exception ("Did not find MSBuild for runtime " + runtime.Id);
I've checked and msbuild command exist in the command-line:
$ which msbuild
/Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild
$ msbuild --version
Microsoft (R) Build Engine version 15.4.0.0 (master/f296e67b Thu Sep 21 19:38:16 EDT 2017) for Mono
$ stat /Library/Frameworks/Mono.framework/Versions/Current
File: /Library/Frameworks/Mono.framework/Versions/Current -> /Library/Frameworks/Mono.framework/Versions/5.4.0
What I've tried so far:
I've tested both channels (Stable and Beta) in Visual Studio Update without success.
I've tried to Clean All and Rebuild All.
I've tried to remove the cache files in ~/Library/Caches/VisualStudio.
Reinstalling VisualStudio.
I've checked in Visual Studio, Preference..., Projects, .NET Runtimes and I've the latest Mono set as Default (to 5.4.x):
However when debugging, it's trying to open msbuild for 4.0.2 instead, e.g.:
$ sudo fs_usage -f pathname VisualStudio | grep -i msbuild
12:34:38 stat64 /Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/msbuild>>>>>>>>>>>>>>>>>>>>>> 0.000007 VisualStudio
12:34:38 lstat64 /Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/msbuild>>>>>>>>>>>>>>>>>>>>>> 0.000002 VisualStudio
12:34:38 access /Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/msbuild>>>>>>>>>>>>>>>>>>>>>> 0.000002 VisualStudio
which doesn't exist.
How should I add a missing MSBuild to my Solution (project) (as per mentioned error)?
Mono 4.0.2 did not have msbuild, it was included in 4.8.0+ . Check where does /Library/Frameworks/Mono.framework/Versions/Current (symlink) point to. It probably points to some mono 5.x.y . Try changing the .NET runtime that VSMac is set to use in Preferences -> Projects -> .NET Runtimes, to the latest one.
For some reason it is still looking it in 4.0.2. I would try to, at least temporarily, remove that 4.0.2 directory and then check. But otherwise I think your installation is broken and I would try to reinstall the whole thing (VSMac, Mono, ..).
Also, check in your Ide.log file for any references to 4.0.2, before that exception.
If you run into the same issue even with a fresh install, then please file a bug at bugzilla.xamarin.com and we can try to debug it there.
We have a ASP.NET project in the company that runs for 5/6 developers. All Visual Studio 2017 and debug on IIS Express, no crazy setting or anything to make it run.
1 colleague cannot get it to work, he always gets the following exception:
We had this problem a few months back, then out of frustration the PC was re-installed and the problem was gone. He didn't develop for a few weeks and today the problem appeared again.
I searched long and far but it's such a generic error I can't really figure this one out.
When I run the fusion log viewer I see the following result:
https://pastebin.com/aCVZn3EB
The operation failed.
Bind result: hr = 0x80131018. No description available.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files\IIS Express\iisexpress.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Users/User/Projects/project/project.UserSite/
LOG: Initial PrivatePath = C:\Users\User\Projects\project\project.UserSite\bin
LOG: Dynamic Base = C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\e0254dae
LOG: Cache Base = C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\e0254dae
LOG: AppName = 38c6ff11
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\User\Projects\project\project.UserSite\web.config
LOG: Using host configuration file: C:\Users\User\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Binding succeeds. Returns assembly from C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll.
LOG: Assembly is loaded in default load context.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80131018).
*** Assembly Binder Log Entry (7/18/2017 # 8:55:15 AM) ***
Are you trying to load a .NET 4 assembly with an EXE that asked for a diferrent CLR version? That requires an app.exe.config file that forces CLR 4 to be used.
Also please check the he has the same version of .NET installed.
1- Close Visual Studio
2- Delete all files from "C:\WINDOWS\Microsoft.NET\Framework......\Temporary ASP.NET"
3- Open VS
4- Rebuild then run
I have the same issue, its random. Just install missing package via Nuget for that project. Open Package Manager Console and type:
PM> Install-Package System.ServiceModel.Activities
and go on installing packages till there is no more error: then stop.
Turns out with the help of Fusion Log I found 1 file that was 0kb in size: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll
I restored the file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.ServiceModel.Activities.dll and it worked again!
I'm getting the same error message as in this question: Could not load type 'Microsoft.Cct.Services.Sqm.IWatSqmService' Unfortunately, I cannot upgrade to Azure SDK 2.9, as the top answer there suggests.
Specifically, I get this error in a message box whenever I try to package my Azure Cloud Service project:
What's interesting is that I can start the same project in the emulator, which I would assume involves packaging it.
Things I've tried:
Ensuring that I only have version 2.8.2 of the emulator installed (I may have had 2.9 installed initially)
Reinstalling version 2.8.2 of the SDK
Manually copying the Windows Azure Tools from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0 to the v14.0 equivalent.
Ensuring that C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.8 exists
Reinstalling Visual Studio (so you know I'm desperate!)
And I've no idea what to try next. I can't work out which DLL is supposed to hold the Microsoft.VisualStudio.WindowsAzure.Services assembly, I can't find any references in any config files, and all the Google hits seem to point back to the SO question linked above.
What's going on? And how can I fix it?
In case I'm being an idiot, here's all the Azure-related things I've got installed:
Also (just in case it's relevant) I'm on Windows 7 SP1.
Update 17/01/16
Following some advice from the excellent Rest Azured Slack channel, I've tried using ProcMon and Fusion Log to diagnose this (spoiler: without success)
ProcMon filtered to that assembly returns nothing:
Fusion log (set to log everything) yields lots of entries like this:
* Assembly Binder Log Entry (17/01/2017 # 11:52:02) *
The operation was successful. Bind result: hr = 0x0. The operation
completed successfully.
Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under
executable C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\devenv.exe
--- A detailed error log follows.
=== Pre-bind state information === LOG: DisplayName = Microsoft.VisualStudio.WindowsAzure.Services, Version=1.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio
14.0/Common7/IDE/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = devenv.exe Calling assembly
: Microsoft.VisualStudio.WindowsAzure, Version=2.9.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
=== WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with
Assembly.Load(). WRN: No matching native image found. LOG: IL assembly
loaded from C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\Extensions\Microsoft\Windows Azure Tools\Microsoft.VisualStudio.WindowsAzure.Services.dll.
When I explore the DLL mentioned, I can find Microsoft.Cct.Services.Sqm, but it doesn't contain a type IWatSqlService:
This feels like it's the crux of the issue, but I've no idea what to do next. Presumably I'd need to replace the DLL with a version that does define IWatSqlService, but I'm not sure where I'd get one. Or, for that matter, why it would even be necessary.
Next stop is probably a full wipe of the machine.
I've had the same problem, and solved it by not using the Web Platform Installer.
Download all parts (Microsoft Azure SDK for .NET - 2.8.2) from the Microsoft site: https://www.microsoft.com/en-us/download/details.aspx?id=50041 and follow the instructions how to install them.
For anyone else with this problem. I ended up resolving this by nuking it from orbit. Fresh install of Windows, reinstall VS and the SDK.
Confusingly, you can also see this error when you add a new
<setting name="TODO" />
element to your *.csdef file but either:
forget to add the corresponding <setting name="TODO" value="TODO" /> element to every *.cscfg file, or
accidentally add a duplicate <setting name="TODO" value="TODO" /> element to any of the *.cscfg files.
This is a super weird question for Visual Studio 2013: Windows Forms Application 3.5!
I designed and made the program, then I ran the program for the first time and an error pops up.
And then I click cancel, retry and this time I click yes and this pops up:
Error while trying to run project: Could not load file or assembly
'SourceProject' or one of its dependencies. The located assembly's
manifest definition does not match the assembly reference.(Exception
from HRESULT: 0x80131040)
Any ideas on fixing it?
FULL ERROR LOG
Error 1 Unable to copy file "obj\Debug\SOURCEPROJECT.exe" to
"bin\Debug\SOURCEPROJECT.exe". Access to the path
'obj\Debug\SOURCEPROJECT.exe' is denied. SOURCEPROJECT
Just open your Debug Configuration near by Application Run Button in VS. Then , Choose debug with Any CPU to x64 or x86 .. May be it will help someone.
Thanks,