When adding a new type (Class, Behaviour C# Script, PlaymodeTest, Shader, etc.) via the Solution Explorer window in Visual Studio 2017 by either pressing the generate shortcut (Alt + insert on my machine) or right click and select _Add > New From Template_, the resulting type and namespaces are always just a.
It does not matter what I fill in the dialog that pops up; if I use (the default) MonoBehaviour1 for a Behaviour C# Script, the resulting code will always be:
using UnityEngine;
namespace a
{
public class a : MonoBehaviour
{
}
}
The filename _does_ use the entered value.
Using the same method (for non-Unity types obviously) in non unity projects yields the expected type names.
Are there any exceptions reported? Look at the status bar and look for any flashing red exclamation mark icons. If there are, double click and let me know what's listed.
Also, do you have the heap view plugin installed? If so, please uninstall it. This error happens because something throws an exception half-way through the process of setting up the template - the a characters are placeholders that should get filled in and replaced with a "hotspot" for code completion. The heap view plugin is the only other plugin we have that I know about that could be breaking, and we know there are incompatibilities with it at the moment.
The unity plugin is the only Resharper plugin I have installed, there are no exceptions being thrown that I can see (the only thing happening in the status bar is an "updating" label appearing for a moment:

I can't see any exceptions or warnings being logged into one of the output windows either...
Ah, I'd assumed you were in Rider, rather than ReSharper. I'm afraid I don't really know what's going wrong here - does the normal Class template work in a Unity project, or is it all templates in Unity projects that are broken? And does the Class template then work in a non-Unity project?
Sorry, I should have ben clearer about using Visual Studio and Resharper...
Yeah, _all_ templates in a Unity project are broken, in other "normal" c# projects the templates work as intended.
Can you try running devenv.exe /ReSharper.Internal and create a file from a template, please? Exceptions are hidden by default in ReSharper, but if we enable internal mode, it should hopefully start showing exceptions again - look for the exclamation mark in the status bar.
Ah, yes, that _does_ generate exceptions.
From top to bottom (the chonology isn't obvious to me):
Failed to modify document. Object reference not set to an instance of an object.
--- EXCEPTION #1/2 [NullReferenceException]
Message = “Object reference not set to an instance of an object.”
ExceptionPath = Root.InnerException
ClassName = System.NullReferenceException
HResult = E_POINTER=COR_E_NULLREFERENCE=80004003
Source = Microsoft.VisualStudio.Editor.Implementation
StackTraceString = “
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.TryCheckOut()
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.ReplaceStreamEx(UInt32 dwFlags, Int32 iPos, Int32 iOldLen, IntPtr pszText, Int32 iNewLen, Int32& piActualLen)
at JetBrains.VsIntegration.Interop.Shim.TextManager.Documents.IVsTextBuffer.ReplaceStreamEx(REPLACE_TEXT_FLAGS dwFlags, Int32 iPos, Int32 iOldLen, String pszText, Int32 iNewLen)
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentOperationsHandlerWhidbey.ReplaceVsStream(TextRange range, String newText)
”
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = “Failed to modify document.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.LastExtension = cs
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2017.2.2 Build 109.0.20171006.122324”
Data.SubProducts.#0 = “JetBrains ReSharper 2017.2.2 Build 2017.2.20171006.123800”
Data.SccRevisionEnv = “
Platform\Core\Shell:
git::refs/heads/wave09-eap16-bugfix2
Platform\VisualStudio:
git::refs/heads/wave09-eap16-bugfix2::1924e3442df59919fe7d685c5f532e17ab14d4e1
”
Data.VsVersion = 15.5.27130.2010
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentOperationsHandlerWhidbey.<>c__DisplayClass32.<ReplaceText>b__31(Lifetime lt)
at JetBrains.DataFlow.Lifetimes.Using(Action`1 λ)
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentOperationsHandlerWhidbey.ReplaceText(TextRange range, String newText)
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentOperationsHandlerWhidbey.ApplyChange(DocumentChange change)
at JetBrains.VsIntegration.IDE.Documents.VsDocumentWhidbey.<>c__DisplayClass12.<ApplyInternalDocumentChange>b__10(IDocumentOperationsHandler x)
at JetBrains.Util.Special.GeneralUtil.WithNotNull[T](T item, Action`1 F)
at JetBrains.VsIntegration.IDE.Documents.VsDocumentWhidbey.ApplyInternalDocumentChange(DocumentChange documentChange, Int32 timestamp)
at JetBrains.DocumentModel.impl.ManagedDocumentBase.ChangeDocument(DocumentChange documentChange, Int32 timestamp)
at JetBrains.DocumentModel.impl.ManagedDocumentBase.ReplaceText(TextRange atRange, String text)
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.Hotspot.EvaluateToFieldName()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.Hotspot.Evaluate()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionBase.EvaluateHotspot(Hotspot hotspot)
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionBase.HaveNextHotspot(Hotspot& newHotspot, Int32& newIndex, HotspotItems& lookupItems)
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSession.GoToNextHotspot()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSession.StartSession()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionExecutor.ExecuteSession(HotspotSession hotspotSession, IDisposable tryFinallyCookie)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.FileTemplatesManagerBase.FileFromTemplateWithingFolder(String fileNameNoExtension, Template template, Action`1 setFileProperties, Action`1 init, ProjectFolderWithLocation targetFolder, IFileCreationContext context)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.FileTemplatesManagerBase.CreateFileFromTemplate(String fileNameNoExtension, ProjectFolderWithLocation[] targetFolders, Template template, Action`1 setFileProperties, IFileCreationContext context, Action`1 init)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.GenerateFileActionWorkflow.Execute(IDataContext context)
at JetBrains.ReSharper.Feature.Services.Generate.Actions.GenerateActionBase`1.Execute(IDataContext context, IGenerateActionWorkflow workflow)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.<>c__DisplayClass6.<>c__DisplayClassb.<ExecuteGroup>b__5(Object args)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenu.<>c__DisplayClass1d.<InitViewModel>b__13(JetPopupMenuItem item)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.Signal`1.Fire(TValue value)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.Signal`1.Fire(TValue value)
at JetBrains.Application.UI.Controls.JetPopupMenu.Detail.JetPopupMenuDoc.ExecuteSelectedItem()
at JetBrains.UI.SrcView.Controls.JetPopupMenu.Impl.JetPopupMenuMainpartView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at JetBrains.UI.SrcView.Controls.JetPopupMenu.Impl.JetPopupMenuMainpartView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at JetBrains.Interop.WinApi.User32Dll.DispatchMessageW(MSG* lpmsg)
at JetBrains.Util.Concurrency.WinJetDispatcher.WinJetDispatcherStaticMethods.InternalPumpMessagesOnce()
at JetBrains.Util.Concurrency.WinJetDispatcher.WinJetDispatcherStaticMethods.JetBrains.Util.Concurrency.IJetDispatcherStaticMethods.Run(Func`1 condition, TimeSpan timeout, Boolean bThrowOnTimeout)
at JetBrains.UI.SrcView.Controls.JetPopupMenu.JetPopupMenuOverlordView.Show(Boolean isModal)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.ShowCore(JetPopupMenu menu, ShowWhen when, Boolean isModal, LifetimeDefinition lifetimeDefinitionOptional, IJetPopupMenuOverlordView parentView)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.<>c__DisplayClass4.<ShowModal>b__3(LifetimeDefinition defMenu, Lifetime lifeMenu)
at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.ShowModal(ShowWhen when, Action`2 FFillMenu)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.ExecuteGroup(IDataContext context, IEnumerable`1 workflows)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.Execute(IDataContext dataContext, DelegateExecute nextExecute)
at JetBrains.Application.UI.ActionsRevised.Handlers.ExececutableActionEvaluator.Execute(IAction action, List`1 allActions, IDataContext dataContext)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<ExecuteWithoutRequirements>b__a(Lifetime lt)
at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 λ)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.ExecuteWithoutRequirements()
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass8.<PrepareRequirementsAsync>b__3()
at JetBrains.Util.Logging.Logger.Catch(Action action)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass8.<PrepareRequirementsAsync>b__2()
at JetBrains.Application.UI.ActionSystem.ActionsRevised.Handlers.RequirementsManager.ExecuteActionAsync(IActionRequirement requirement, Action continueWith, Action failWith, Boolean reSharperIsThinking)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.PrepareRequirementsAsync(Func`1 executeWhenRequirementsReady, Action`1 failWith)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.Execute()
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.<>c__DisplayClass1d.<CommandTargetExec>b__1a()
at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
at JetBrains.Threading.ReentrancyGuard.TryExecute(String name, Action action)
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.CommandTargetExec(CommandID commandid, OLECMDEXECOPT cmdExecOpt)
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.<.ctor>b__1(CommandID commandid, OLECMDEXECOPT opt, IntPtr in, IntPtr out)
at JetBrains.VsIntegration.Shell.Package.VsPackageSdkStub.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid& guidGroup, UInt32 nCmdId, UInt32 nCmdExcept, IntPtr vIn, IntPtr vOut)
”
Failed to get the enumeration. Error HRESULT E_FAIL has been returned from a call to a COM component. The error code is E_FAIL, or EFail, or 0x80004005.
--- EXCEPTION #1/2 [COMException]
Message = “Failed to get the enumeration. Error HRESULT E_FAIL has been returned from a call to a COM component. The error code is E_FAIL, or EFail, or 0x80004005.”
ExceptionPath = Root.InnerException
ClassName = System.Runtime.InteropServices.COMException
HResult = E_FAIL=EFail=80004005
Source = JetBrains.Platform.VisualStudio.Core
StackTraceString = “
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentOperationsHandlerWhidbey.<>c__DisplayClass2f.<JetBrains.DocumentModel.IDocumentOperationsHandler.ContainsReadOnlyRegions>b__2e()
at JetBrains.Util.Logging.Logger.Catch(Action action)
”
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = “Failed to get the enumeration. Error HRESULT E_FAIL has been returned from a call to a COM component. The error code is E_FAIL, or EFail, or 0x80004005.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.LastExtension = cs
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2017.2.2 Build 109.0.20171006.122324”
Data.SubProducts.#0 = “JetBrains ReSharper 2017.2.2 Build 2017.2.20171006.123800”
Data.SccRevisionEnv = “
Platform\Core\Shell:
git::refs/heads/wave09-eap16-bugfix2
Platform\VisualStudio:
git::refs/heads/wave09-eap16-bugfix2::1924e3442df59919fe7d685c5f532e17ab14d4e1
”
Data.VsVersion = 15.5.27130.2010
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Util.Logging.Logger.Catch(Action action)
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentOperationsHandlerWhidbey.JetBrains.DocumentModel.IDocumentOperationsHandler.ContainsReadOnlyRegions()
at JetBrains.VsIntegration.IDE.Documents.VsDocumentWhidbey.<ContainsReadOnlyRegions>b__e(IDocumentOperationsHandler x)
at JetBrains.Util.Special.GeneralUtil.IfNotNull[TInput,TResult](TInput object, Func`2 functor)
at JetBrains.VsIntegration.IDE.Documents.VsDocumentWhidbey.ContainsReadOnlyRegions()
at JetBrains.Platform.VisualStudio.SinceVs10.IDE.VsEnsureWritableHandlerDevTen.QueryIsWritable(IProjectFile profile)
at JetBrains.ProjectModel.Model2.Transaction.EnsureWritableHandler.IsWritable(IProjectFile projectFile)
at JetBrains.ProjectModel.Model2.Transaction.EnsureWritableHandler.CreateCookie(EnsureWritableCollection collection, ICollection`1 doNotOpenOnBefore)
at JetBrains.ProjectModel.Model2.Transaction.EnsureWritableCollection.CreateCookie(ICollection`1 doNotOpenOnBefore)
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentManagerDocumentFactory.EnsureWritableHandler(IProjectFile projectFile)
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentManagerDocumentFactory.<CreateDocument>b__0(IDocument doc)
at JetBrains.DocumentModel.Impl.DocumentBase.EnsureWritable()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.Hotspot.EvaluateToFieldName()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.Hotspot.Evaluate()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionBase.EvaluateHotspot(Hotspot hotspot)
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionBase.HaveNextHotspot(Hotspot& newHotspot, Int32& newIndex, HotspotItems& lookupItems)
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSession.GoToNextHotspot()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSession.StartSession()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionExecutor.ExecuteSession(HotspotSession hotspotSession, IDisposable tryFinallyCookie)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.FileTemplatesManagerBase.FileFromTemplateWithingFolder(String fileNameNoExtension, Template template, Action`1 setFileProperties, Action`1 init, ProjectFolderWithLocation targetFolder, IFileCreationContext context)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.FileTemplatesManagerBase.CreateFileFromTemplate(String fileNameNoExtension, ProjectFolderWithLocation[] targetFolders, Template template, Action`1 setFileProperties, IFileCreationContext context, Action`1 init)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.GenerateFileActionWorkflow.Execute(IDataContext context)
at JetBrains.ReSharper.Feature.Services.Generate.Actions.GenerateActionBase`1.Execute(IDataContext context, IGenerateActionWorkflow workflow)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.<>c__DisplayClass6.<>c__DisplayClassb.<ExecuteGroup>b__5(Object args)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenu.<>c__DisplayClass1d.<InitViewModel>b__13(JetPopupMenuItem item)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.Signal`1.Fire(TValue value)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.Signal`1.Fire(TValue value)
at JetBrains.Application.UI.Controls.JetPopupMenu.Detail.JetPopupMenuDoc.ExecuteSelectedItem()
at JetBrains.UI.SrcView.Controls.JetPopupMenu.Impl.JetPopupMenuMainpartView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at JetBrains.UI.SrcView.Controls.JetPopupMenu.Impl.JetPopupMenuMainpartView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at JetBrains.Interop.WinApi.User32Dll.DispatchMessageW(MSG* lpmsg)
at JetBrains.Util.Concurrency.WinJetDispatcher.WinJetDispatcherStaticMethods.InternalPumpMessagesOnce()
at JetBrains.Util.Concurrency.WinJetDispatcher.WinJetDispatcherStaticMethods.JetBrains.Util.Concurrency.IJetDispatcherStaticMethods.Run(Func`1 condition, TimeSpan timeout, Boolean bThrowOnTimeout)
at JetBrains.UI.SrcView.Controls.JetPopupMenu.JetPopupMenuOverlordView.Show(Boolean isModal)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.ShowCore(JetPopupMenu menu, ShowWhen when, Boolean isModal, LifetimeDefinition lifetimeDefinitionOptional, IJetPopupMenuOverlordView parentView)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.<>c__DisplayClass4.<ShowModal>b__3(LifetimeDefinition defMenu, Lifetime lifeMenu)
at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.ShowModal(ShowWhen when, Action`2 FFillMenu)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.ExecuteGroup(IDataContext context, IEnumerable`1 workflows)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.Execute(IDataContext dataContext, DelegateExecute nextExecute)
at JetBrains.Application.UI.ActionsRevised.Handlers.ExececutableActionEvaluator.Execute(IAction action, List`1 allActions, IDataContext dataContext)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<ExecuteWithoutRequirements>b__a(Lifetime lt)
at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 λ)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.ExecuteWithoutRequirements()
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass8.<PrepareRequirementsAsync>b__3()
at JetBrains.Util.Logging.Logger.Catch(Action action)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass8.<PrepareRequirementsAsync>b__2()
at JetBrains.Application.UI.ActionSystem.ActionsRevised.Handlers.RequirementsManager.ExecuteActionAsync(IActionRequirement requirement, Action continueWith, Action failWith, Boolean reSharperIsThinking)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.PrepareRequirementsAsync(Func`1 executeWhenRequirementsReady, Action`1 failWith)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.Execute()
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.<>c__DisplayClass1d.<CommandTargetExec>b__1a()
at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
at JetBrains.Threading.ReentrancyGuard.TryExecute(String name, Action action)
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.CommandTargetExec(CommandID commandid, OLECMDEXECOPT cmdExecOpt)
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.<.ctor>b__1(CommandID commandid, OLECMDEXECOPT opt, IntPtr in, IntPtr out)
at JetBrains.VsIntegration.Shell.Package.VsPackageSdkStub.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid& guidGroup, UInt32 nCmdId, UInt32 nCmdExcept, IntPtr vIn, IntPtr vOut)
”
Failed to get the enumeration. Unspecified error. The error code is E_FAIL, or EFail, or 0x80004005.
--- EXCEPTION #1/2 [COMException]
Message = “Failed to get the enumeration. Unspecified error. The error code is E_FAIL, or EFail, or 0x80004005.”
ExceptionPath = Root.InnerException
ClassName = System.Runtime.InteropServices.COMException
HResult = E_FAIL=EFail=80004005
Source = JetBrains.Platform.VisualStudio.Core
StackTraceString = “
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentOperationsHandlerWhidbey.<>c__DisplayClass2f.<JetBrains.DocumentModel.IDocumentOperationsHandler.ContainsReadOnlyRegions>b__2e()
at JetBrains.Util.Logging.Logger.Catch(Action action)
”
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = “Failed to get the enumeration. Unspecified error. The error code is E_FAIL, or EFail, or 0x80004005.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.LastExtension = cs
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2017.2.2 Build 109.0.20171006.122324”
Data.SubProducts.#0 = “JetBrains ReSharper 2017.2.2 Build 2017.2.20171006.123800”
Data.SccRevisionEnv = “
Platform\Core\Shell:
git::refs/heads/wave09-eap16-bugfix2
Platform\VisualStudio:
git::refs/heads/wave09-eap16-bugfix2::1924e3442df59919fe7d685c5f532e17ab14d4e1
”
Data.VsVersion = 15.5.27130.2010
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Util.Logging.Logger.Catch(Action action)
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentOperationsHandlerWhidbey.JetBrains.DocumentModel.IDocumentOperationsHandler.ContainsReadOnlyRegions()
at JetBrains.VsIntegration.IDE.Documents.VsDocumentWhidbey.<ContainsReadOnlyRegions>b__e(IDocumentOperationsHandler x)
at JetBrains.Util.Special.GeneralUtil.IfNotNull[TInput,TResult](TInput object, Func`2 functor)
at JetBrains.VsIntegration.IDE.Documents.VsDocumentWhidbey.ContainsReadOnlyRegions()
at JetBrains.Platform.VisualStudio.SinceVs10.IDE.VsEnsureWritableHandlerDevTen.QueryIsWritable(IProjectFile profile)
at JetBrains.ProjectModel.Model2.Transaction.EnsureWritableHandler.<CreateCookie>b__4(IProjectFile projectFile)
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
at JetBrains.ProjectModel.Model2.Transaction.EnsureWritableHandler.CreateCookie(EnsureWritableCollection collection, ICollection`1 doNotOpenOnBefore)
at JetBrains.ProjectModel.Model2.Transaction.EnsureWritableCollection.CreateCookie(ICollection`1 doNotOpenOnBefore)
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentManagerDocumentFactory.EnsureWritableHandler(IProjectFile projectFile)
at JetBrains.VsIntegration.IDE.Documents.Whidbey.VsDocumentManagerDocumentFactory.<CreateDocument>b__0(IDocument doc)
at JetBrains.DocumentModel.Impl.DocumentBase.EnsureWritable()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.Hotspot.EvaluateToFieldName()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.Hotspot.Evaluate()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionBase.EvaluateHotspot(Hotspot hotspot)
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionBase.HaveNextHotspot(Hotspot& newHotspot, Int32& newIndex, HotspotItems& lookupItems)
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSession.GoToNextHotspot()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSession.StartSession()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionExecutor.ExecuteSession(HotspotSession hotspotSession, IDisposable tryFinallyCookie)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.FileTemplatesManagerBase.FileFromTemplateWithingFolder(String fileNameNoExtension, Template template, Action`1 setFileProperties, Action`1 init, ProjectFolderWithLocation targetFolder, IFileCreationContext context)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.FileTemplatesManagerBase.CreateFileFromTemplate(String fileNameNoExtension, ProjectFolderWithLocation[] targetFolders, Template template, Action`1 setFileProperties, IFileCreationContext context, Action`1 init)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.GenerateFileActionWorkflow.Execute(IDataContext context)
at JetBrains.ReSharper.Feature.Services.Generate.Actions.GenerateActionBase`1.Execute(IDataContext context, IGenerateActionWorkflow workflow)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.<>c__DisplayClass6.<>c__DisplayClassb.<ExecuteGroup>b__5(Object args)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenu.<>c__DisplayClass1d.<InitViewModel>b__13(JetPopupMenuItem item)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.Signal`1.Fire(TValue value)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.Signal`1.Fire(TValue value)
at JetBrains.Application.UI.Controls.JetPopupMenu.Detail.JetPopupMenuDoc.ExecuteSelectedItem()
at JetBrains.UI.SrcView.Controls.JetPopupMenu.Impl.JetPopupMenuMainpartView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at JetBrains.UI.SrcView.Controls.JetPopupMenu.Impl.JetPopupMenuMainpartView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at JetBrains.Interop.WinApi.User32Dll.DispatchMessageW(MSG* lpmsg)
at JetBrains.Util.Concurrency.WinJetDispatcher.WinJetDispatcherStaticMethods.InternalPumpMessagesOnce()
at JetBrains.Util.Concurrency.WinJetDispatcher.WinJetDispatcherStaticMethods.JetBrains.Util.Concurrency.IJetDispatcherStaticMethods.Run(Func`1 condition, TimeSpan timeout, Boolean bThrowOnTimeout)
at JetBrains.UI.SrcView.Controls.JetPopupMenu.JetPopupMenuOverlordView.Show(Boolean isModal)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.ShowCore(JetPopupMenu menu, ShowWhen when, Boolean isModal, LifetimeDefinition lifetimeDefinitionOptional, IJetPopupMenuOverlordView parentView)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.<>c__DisplayClass4.<ShowModal>b__3(LifetimeDefinition defMenu, Lifetime lifeMenu)
at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.ShowModal(ShowWhen when, Action`2 FFillMenu)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.ExecuteGroup(IDataContext context, IEnumerable`1 workflows)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.Execute(IDataContext dataContext, DelegateExecute nextExecute)
at JetBrains.Application.UI.ActionsRevised.Handlers.ExececutableActionEvaluator.Execute(IAction action, List`1 allActions, IDataContext dataContext)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<ExecuteWithoutRequirements>b__a(Lifetime lt)
at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 λ)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.ExecuteWithoutRequirements()
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass8.<PrepareRequirementsAsync>b__3()
at JetBrains.Util.Logging.Logger.Catch(Action action)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass8.<PrepareRequirementsAsync>b__2()
at JetBrains.Application.UI.ActionSystem.ActionsRevised.Handlers.RequirementsManager.ExecuteActionAsync(IActionRequirement requirement, Action continueWith, Action failWith, Boolean reSharperIsThinking)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.PrepareRequirementsAsync(Func`1 executeWhenRequirementsReady, Action`1 failWith)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.Execute()
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.<>c__DisplayClass1d.<CommandTargetExec>b__1a()
at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
at JetBrains.Threading.ReentrancyGuard.TryExecute(String name, Action action)
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.CommandTargetExec(CommandID commandid, OLECMDEXECOPT cmdExecOpt)
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.<.ctor>b__1(CommandID commandid, OLECMDEXECOPT opt, IntPtr in, IntPtr out)
at JetBrains.VsIntegration.Shell.Package.VsPackageSdkStub.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid& guidGroup, UInt32 nCmdId, UInt32 nCmdExcept, IntPtr vIn, IntPtr vOut)
”
SubProducts.0 = JetBrains ReSharper 2017.2.2 Build 2017.2.20171006.123800
Could not show the window frame. Cannot access a disposed object. Object name: 'MarshalingWindowFrame'. The error code is COR_E_OBJECTDISPOSED, or 0x80131622.
--- EXCEPTION #1/2 [COMException]
Message = “
Could not show the window frame. Cannot access a disposed object.
Object name: 'MarshalingWindowFrame'. The error code is COR_E_OBJECTDISPOSED, or 0x80131622.
”
ExceptionPath = Root.InnerException
ClassName = System.Runtime.InteropServices.COMException
HResult = COR_E_OBJECTDISPOSED=80131622
Source = JetBrains.Platform.VisualStudio.Core
StackTraceString = “
at JetBrains.VsIntegration.UI.WindowManagement.VsWindowFrameManager.<>c__DisplayClass3.<>c__DisplayClass5.<CreateFromVsWindowFrame>b__2()
at JetBrains.DataFlow.ISignalEx.<>c__DisplayClass1`1.<Advise>b__0(TValue value)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
”
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = “
Could not show the window frame. Cannot access a disposed object.
Object name: 'MarshalingWindowFrame'. The error code is COR_E_OBJECTDISPOSED, or 0x80131622.
”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.LastExtension = cs
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2017.2.2 Build 109.0.20171006.122324”
Data.SubProducts.#0 = “JetBrains ReSharper 2017.2.2 Build 2017.2.20171006.123800”
Data.SccRevisionEnv = “
Platform\Core\Shell:
git::refs/heads/wave09-eap16-bugfix2
Platform\VisualStudio:
git::refs/heads/wave09-eap16-bugfix2::1924e3442df59919fe7d685c5f532e17ab14d4e1
”
Data.VsVersion = 15.5.27130.2010
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.OnUnderlyingPropertyChanged(PropertyChangedEventArgs`1 args)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.Property`1.FireChange(TValue old, TValue new, Object cookie)
at JetBrains.DataFlow.Property`1.SetValue(TValue value, Object cookie)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.SimpleSignal.Fire()
at JetBrains.TextControl.BaseImpl.TextControlWindowBase.JetBrains.TextControl.ITextControlWindow.Show()
at JetBrains.TextControl.ITextControlWindowEx.ShowOrFocus(ITextControlWindow winmodel, Boolean focus)
at JetBrains.VsIntegration.IDE.EditorManager.VsEditorManager.<>c__DisplayClass16.<OpenProjectFile>b__15()
at JetBrains.VsIntegration.IDE.EditorManager.VsEditorManager.<>c__DisplayClass2.<ExpectCallbackAndKeepCurrentFrame>b__1()
at JetBrains.VsIntegration.Shell.WindowManagement.VsFrameFocusHelper.KeepCurrentFrame(Action nested)
at JetBrains.VsIntegration.IDE.EditorManager.VsEditorManager.<>c__DisplayClass2.<ExpectCallbackAndKeepCurrentFrame>b__0()
at JetBrains.Util.Concurrency.UnguardedCallbackMerger.ExpectUnguardedCallback(Action FNested)
at JetBrains.VsIntegration.IDE.EditorManager.VsEditorManager.ExpectCallbackAndKeepCurrentFrame(Boolean activate, Func`1 doOnOpen)
at JetBrains.VsIntegration.IDE.EditorManager.VsEditorManager.OpenProjectFile(IProjectFile projectFile, OpenFileOptions options)
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Templates.TemplateUtil.GetTextControl(IDocument document, ISolution solution, Boolean existingOnly)
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.Hotspot.Activate()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionBase.HaveNextHotspot(Hotspot& newHotspot, Int32& newIndex, HotspotItems& lookupItems)
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSession.GoToNextHotspot()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSession.StartSession()
at JetBrains.ReSharper.Feature.Services.LiveTemplates.Hotspots.HotspotSessionExecutor.ExecuteSession(HotspotSession hotspotSession, IDisposable tryFinallyCookie)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.FileTemplatesManagerBase.FileFromTemplateWithingFolder(String fileNameNoExtension, Template template, Action`1 setFileProperties, Action`1 init, ProjectFolderWithLocation targetFolder, IFileCreationContext context)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.FileTemplatesManagerBase.CreateFileFromTemplate(String fileNameNoExtension, ProjectFolderWithLocation[] targetFolders, Template template, Action`1 setFileProperties, IFileCreationContext context, Action`1 init)
at JetBrains.ReSharper.LiveTemplates.FileTemplates.GenerateFileActionWorkflow.Execute(IDataContext context)
at JetBrains.ReSharper.Feature.Services.Generate.Actions.GenerateActionBase`1.Execute(IDataContext context, IGenerateActionWorkflow workflow)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.<>c__DisplayClass6.<>c__DisplayClassb.<ExecuteGroup>b__5(Object args)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenu.<>c__DisplayClass1d.<InitViewModel>b__13(JetPopupMenuItem item)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.Signal`1.Fire(TValue value)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.Signal`1.Fire(TValue value)
at JetBrains.Application.UI.Controls.JetPopupMenu.Detail.JetPopupMenuDoc.ExecuteSelectedItem()
at JetBrains.UI.SrcView.Controls.JetPopupMenu.Impl.JetPopupMenuMainpartView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at JetBrains.UI.SrcView.Controls.JetPopupMenu.Impl.JetPopupMenuMainpartView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at JetBrains.Interop.WinApi.User32Dll.DispatchMessageW(MSG* lpmsg)
at JetBrains.Util.Concurrency.WinJetDispatcher.WinJetDispatcherStaticMethods.InternalPumpMessagesOnce()
at JetBrains.Util.Concurrency.WinJetDispatcher.WinJetDispatcherStaticMethods.JetBrains.Util.Concurrency.IJetDispatcherStaticMethods.Run(Func`1 condition, TimeSpan timeout, Boolean bThrowOnTimeout)
at JetBrains.UI.SrcView.Controls.JetPopupMenu.JetPopupMenuOverlordView.Show(Boolean isModal)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.ShowCore(JetPopupMenu menu, ShowWhen when, Boolean isModal, LifetimeDefinition lifetimeDefinitionOptional, IJetPopupMenuOverlordView parentView)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.<>c__DisplayClass4.<ShowModal>b__3(LifetimeDefinition defMenu, Lifetime lifeMenu)
at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenus.ShowModal(ShowWhen when, Action`2 FFillMenu)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.ExecuteGroup(IDataContext context, IEnumerable`1 workflows)
at JetBrains.ReSharper.Feature.Services.ActionsMenu.ExtensibleAction`3.Execute(IDataContext dataContext, DelegateExecute nextExecute)
at JetBrains.Application.UI.ActionsRevised.Handlers.ExececutableActionEvaluator.Execute(IAction action, List`1 allActions, IDataContext dataContext)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<ExecuteWithoutRequirements>b__a(Lifetime lt)
at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 λ)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.ExecuteWithoutRequirements()
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass8.<PrepareRequirementsAsync>b__3()
at JetBrains.Util.Logging.Logger.Catch(Action action)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.<>c__DisplayClass8.<PrepareRequirementsAsync>b__2()
at JetBrains.Application.UI.ActionSystem.ActionsRevised.Handlers.RequirementsManager.ExecuteActionAsync(IActionRequirement requirement, Action continueWith, Action failWith, Boolean reSharperIsThinking)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.PrepareRequirementsAsync(Func`1 executeWhenRequirementsReady, Action`1 failWith)
at JetBrains.Application.UI.ActionsRevised.Handlers.EvaluatedAction.Execute()
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.<>c__DisplayClass1d.<CommandTargetExec>b__1a()
at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
at JetBrains.Threading.ReentrancyGuard.TryExecute(String name, Action action)
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.CommandTargetExec(CommandID commandid, OLECMDEXECOPT cmdExecOpt)
at JetBrains.VsIntegration.Shell.Actions.Revised.VsOleCommandTargetHandler.<.ctor>b__1(CommandID commandid, OLECMDEXECOPT opt, IntPtr in, IntPtr out)
at JetBrains.VsIntegration.Shell.Package.VsPackageSdkStub.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid& guidGroup, UInt32 nCmdId, UInt32 nCmdExcept, IntPtr vIn, IntPtr vOut)
”
(sorry for the wall of text)
Hmm. We have another issue which looks to be the same as this: RSRP-467875, with the same exceptions
I notice that you're using ReSharper 2017.2.2. You could try updating to 2017.3, but the linked issue is on 2017.3, and it's still happening there.
It looks like it's throwing an exception when it's trying to modify the file, and the top exception is failing in a method called TryCheckOut. Do you have source control enabled on this project? What provider are you using? Can you try it with the source control integration disabled?
Updating didn't fix it.
The project is checked into source control (SVN) and I'm using the TSvn plugin. I am under the assumption that TSvn is merely a convenient way to access TortoiseSVN from within Visual Studio, there seems to be little to no real integration. I'll try disabling it.
Did you manage to test this with TortoiseSVN disabled?
Sorry, yes, with TSvn disabled it still happens.
Happens here, too. VS 15.5.4, VSTU 3.5.0.3, ReShaper 2017.3.1. Maybe it's related to VSTU regenerating the project (it seems to reload when a new file is created) before the template is filled up, or something like that?
Same here. It has occurred after VSTU 3.5.0.3. There is temporary workaround. Change
<ProjectTypeGuids>
{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
</ProjectTypeGuids>
to
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
in Project File.
ProjectTypeGuids can be found this; https://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-GUIDs But can't find "{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1}". Maybe that seems to be specific GUID for Unity3d.
Ah! So does everything work as expected if you remove the VSTU guid?
Yes, that workaround fixes the issue for me.
Note that it disables all VSTU integration features, including the debugger attaching. Plus Unity will regenerate the project sooner or later anyway, undoing the change.
Just to confirm, we can reproduce this and it is an issue with VSTU integration. The issue happens with VSTU projects, with or without the ReSharper Unity plugin installed, which means it needs a fix in ReSharper, not this plugin. We've also got a ReSharper issue to track this: RSRP-467875
Thanks in the help with diagnosing that it's to do with VSTU projects!
Please fix it, this is a very annoying bug
This is actually an issue with Visual Studio Tools for Unity, and has been fixed in VSTU 3.8.0.6, which is part of Visual Studio 2017 15.8.2, and can be downloaded for Visual Studio 2015.
Most helpful comment
Just to confirm, we can reproduce this and it is an issue with VSTU integration. The issue happens with VSTU projects, with or without the ReSharper Unity plugin installed, which means it needs a fix in ReSharper, not this plugin. We've also got a ReSharper issue to track this: RSRP-467875
Thanks in the help with diagnosing that it's to do with VSTU projects!