Latest Acumatica Update Introduced Error: "This source file has changed..." When Debugging Edited Source Files - acumatica

I noticed that since the latest update (Version 6.10.0755) a new critical bug may have been introduced. I'm asking here about it before reporting it just in case they introduced an option that would fix my issue.
My issue is that any time I edit a back end .cs file for a page, when I attach the program to the website instance and attempt to debug, I get the error message "This source file has changed. It no longer matches the version of the file used to build the application being debugged." It feels as though the Just-In-Time compiling feature has been "turned off." Can anyone give me any feedback if it was and how to fix it, or is anyone else experiencing this and should this be reported as a bug in the system?
Edit: I am using an instance which I updated from a previous 6.1 version (6.10.0269). The error is occurring on a graph extension of the SOOrder page. Fully customized pages seem to be fine. Here is a screen shot of the error:

I don't know why the files are detected as changed but you should be able to re-attach to a fresh compiled instance with the following steps.
When attaching in visual studio, the Debug output window will list the compiled runtime code of the ASP application instance. It's in the file 'RuntimeCode_GUID.dll'
Stop IIS and the debugger, this will release the handle to the runtime code dll file
Delete the runtime code dll file
Restart IIS and open the web site in the browser, this will recompile the runtime code
Re-attach the debugger to the website

Related

Error when using development time IIS support

Update: this bug has been fixed for a while now
I installed Visual Studio 2017.3 yesterday and was trying to used the new Development time IIS Support feature. I think I encountered a bug, and I was wondering if anyone knows a workaround this bug. When I used it with a new project it works fine most of the time. By most of the time, is that I think it is broken sometimes depending on the where the project is located/state of cached data, etc.
Sometimes I get an error "Value cannot be null. Parameter name: name". That's the entire error. No log files, no extra information.
I tried to enable the feature for an existing project I am working
on, it got that error.
I tried adding a new web project in a new solution it worked fine. I tried adding a new web project in the same solution as my project, it didn't work.
I deleted all temp files, all bin obj and .vs folders and .user files in the
solution. Same problem.
I deleted temp folder, visual studio user profile data, and restarted the PC same problem.
I tried again in the same solution with the project not having '.' in the name, it worked.
I did some modification to the project that was working and tried to launch again I got same error.
I reverted all changes so that the project was back to the "empty project" state, still same error.
I removed the project. Exited visual studio, deleted all temp/.vs/.use/bin/obj files. Then restarted and added the project again, it worked.
I restarted VS and tried to relaunch it didn't work.
The aspnet core version seems to be not related to the bug. I had the problem with projects targeting 1.1 and 2.0 and also had the feature working for both versions.
So obviously this is a bug in VS2017.3. Since even if I am doing something wrong I should at least get an error explaining what I do wrong not an ArgumentNullException message. I already made a bug report. I am wondering if someone knows a workaround thing bug.
Thanks a lot in advance.
Update: This bug has been fixed for a while now.
After some investigation and with help from a helpful member of Microsoft's Visual Studio Team, I found that Visual Studio was failing at the point where it grants folder read access to the IIS App Pool account. The method that gets the App Pool account name was returning null, and when that null value was passed to the System.Security.Principal.NTAccount class constructor, the ArgumentNullException is thrown.
A workaround that fixed the problem for me, was changing the App Pool to any other App Pool, trying to launch, then changing it back to the original/desired App Pool.
First You Must Update Visual studio with visual studio Installer and Launch the Visual Studio installer.
And Select the Development time IIS support component and Modify.
Wait For Download is Processing
The component is listed as optional in the Summary panel for the ASP.NET and web development workload.
Then you Create New Project Again
Problem Solved.

Visual Studio 2017 publish to Azure fails with null reference ("object reference not set to an instance of an object")

Crash on Azure publish from Visual Studio. The same thing happens in previous versions of Visual Studio, but in the past I've been able to work around the bug by clearing the appdata and if necessary resorting to resetting user settings per the responses to this question about a VS2015 issue.
Azure publish has been working up to now in 2017. Suddenly I am getting the dreaded null reference, and this time clearing the aforementioned data has not helped:
Restarted Visual Studio, restarted machine, cleared data a second time including both roaming and local appdata, all to no avail.
Just for others searching, in my case the issue was that I had previously disabled the "Microsoft VisualStudio Managed Publish" extension in VS2017 (probably in an attempt to get VS to be more responsive). To re-enable it, go to Tools > Extensions and Updates, enable it, then restart VS:
Thank you for your sharing. I have the same case as you. I accidently disabled the "Microsoft VisualStudio Managed Publish" extension in VS2017. The publish menu even doesn't show up in .net core solution explorer. To re-enable it, go to Tools > Extensions and Updates, enable it, then restart VS.
Unchecking/unselecting the Application Insights in the Publish workflow of Visual Studio 2017 fix the error for me.
This can be caused by a validation error in the service definition and configuration files.
Even though the editor doesn't highlight any problems, and the build completes successfully, there can be errors in these files and they are not handled properly when you attempt to publish, giving the null reference error.
I encountered this after modifying the files per these steps to configure SSL. I really wasn't expecting that to be the culprit, but in desperation I was trying everything I could think of that might be causing the problem. As soon as I commented out the change to the <certificates> element, the null reference error went away, and the publish succeeded.
(I now need to work out why the steps for SSL configuration didn't work, perhaps due to a change introduced by VS2017, but that's another story.)
I was experiencing the same issue as the OP. I created a new DB Project and then compared the settings of the new DB Project with the DB Project that was causing the Null Reference Exception upon Build or Publish. I noticed that our output directory was redirected to a non-standard location. After deleting all the files in the bin folder, the Build and Publish started working. YMMV
I found a lot of answers around that -- so may be there are more than one -- but none worked for me.
On my system it worked again after removing the installations for ASP.NET and Azure and installing it newly .. --> evth is fine.

Microsoft Visual Studio 2012 has stopped working (solutions on Stack Overflow not working)

Error message:
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.
This was the error message I got when I tried to launch Visual Studio 2012 on my Windows 8.1 system. There is no other information to act upon other than this, which is rather the same as "We don't know what's wrong. We will tell you if we know (but I don't think we do)". It was actually working before it just decided to stop.
The last configuration I made before it began to show this error was that I selected the option to load the last solution whenever I launch Visual Studio, and this was done in the options dialog. I don't think that could have caused Visual Studio to suddenly crash. The previous error message included something that had to with a change in configuration.
I have checked that ActivityLog.xml file in.
There were basically four errors:
Construction of frame content failed. Frame identifier: ST:0:0:{74946827-37a0-11d2-a273-00c04f8ef4ff} Frame caption: Exception details: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context) at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage() at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
SetSite failed for package [Visual Studio Component Model Host Package]
End package load [Visual Studio Component Model Host Package]
End package load [Microsoft.VisualStudio.Editor.Implementation.EditorPackage]
I have searched on Stack Overflow, Bing and Google. The solutions I got from there didn't work. Some had to do with registry settings, deleting keys, etc. I even disabled all the extensions from the registry. There was a time it was showing another message that "Object reference was not set to ...".
I don't know what to do. The only solution I have not tried is the one that I should download the updates. Update 4 is about 2 GB. That will take me, at least a week to download. Is there anything I can do?
PS: I tried to uninstall it. It does absolutely nothing. From the Control Panel, there's only the option to change. Clicking it seems to do something but nothing appears. I tried running from the set up from the .iso file. It shows nothing, too. How can I fix this problem?
There's probably nothing we can help you with here, my view is that you need to reinstall VS. If you cannot uninstall or repair it then you should contact Microsoft.
I am able to fix this problem by installing latest version of of .NET Framework. May be helpful for others as well.

Root element is missing when trying to Publish

It has been a while since I've published my app to Azure. During that time frame, I've upgraded my system from 32-bit to 64-bit meaning a fresh install of Windows and Visual Studio. And Visual Studio Update 3 came out and was applied. When I went to publish an update today, I received the following:
The following exception was thrown trying to publish: Root element is missing.
My web.config file looks fine so I don't think it's this issue.
The app works fine in debug mode so I don't think it's any of the .lsml files as is mentioned here.
And I tried this procedure to hand edit the .ls3proj file but it didn't seem to help.
I previously had an issue trying to publish when I upgraded from the standalone LightSwitch 2011 to Visual Studio 2012. I was able to overcome that issue using the method described in this thread.
Attempting to use this same method resulted in my new project has a full screen error saying "There are critical errors in the application definition metadata..." and 210 individual errors (max errors reached).
The first error, "Cannot create unknown type '{http://schemas.microsoft.com/LightSwitch/2010/xaml/model}GlobalAttributeGroup'." Doesn't make sense because that line in the .lsml is identical from the old project to the new project.
The second error, "Could not find any application definition in the project." Which I do not understand at all.
I am able to publish a simple "Hello, world" style app to my Azure account.
What could be causing this? How can I get more information about exactly which element is causing the issue? The log produced by running devenv /log was not helpful.
Matt Thalman was able to solve my problem over in the Microsoft Forums. The ServiceConfiguration.cscfg and ServiceDefinition.csdef were missing from the project when checked out of version control. Copying those over from a new project restored my ability to publish.

cin.get() causes access violation error under Visual Studio

My Visual Studio 2013 console application has suddenly started causing an access violation error just before exiting. The popup error window tells me "Access violation executing location xxx" and it breaks in the VC library function _callthreadstartex. If I comment out the lines I added:
cout << "\nHit Enter to finish\n";
std::cin.get();
it works. Also, when I run it from a command window instead of from the Visual Studio debug environment, it works. (The project file I'm working with does not contain a Release configuration--debug version is all there is.)
The rest of the program is an example from a large open source package, which is too elaborate to list here. The operating system is Windows 7, freshly installed on an older computer.
While I know that this type of error is usually cryptic and intermittent and may not have anything to do with cin.get() at all, can I rule anything in or out? Since the only things I added are standard library calls, programming error on my part is not likely. The package I'm working with is very complex and fragile, but I don't know where to start in using the error information I'm given to track down the problem. Is it possible this is an operating system setting matter that doesn't require a code fix? Is it a threading issue that's outside my expertise?

Resources