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 ).
Related
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.
I have a solution with 3 projects plus one packaging project, and one of the projects is refusing to build - but only for release. Debug is fine. The project is called Foreground, with the namespace ForeGsp containing the class App in App.xaml.cd and in MainPage.xaml.cs there is the class MainPage and Item. Now as soon as I add a reference to my background (Entrypoint: Background.BackgroundTask), in the namespace Background, in the class BackgroundTask, assembly name & default namespace Background my project will refuse to build for release because Internal compiler error: An item with the same key has already been added. Debug still works 100%. I'm a bit lost as to why this is. Also, Background builds on it's own without any problems.
I have already tried uninstalling my app and running VS as admin. Clean/rebuild didn't help either, and using only these two Projects didn't make a difference. What else can I do?
Edit: For whatever reason, this problem only happens if Foreground has enabled Compile with .Net native toolchain, but I can't release it on the store without it. I was told I should try commenting out parts of the code - are there any specific parts that can cause this? Like should I focus on the imports, or specific functions?
My references for Foreground:
Analyzers
Background
Microsoft.NETCore.UniversalWindowsPlatform
Microsoft.Toolkit.Uwp.Notifications
Universal Windows
Windows Desktop Extensions for the UWP
Background:
Analyzers
Microsoft.NETCore.UniversalWindowsPlatform
Microsoft.Toolkit.Uwp.Notifications
Universal Windows
Windows.ApplicationModel.FullTrustAppContract
The problem is Windows.ApplicationModel.FullTrustAppContract. Removing this reference solves the problem. Instead, Windows Desktop Extensions for the UWP should be also added to background.
1) In these cases only clean and rebuild all can help you.
Its probable your Debug profile still kept some older (previously compiled assembly) version of one of projects and uses it for running (its only copied not rebuilt again). When you will Clean and Rebuild Debug, you will probably get as same error as you have on Release now.
2) When Clean and Rebuild commands will not help to you, try to create fully new projects and import *.cs files from current projects and again provide references.
3) Ensure you don't have a circular dependency in References of all projects (despite of you aren't notified for that by compiler now. Sometimes behavior of compiler is strange in this cases.)
I have a Setup Project for my winforms application. After installing the application using the generated .msi i navigate to the installation folder and try to run the .exe file and nothing happens. I don't get an error or anything.
Steps i've tried to solve my problem.
Making sure the target platform x86 matches in the main project, setup project and every other project in the solution that the application has a dependency on.
In the setup project, made sure that i have a project output in the application folder that references the primary output from the main project. And that the dlls i use also are listed there.
Ran the application as administrator.
Activated Click Once security settings in the main project.
Ran sfc /scannow without finding any issues.
Restarted my computer.
When installing the program using the generated .msi on another computer i have the same issue.
When running the program from visual studion it works perfectly fine.
It is likely that your application is crashing because of some missing dependency.
Possible reasons:
A missing assembly (say, for eg, is all your third party dependencies present in the application folder after the installation ?)
Difference between .Net framework versions between your machine and the installed machine (say, for eg. 4.7 vs 4.7.2)
One useful tool that has helped us in the past is to use the Windows Event Viewer. If the program is indeed crashing, it is likely to have details about the reason for crash.
You can then use it as a starting point for further investigation.
I have web application which works fine when I have configuration in Visual studio:
"Active solution configuration. Debug, platform x86."
When I publish application with release configuration(Any CPU), I get the following error on publish server:
Could not load file or assembly 'myApp.Web' or one of its dependencies. An attempt was made to load a program with an incorrect format.
If I change in visual studio to:
Active solution configuration, Release, platform x86.
and rebuild my application, I get the same error also on my computer.
If I change back to debug and rebuild, it works again.
I'm using Local IIS .
What could be wrong, I have tried every suggestion I have found but with no success?
Was having same problem. This problem comes out when you are using assemblies built for x86 or x64 explicitly. Make sure that all projects, especially if you are using native code somethere in satelite assemblies are set to be built for same platform in configuration manager.
update
It smells like your server and your build machine has different bitness. If you have same bitness set for debug and release and one is working while other is not it might be because of some settings miss in assembly publish process (release does not copy something or copies something wrong)
Here's an error I get when I try to install my application from the publish location:
I have my application (and a DLL used by it) linked to version 1.61.4111... of QWhale.Common which is a 3rd party DLL. I have been used this version since about 4 updates ago and never had this problem. I have no idea which part of my application or DLL could be trying to link to the older version. The only thing I did different on this version is that I moved my application's project folders to a new location in my computer.
Where should I start trying to find where this problem is coming from? Did you ever have this problem before?
As Yahia commented, this can be a licensing issue but if you've been using this assembly for a while and if you've been compiling it with your application, there is a chance that a setting associated with the file could have changed with your projects settings.
Assuming you are using Visual Studio, I recommend opening your Projects properties window and navigating to the Publish tab and opening the Application Files Dialog.
From there, find the referenced, 3rd party assemblies make try setting the Publish Status to Include and the DownloadGroup to (Required).
Save your changes and republish your application.