Visual Studio 15.9.3 breaks web forms? - c#

I have a 15 year old web forms app targeting .NET 4.6.1 that I'm maintaining, and I recently upgraded my laptop to VS 15.9.3. A release build of this app with 15.9.3 no longer fires the Application_Start event on production servers (running .NET 4.7.2). It runs locally just fine and I frequently deployed production builds from this laptop prior to the upgrade.
My desktop computer is still running VS 15.8, and a production build there works fine. The source code is the same between these machines, only the VS versions differ.
Symptoms and attempts at remedies:
I cleaned out all old files from production and tried setting it up from scratch. No dice.
Setup new application under IIS using the same build, but the outcome is the same.
Nothing in the event logs about any errors, except for the error that gets raised when some pages try to access state that's initialized in Application_Start.
I try to log some messages and even raise an exception right at the start of Application_Start, and I don't see anything, so Application_Start is definitely not running.
What can I do to further diagnose the problem? I haven't been able to find anything about this online, or why the newest VS release suddenly doesn't work.
Barring any remedies, any suggestions for downgrading VS instead of completely uninstalling and reinstalling the older VS?
Edit: now even reverting my laptop to VS 15.8.9 did not roll back the problem, so I've disassembled a build from both machines. There are few differences, basically the build number of a dependent assembly, the module version identifier, the comment designating the "image base":
Not working build:
// Image base: 0x055E0000
Working build:
// Image base: 0x052D0000
As far as I understand, none of these differences should have any observable effect. I then disassembled the dependent assembly that's built alongside the ASP.NET app, and it has the above differences and a few more related to the offsets for static field initializers. So I still have no idea why this might be happening.
Edit 2: it seems the issue is in the final aspnet_merge step while trying to merge the precompiled web forms. The merge fails in finding any assemblies to merge, suggesting that precompilation may have failed.

Related

Visual Studio ClickOnce Publish fails

I have created a C# 4.0 WinForms application using Visual Studio 2010 Premium SP1 on Windows 10.
Over the months I have modified and deployed this same App many times, using ClickOnce.
I have never had any difficulty until today.
I made one small modification to the code, which works successfully.
However, after building, and attempting to publish, 2-separate errors are thrown, as listed below.
#1) Cannot publish because a project failed to build.
#2) An error occurred while signing: The parameter is incorrect.
My application does contain a separate project, which is only a Splash Screen project.
If I go to Solution Explorer and attempt to build the 2nd project, it builds fine.
I have also tried to Build > Publish by using the menu in Solution Explorer, rather than from the Publish pane of VS.
Not only is it puzzling why a publish is failing suddenly now, but the error messages do not provide any clue as to where in the code a problem is arising, if indeed it's in the code.
Can anyone suggest how to correct this situation, as I am unable to publish my app any longer.
This error was puzzling, as I've used ClickOnce to deploy modified versions of my App many times. On a hunch, I decided to change the TimeStamp server from the following:
http://timestamp.globalsign.com/scripts/timstamp.dll
to this:
http://timestamp.globalsign.com/?signature=sha2
Since researching this error referenced the fact that Microsoft would no longer recognize SHA1, but needed the SHA2 cryptography, I tried using this latter server and after compiling, it allowed my app to do a successful publish.
If anyone else runs into this problem, the above solution may prove useful.

Code runs, but reports that I am debugging in release build

I have an application where I can start it out in debug mode, and everything will run fine for several minutes until it will randomly pop up a box saying "You are debugg in a Release build of ***. Using Just My Code with Release builds using compiler optimizations results in a degraded debugging experiance...
I am running multiple projects at a time (they all depend on each other)
The project that it is erroring on is a class library that is referenced by both console applications and Web Api applications and is housing my data layer.
I have checked in the configuration manager and everything under debug is set to debug.
When I mention random above, at times it will error when I am trying to use the application, while other times it will error when sitting idle.
I have attempted to do a repair on Visual Studio and am using Visual Studio 2015.
I have also had other errors such as IIS Express just quit working out of nowhere, and I am using a machine with very good performance.
Does anyone have a suggestion on what I can troubleshoot next? I just wouldn't think that it would be the code if the code is being executed before the error just fine.
I finally figured out the "fix", which is very strange. I went in and enabled Suppress JIT optimization and everything went to working. I then disabled it to ensure that was the issue, but it has continued to work. I am not sure how this fixed this issue, but all appears to be working now.
Also, I am running Update 3 as asked above.

ASP.NET Web API project stopped running

My current ASP.NET Web API project simply quit running a couple days ago. No code, not even the code in Global.asax.cs, is executing. Some clues:
The project stopped working after I hopped over to a subcontractor's Git branch. When I hopped back to the master branch, it didn't work.
The issue is associated with my primary development computer (Windows 10 running in a Parallels environment on OS X). It runs fine on my secondary development machine.
If I attempt to establish a breakpoint on any line of code after
starting debug, I get the following error: “The breakpoint will not
currently be hit. No symbols have been loaded for this document.” I
have followed every thread on the following stackoverflow
breakpoint not hit posting, but have been unable to get it to work.
In addition to implementing the the threads on the stackoverflow
breakpoint not hit posting, I've tried the following.
Verified that debug configuration and full debug info are set on all assemblies.
Manually deleted all bin and obj folders. Cleaned and rebuilt the
project.
Rebooted numerous times.
Maybe you have some files leftover from the subcontractor's branch that you don't want? Have you tried discarding all of your changes and then pulling on your good master branch?
Also, I usually find myself receiving the "no symbols loaded" error if my files have changed from the binaries expectation of those files creating a mismatch between what's running and what's displayed in visual studio. Again, making sure you clean the solution and rebuild it or restarting visual studio usually gets me out of trouble.

A dependent dll was not found

My app does not run on "Release x86" when running the app it crashes immediately after the splash screen. Output shows the following exception:
The program '[8204] dfz.exe' has exited with code -1073741515 (0xc0000135) 'A dependent DLL was not found'.
It also tells me the module is build without symbols, however in build settings I have set debug info to Full.
The first time I build the app for the Windows Store it built correctly and I also published that version to the store. When I did a manual rebuild to check if ads where inserted correctly it would not run.
However, I can run the app on ARM and X64 with no problems on release. Only x86 with .Net native toolchain will throw the missing dependant DLL.
What I have tried so far:
Created a new project, Added all my files and Nuget packages, No dice
Removed and updated all my existing references.
Tried to debug the release version so i can find out what DLL is missing from the package. However it keeps telling me there are no symbol files.
I am looking for any suggestions I can try because I am really at a loss here of why it will not run on x86.
Edit:
A blank UWP project also returns the DLL error when i run it. It looks like i have a broken development environment.
Edit2:
Just did a remote debugging session to another laptop and the app worked with no problems. So the problem is an environment related issue.
Could one of the projects in your dependencies be configured specifically for x64?
Another thing to check is that one of your projects is not set to build for that configuration (I vaguely remember some problem I had years ago that sounds kind like your situation ... although not for windows store apps ... and it turned out one of my projects wasn't set to compile for the configuration I was selecting ).

Visual Studio C# library building improperly

I've been developing a large scale project independently for the past two years, and just today I started having problems under the hood.
I have a code library in which I write the majority of my code, and an external project that references the library to implement it.
Suddenly, when I attempt to launch the .exe from the release folder, I get an exception, however when I launch in release mode through visual studio, it works fine. I don't experience this problem in debug mode at all. It appears as though the library is properly rebuilding it's .dll and putting it in the release folder despite this behavior. I've tried everything from messing with properties to completely deleting all trace of the library, adding a new one, and copying only the code files into the fresh project, and I still experience the same behavior.
This is a very common issue related to environmental differences between DEV and Production systems. Chances are very high the Production system does not have the proper pre-requisite dlls on the system. You can determine the exact root cause of this problem by starting the Fusion log viewer, recreating the problem and reading the log. It will tell you what DLL is missing.
https://www.google.com/search?q=fusion+log&oq=fusion+log&aqs=chrome..69i57j0l5.1890j0j7&sourceid=chrome&es_sm=122&ie=UTF-8

Categories

Resources