AnkhSVN crash in Visual Studio 2017 - exception

[W10 Pro x64 v1709, Visual Studio 2017 Community 15.6.0, AnkhSVN 2.7.12815.35086]
I am getting a crash at VS startup of AnkhSVN in VS 2017. I believe this just started happening today - I don't remember it happening the last time I opened the IDE. Uninstall/reinstall of the extension doesn't help. Error msg when I attempt to open the Pending Changes window:
AnkhSVN Exception
An internal error occurred:
Object reference not set to an instance of an object.
Stack trace:
System.NullReferenceException: Object reference not set to an instance of an object.
at Ankh.UI.PendingChanges.PendingChangesToolControl.OnLoad(EventArgs e)
at System.Windows.Forms.UserControl.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at Ankh.VSPackage.AnkhToolWindowPane.get_Window()
at Microsoft.VisualStudio.Shell.Package.ToolWindowCreationResult..ctor(WindowPane window, UInt32 flags)
at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, UInt32 flags, Object context, Guid persistenceGuid)
at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, Object context)
at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id)
at Microsoft.VisualStudio.Shell.Package.FindToolWindow(Type toolWindowType, Int32 id, Boolean create, ProvideToolWindowAttribute tool)
at Ankh.VSPackage.AnkhSvnPackage.ShowToolWindow(AnkhToolWindow toolWindow, Int32 id, Boolean create)
at Ankh.VSPackage.AnkhSvnPackage.ShowToolWindow(AnkhToolWindow window)
at Ankh.Commands.UI.ShowToolWindows.OnExecute(CommandEventArgs e)
at Ankh.Commands.CommandMapItem.OnExecute(CommandEventArgs e)
at Ankh.Commands.CommandMapper.Execute(AnkhCommand command, CommandEventArgs e)
Troubleshooting/repair suggestions?

This appears to be an issue introduced in the 15.6 release of Visual Studio 2017 - I see the same thing in Visual Studio 2017 Professional v15.6.
There is an open issue here: https://developercommunity.visualstudio.com/content/problem/207735/ankhsvn-2712815-failed-to-load-pending-changes-vie.html that is marked as under investigation. I see 58 people are following the issue, so hopefully it will get some traction and be fixed soon.

Microsoft released fixed VS 15.6.1

I just committed a fix. I think you can work around this issue by unchecking the checkbox to add all files in the initial commit in the dialog where you select the location. (This used to be the default some time ago)
This issue will be fixed in the next release, and I’ll try to get one out over the next two weeks. I think VS 2017 should update AnkhSvn automatically unless you explicitly disabled this yourself.
Source URL :- https://ankhsvn.open.collab.net/ds/viewMessage.do?dsForumId=582&dsMessageId=614598

Related

NullReferenceException from EWS Nuget

I am using Exchange.WebServices.Managed.Api 2.2.1.2 Nuget package to send email from EWS 2016.
Sometimes I am getting exception given below. Email is sent out and saved to Sent Items folder as well, so looks like this is not a server issue and seems like somehow Nuget package is throwing this misleading error.
Has anyone encountered this?
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.WrapStream(Stream responseStream, String contentEncoding)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetResponseStream(IEwsHttpWebResponse response)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(IEwsHttpWebResponse response)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute()
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalCreateItems(IEnumerable`1 items, FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode, ServiceErrorHandling errorHandling)
at Microsoft.Exchange.WebServices.Data.ExchangeService.CreateItem(Item item, FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode)
at Microsoft.Exchange.WebServices.Data.Item.InternalCreate(FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode)
at Microsoft.Exchange.WebServices.Data.EmailMessage.InternalSend(FolderId parentFolderId, MessageDisposition messageDisposition)
at Microsoft.Exchange.WebServices.Data.EmailMessage.SendAndSaveCopy(WellKnownFolderName destinationFolderName)
at Elliott.CollateralMgmt.Common.Email.Emailer.SendEws(Email email, Boolean isHtml, Dictionary`2 attachments) in /app/Elliott.CollateralMgmt.Common/Email/Emailer.cs:line 162
For debugging such issues I recommend that you download the sources from:
https://github.com/OfficeDev/ews-managed-api
You will then be able to add breakpoint and step into the Library code
I your specific problem, you should take a look at
Microsoft.Exchange.WebServices.Data.ServiceRequestBase.WrapStream
I also encountered this with the nuget EWS 2.2.0 package. I found that I didn't hit this issue when referencing the git source https://github.com/OfficeDev/ews-managed-api instead of the nuget package for EWS 2.2.0 - depending on how you're using EWS, this might work for you.

SSRS Migration from 2008R2 to 2017 Error RSPortal

I was migrating our reporting services from the version 2008R2 to the version 2017 restoring the db and all seems to work fine unless for some report for which I cannot open the subscriptions page.
For those report every time I enter in the report subscriptions page from the web view I get this error
"Something went wrong. Please try again later. "
If I go in the log from the RSPortal File I see this error:
ERROR: OData exception occurred: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: The string was not recognized as a valid DateTime. There is an unknown word starting at index 18.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at Microsoft.ReportingServices.Portal.Services.ODataExtensions.ParameterValueExtensions.FormatAsISO8601Date(String date, String culture)
at Microsoft.ReportingServices.Portal.Services.ODataExtensions.ParameterValueExtensions.ToWebApiReportParameterValue(ParameterValue parameterValue, ReportParameterType reportParameterType, String culture)
at Microsoft.ReportingServices.Portal.Services.ODataExtensions.SubscriptionExtensions.ToReportPameterList(SubscriptionImpl librarySubscription, Dictionary`2 parameterTypes, String culture)
at Microsoft.ReportingServices.Portal.Services.ODataExtensions.SubscriptionExtensions.ToWebApiModel(SubscriptionImpl librarySubscription, Dictionary`2 parameterTypes, SubscriptionProperties properties)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
Does anyone have a suggestion on how to solve it? I thought was something related to the CultureInfo value but I am not sure.
Thanks
Probably could be helpful for someone in the future so I will indicate the steps I took to solve this issue:
This issue was due to a data type mismatching on one parameter for a few subscriptions.
Seems that the error handling has changed in the time with Microsoft in fact, after I found the subscriptions that were having problems I tried to open them in the old environment and I have got this error:
“The Value provided for the report parameter “YourDate’ is not valid for it is type (rsReportParameterTypeMismatch)”
What I did so was to delete these subscriptions with the error in the new Reporting Server environment and finally the web view worked fine

Error: VB runtime is not loaded

Edited version, after suggestion from community:
In a Windows 8.1 Phone project (Part of a VB.Net Solution with also a Store app and a Portable Class Library) I get this error message:
Call not possible because VB Runtime is not loaded.
but as far as I can trace the code keeps running in spite of this. Until... eventually an error pops up, telling me that
Could not find Windows Runtime type 'Windows.foundation'
What I have found so far on this subject seems to have a relation with Silverlight and very old versions of VB Runtime. Nothing recent.
Further on during execution in the error trap the following explanation is given:
at System.StubHelpers.WinRTTypeNameConverter.GetTypeFromWinRTTypeName(String typeName, Boolean& isPrimitive)
at System.StubHelpers.SystemTypeMarshaler.ConvertToManaged(TypeNameNative* pNativeType, Type& managedType)
at Windows.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType)
at Dossier365.Mobile.Behaviors.MenuTegelClickAction.ReageerOpMenuKeuze(Object sender, Object parameter).
I have attached a screenshot with the different messages. The Store App runs fine, based on the same PCL.
EDIT: after suggestions below: added DirectCast:
Now a new error message appears: I have no clue what goes on here or moreover: how to overcome this situation. My attempts so far have not lead to a workable solution.
Anyone with a good suggestion or solution?

Failed to resolve Android.App.Fragment with Link SDK Only enabled

I'm getting compile time error when linker option = "SDK Only" with "Failed to resolve Android.App.Fragment" message. It's all started when I added Google Maps support with FragmentActivity to my MonoDroid application.
With Linker option = "None" everything works just fine except of the fact that .apk became huge (~30mb instead of 7mb when link SDK Only enabled)
Error details:
The "LinkAssemblies" task failed unexpectedly.
Mono.Cecil.ResolutionException: Failed to resolve Android.App.Fragment
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.Initialize()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
I found a lot of similar problems (1, 2, 3) and the only proposed solution was to disable linker which is not the case for my app.
How can I diagnose and fix the issue?
TIA!
Are you referencing Mono.Android.Support.v4 classes everywhere?
I've been struggling with the same issue on and off for a while now. Currently, I have had success in switching to the Alpha channel of Xamarin Updates and using the alpha builds of Xamarin.Android and Xamarin Studio. Running those alphas, I have been able to make release builds with Linking enabled with no issues. Hope that helps!
Eventually GooglePlayServices Xamarin Component has been updated to 12.0.1 and not it could used without any errors even with "SDK Only" linker flag. You can use it right from component store without any bindings pre-compilation.

SL4 WCF RIA Query Issue: "Completed" happening before it's really completed?

I have a strange little issue with a WCF RIA service I'm using in a SL4 application. Here is the code for a button click handler I've got:
private void btnTest_Click(object sender, RoutedEventArgs e)
{
LanguageContext context = new LanguageContext();
LoadOperation<Language> op = context.Load(context.GetLanguagesQuery());
op.Completed += (obj, args) =>
{
if (!op.HasError)
{
System.Threading.Thread.Sleep(500);
MessageBox.Show(context.Languages.FirstOrDefault().DisplayName);
}
};
}
Note that there's a Sleep call in the handler. Without that sleep call, I get an exception (A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)). If this code is in the "Completed" handler, I figured it was actually, well, completed by the time it got there. Why does it die without the Sleep()? BTW, the Sleep() isn't an option for production, it was just a problem-sovling tool :)
So, If I add "pooling=false" to my connection string, everything works. However, I don't really like that answer. Connection pooling is a good thing. Is there a way to leave it on and have things still work?
I can also reproduce this issue.
For example, I have a unit test that if run twice in succession will fail the second time.
This unit test performs a few things:
1. Drops and recreates the database using a custom Entity Framework 4.1 DbContext Initiailzer
2. Launches a silverlight application
3. Click a button in the silverlight application
At this point the silverlight application makes a call to a wcf ria service to query the database that was just created.
However, every time the unit test is run a second time, I get the same error.
But the error goes away immediately if I click the button again for example.
Setting "Pooling=False" in my connection string did not resolve the issue in my case.
However, I was able to resolve the issue by restarting the web server which hosts the silverlight application and ria service after the database is created.
In my case, I just decided to use Cassini Dev Web Server v4 and run the tests on that web server instead of iis.
Windows 7 Ultimate x64
Visual Studio 2010 SP1
Entity Framework 4.1
WCF RIA Services SP1 for Silverlight 4
Silverlight 4
MSTest
Edit:
Entity Framework 4.1 Update 1 contains a bug fix to remove the need to specify ‘Persist Security Info=True’ in the connection string when using SQL authentication.
http://www.microsoft.com/download/en/details.aspx?id=26825
I am not (yet) sure if the bug is related and might resolve this issue as well.