Serious problems creating Events through Property Edito


(Van Den Bergh) #1

If I try to create an onClick method by doubleclicking in properties editor, the interface part is thrown somewhere with my code and destroys my complete source code.

If I insert onClick Event by hand, also corresponding code in codebehind, it is not bound to the one in codebehind:

<asp:Button ID=“bnteilnehmer1” runat=“server” Text=“Übernehmen” CssClass=“dropbtn” Style=“width:100px;” CausesValidation=“False” OnClick=“bnteilnehmer1_Click” ClientIDMode=“Static”/>

method ManagementCockpit.bnteilnehmer1_Click(sender: Object; e: EventArgs);
var liste : system.String;
begin
liste := string.Empty;
for each item: ListItem in chkinstitute.Items do begin
if item.Selected then begin
var selectedValue: String := item.Value;
if String.IsNullOrEmpty(liste) then
liste := selectedValue
else
liste := liste + ‘,’ + selectedvalue;
end;
end;
if string.IsNullOrEmpty(liste) then
Session[‘INSTITUTE_AUSWERTEN’] := String.Empty
else begin
if liste = Session[‘INST_ID’] then
Session[‘INSTITUTE_AUSWERTEN’] := String.Empty
else
Session[‘INSTITUTE_AUSWERTEN’] := liste;
end;

  1. I can click on button “Übernehmen” like mad, nothing happens.

Editor struggles and shows funny things in all rainbow colours.


(Van Den Bergh) #2

image

This appears after dblclick (no event created)

image

Back to properties:

image

No compile as the event is not created.
If I insert it by hand, event is not working.

Going again and again back to 9.3


(RemObjects) #3

Thanks, logged as bugs://81739


(Van Den Bergh) #4

Not solved with beta 10.0.0.2363
Try it with Listview:

image

No Event created:

This is still better than creating the event somewhere in existing code, but it is still frustrating.

I paid one year for an update subscription which I cannot use
Have to go back AGAIN to old 9.3


(Van Den Bergh) #5

Addendum:

image

Keyboard-Shortcuts not working either (see red box)


(marc hoffman) #6

yeah, i don’t believe the issue was closed yet?


(Van Den Bergh) #7

May be this helps:

Version:1.0 StartHTML:000000243 EndHTML:000003350 StartFragment:000001175 EndFragment:000003297 StartSelection:000001175 EndSelection:000003292 SourceURL:file:///C:/Users/vdb/AppData/Roaming/Microsoft/VisualStudio/14.0/ActivityLog.xml

802 ERROR SetSite failed for package [ExtensionsPackage]Source: ‘Microsoft.VisualStudio.Shell.14.0’ Description: Aufgrund eines hohen Deadlock-Risikos kann GetService nicht von einem Hintergrundthread in einer von AsyncPackage abgeleiteten Klasse aufgerufen werden. Rufen Sie stattdessen GetServiceAsync (ohne Result oder Wait im Aufgabenobjektergebnis) auf oder wechseln Sie zum UI-Thread mit der JoinableTaskFactory.SwitchToMainThreadAsync-Methode bevor Sie GetService aufrufen. System.InvalidOperationException: Aufgrund eines hohen Deadlock-Risikos kann GetService nicht von einem Hintergrundthread in einer von AsyncPackage abgeleiteten Klasse aufgerufen werden. Rufen Sie stattdessen GetServiceAsync (ohne Result oder Wait im Aufgabenobjektergebnis) auf oder wechseln Sie zum UI-Thread mit der JoinableTaskFactory.SwitchToMainThreadAsync-Methode bevor Sie GetService aufrufen. bei Microsoft.VisualStudio.Shell.AsyncPackage.GetService(Type serviceType) bei Microsoft.VisualStudio.Shell.Package.Initialize() bei RemObjects.Oxygene.VisualStudio.ExtensionsPackage.<InitializeAsync>d__0.MoveNext() — Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde — bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass16_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext() — Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde — bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() bei Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) bei Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) bei Microsoft.VisualStudio.Services.VsTask.GetResult()
{8323D7DB-08A7-47D7-BF49-593A1FEF0FA9} 80131509 VisualStudio

In Activity Log since latest beta


(Van Den Bergh) #8

Latest Beta Change log

Visual Studio

  • 81739: ASP.NET: event handlers get inserted into code badly…

(marc hoffman) #9

That means the build contains changes for this issue. It doesn’t mean it was closed necessarily. When the issue gets closed, it gets posted here, right now the status is still


(RemObjects) #10

bugs://81739 got closed with status fixed.


(Van Den Bergh) #11

After renewing my update subscription, hoping this has been solved, I had to find out that the events are created now, but unfortunately rubbish has been created.

Example:
asp.net Listview, dbclick ItemDataBound, this will be automatically created

Interface
method lvSystemtherapie_ItemDataBound(sender: Object; e: TEventArgs);

Implemetation
method method KrebsregisterDoku.lvSystemtherapie_ItemDataBound(sender: Object; e: TEventArgs);

IT SHOULD BE:

ItemDataBound(sender: Object; e: ListViewItemEventArgs);


(RemObjects) #12

bugs://81739 got reopened.


(Van Den Bergh) #13

Same with ItemCommand:

lvSystemtherapie_ItemCommand(sender: Object; e: TEventArgs);


(Van Den Bergh) #14

Complete Class also not working and keyboard shortcuts (see underlined) not working either:

I have to retype the method which I have defined in interface completely. No automatic insertion by “complete class” in implementation section anymore


(marc hoffman) #15

Ok, that seems to be two completely unrelated issue; can you give us a test case for that?


(Van Den Bergh) #16

I will check, cannot give you my entire source it is huge.


(marc hoffman) #17

Just the one file (via PM) might be enough.