I understand that Windows Workflow foundation 4.5 supports side by side and dynamic update of Workflow definition. I found few samples on internet, but all describes Code based approach for updating the workflow. I wanted to make a utility which is used by developer to update the workflow without coding. (using only Xaml manipulation should be our ideal case)
My Utility does the following things,
I take Base Xaml (the workflow definition I wanted to update) File Name and Assembly (V1) from User.
I prepare it for update by calling prepareForUpdate API. and save it as a ForUpdate XAML.
I remove Base Xaml From visual Studio project.
I load that updated Xaml File in project (instead of base xaml) ,and modify the workflow.
After modification and rebuilding, I again open my update utility and take input from User the modified Xaml (v2) and Create update map.
After that I tried to update the running instance (using update map), At that time my utility show that they are updated successfully.
Although they are updated but at run time make undesirable effects (I got exception like {ICompiledExpressionRoot for compiled location 'a'}, where {'a'} is my variable) , related to Expression parsing, Root , etc.
Is anyone trying to achieve same thing or has some idea. my errors are consistent in both Visual Basic and Visual C# based XAML.
While we have not run into your specific scenario we have attempted to use Dynamic Update services to come to a solution much like you describe.
Despite having mostly declarative workflows designed entirely in the Visual Studio visual editor we abandoned this tool. In most cases this it was unable to generate an update map, sometimes even throwing parsing exceptions.
Using it really did not feel like it was a fully completed component and the lack of documentation around it, even after so much time has passed after its release, makes me very wary of considering it for anything.
Related
Hi I have been shifted from VS 2013 to 2015 presently. So I am not too much familiar with in depth specifications.
I like VS 2015 as it allows me to evaluate lambda expressions and also it allow to me to change values runtime.
Scenario:
In some apps (winforms tested only) I am able to edit code while debugging and yes latest code is executed always i.e I don't need to stop and run the program again and againe. Yes it is very excellent feature.
But in case of my first experience at controller in MVC I am unable to edit code and it shows me multiple reasons behind this.
Can someone explain in what scenarios I can add/delete code while debugging?
Thanks in advance!
In your visual studio go to Tools->Options-> expand debugging -> select Edit and continue and then check Enable edit and continue.
here is image of that:
see screenshot
You normally cannot edit and continue if you attached to an already running process which maybe your case if you are attached to a running MVC web project. If something was load using Reflection you will not be able to edit it as well.
I have also seen sometimes a similar message appearing during debug. I found the following from MSDN regarding code changes during debugging:
The following changes cannot be applied to C# code during a debugging session:
- Changes to the current statement or any other active statement.
- Active statements include any statements, in functions on the call stack, that were called to get to the current statement.
- The current statement is marked by a yellow background in the source window. Other active statements are marked by a shaded background and are read-only. These default colors can be changed in the Options dialog box.
- Changing the signature of a type.
- Adding an anonymous method that captures a variable that hasn’t been captured before.
- Adding, removing, or changing attributes.
- Adding, removing, or changing using directives.
- Adding a foreach, using, or lock around the active statement.
More information: https://msdn.microsoft.com/en-us/library/ms164927.aspx
So, after alot of R&D i came to know that Edit and continue is NOT available for Asp.net yet. It would be released in the final version of Visual studio 15.
source: https://blogs.msdn.microsoft.com/visualstudioalm/2015/04/29/net-enc-support-for-lambdas-and-other-improvements-in-visual-studio-2015/
Goal: Capture the event raised when a TFS work item is saved in the Visual Studio UI, and prompt the user to send a boilerplate email to the person that the item is assigned to.
Issue: I'm unable to ascertain how to go about doing this. I've started a VS extension project, as that seemed like the most promising route, but from there I don't know where to look for the the window I need, or how to reliably subscribe to the saving event when such a window is open.
I think you will have to write a Visual Studio extension to create that type of functionality. Its not impossible but also not for the faint of heart. :)
It seems like your use case may be better served by TFS Notifications?
Set alerts, get notified when changes occur
UPDATE:
Another option may be to use TFS events via a web service, which looks much easier than a VS extensions - http://www.ewaldhofman.nl/post/2010/08/02/How-to-use-WCF-to-subscribe-to-the-TFS-2010-Event-Service-rolling-up-hours.aspx
As the questions says, I want to write code or debug an appication in real-time without setting breakpoints or pausing/restarting the application.
For example, when I write a game, I want to see what is happening when I change the code for the calculation of the light effects or the AI of the enemies immediately, while running the game on my second monitor.
Update:
Ok, it seems that you guys don't understand exactly what I want.
I want Visual Studio to be more like a WYSIWYG editor...make changes or add new code and see instantly what has changed in my application, without the application to pause it's work.
Update:
I saw this feature in this Video with Java in Eclipse (go to 14:30, where he changes the light effects of the game without stopping it.)
Sometimes. Check out the Edit and Continue feature: http://msdn.microsoft.com/en-us/library/bcew296c%28v=vs.80%29.aspx
Based on the comments, it sounds like you either want a dynamic language (a lot of games are scripted with LUA, or check our IronPython or IronRuby) or you want to dynamically load and reload assemblies, which would require something like MAF perhaps. With that, you could build the bits that you are changing as addins, and then unload and reload the addin assemblies when they change. That seems hacky though, and will likely perform poorly compared to a DLR language.
here is all you want to know abt the Edit and continue feature in Visual Studio:
http://msdn.microsoft.com/en-us/library/bcew296c(v=vs.80).aspx
You can edit the code while debugging, but no instruction will be executed during this time.
If you hit F10, the next instruction will be executed. If you hit F5 the normal execution will continue.
Why not create a resource file with the values to apply. Then have a command you can execute in the app that will reread the file. World of Warcraft has a feature like this. /reload ui
Yes, but unless Edit and Continue is enough for your need you need to design and implement the functionality yourself.
if the change is data driven - just reload the data when some file changes.
if change is in code - consider making that portion of the code to be in separate assembly and dynamically load and rewire the assemebly (may require strongly signed assembly to proper version code). Or dynamically compile code into new assembly (to avoid assembly conflicts in the same app domain).
In all cases you need to figure out how to deal with loosing part of previous state that could be in older objects.
I might have a hard time explaining this because I am at a total loss for what is happening so I am just looking for some guidance. I might be a bit wordy because I don't know exactly what is the relevant information.
I am developing a GUI for a project that I am working on in using .Net (C#)
Part of the interface mimics, exactly, what we do in another product. For consistency reasons, my boss wants me to make it look the same way. So I got the other software and basically copied and pasted the components into my new GUI.
This required me to introduce a component library (the now defunct Graphics Server GSNet, so I can't go to them for help) so I could implement some simple graphs and temperature/pressure "widgets."
The components show up fine, and when I compile, everything seems to work fine. However, at some point during my programming it just breaks. Sometimes the tab that these components are on starts throwing exceptions when I view the designer page (A missing method exception) so it won't display. Sometimes JUST those components from the GSNet library don't show up. Sometimes, if I try to run it, I get a not-instantiated exception on one of their lines of code in the designer code file. Sometimes I can't view the designer at all.
No matter what I do I can't reverse it. Even if I undo what I just did it won't fix it. If it happens, I have to revert to a backup and start over again.
So I started to backup pretty much every step. I compile it and it works. I comment out a line of code, save it, and then uncomment that same line of code (so I am working with the same exact code) and the components all disappear. It doesn't matter what line of code I actually comment out, as long as it is in the same project that these components are being used.
I pretty much have to use the components. . . so does anyone have any suggestion or where I can look to debug this?
The only thing that comes to mind is a read-only bin directory. I've found that .NET has trouble if the interop libraries in the bin directory are read-only. Read-only interops generally prevent controls using those interops from displaying in the form designer and thus mess up compilation (if you do a full build anyway). A rebuild might let you get the app running and then fail when it reaches the part using the read-only interop.
This may or may not be your problem but it's all that comes to mind.
I know this is very late to the game, but I just ran into this same problem.
I'd pulled down one of our applications from SVN, and when I first tried to open the main form for editing, I was prompted with the custom component not being defined in the software, even though I could plainly see it as a class. I was given a choice to ignore it, which I did, and the custom control promptly disappeared from the form (still showed up in the project).
So at the suggestion of my colleague, I deleted the instance from my hard drive, and re-checked it out from SVN. Before i did anything else, I built the project for both release & debug, and that fixed the problem.
Maybe this'll help someone else who finds this SO question when they run into this.
Edit-And-Continue is one of my favorite debugging tools which I have previously used on C# based Winforms and ASP.NET projects. However, I'm running a Silverlight 3.0 application on VS 2008 and whenever I try to make a change (after breaking) it says "Changes are not allowed when debugging Silverlight applications". Also there isn't an "Enable Edit and Continue" option in the project settings.
Does anyone (possibly an insider) know when this feature will be supported by Microsoft???
(I NEED IT!)
I doubt it will ever be a feature, to be honest. EAC has always required you to attach directly to your .exe in order to work. In the case of Silverlight, that .exe is the browser, which is not the .exe you are developing.
If you are looking to edit XAML while running, you might consider a dynamic loading situation where you can refresh the control at runtime. In that case, you can edit XAML while debugging, but I'm afraid you're stuck with the managed code.
EDIT:
One possibility that you might consider (but I haven't tried it) is to write your code against unit tests. Then, there is a tool called TestDriven.net that allows you to debug your tests with EAC (as an advanced feature). From there, you might be able to do some EAC, but you will be doing it via unit tests, not actually in the Silverlight environment.