D
Dave L
This is a strange problem that's plagued me for years using the .NET tools.
The problem is this:
..NET applications installed on a virgin machine (framework installed, but no
..NET tools installed) fail with an expection when the application starts.
The application works in these configurations:
1) Runs in the debugger with Debug or Release builds
2) Release build, installed on a machine with the framework and .NET tools
installed
3) Debug build, installed on a virgin machine (framework installed, but not
the .NET tools)
The application only fails in this configuration:
1) Release build, installed on a virgin machine (framework installed, but
not the .NET tools)
The same project, compiled with the same tools, on the same XP Professional
OS creates non-functional installations on my desktop system, but the laptop
worked fine. A week ago, the laptop started having the same problem of
creating bad installations (again installations worked on everything, except
machines without the .NET tools). Installations are created using the .NET
built-in installer.
After trying everything, the solution to get the PCs to create successful
builds was to change each project Optimize Code setting to False, then build
the project; the installation works in release mode on a virgin machine.
Then go back and change Optimize Code to True; project now works in release
mode on virgin machines. Absolutly no code changes or other project settings
made. The PC now just works and creates successful builds for all machines.
I performed the same proceedure on my laptop and desktop PCs, both now work.
Unable to get a bad build on either machine now.
Is this a known tool bug? If so, how can I prevent this in the future? Same
code and same tool project options produced different results, which bothers
me.
A clue might be that the inner expetion text message was:
"File or assembly name Common, or one of its dependencies, was not found."
Common.dll is my mixed language DLL (managed and unmanaged C++). The file,
and its dependencies, were indeeded in the same directory.
The main exeception was: System.TypeInitializationException. My app has 4
projects: 2 C# DLLs, 1 C++ DLL, 1 C# EXE.
Thanks for any assistance.
The problem is this:
..NET applications installed on a virgin machine (framework installed, but no
..NET tools installed) fail with an expection when the application starts.
The application works in these configurations:
1) Runs in the debugger with Debug or Release builds
2) Release build, installed on a machine with the framework and .NET tools
installed
3) Debug build, installed on a virgin machine (framework installed, but not
the .NET tools)
The application only fails in this configuration:
1) Release build, installed on a virgin machine (framework installed, but
not the .NET tools)
The same project, compiled with the same tools, on the same XP Professional
OS creates non-functional installations on my desktop system, but the laptop
worked fine. A week ago, the laptop started having the same problem of
creating bad installations (again installations worked on everything, except
machines without the .NET tools). Installations are created using the .NET
built-in installer.
After trying everything, the solution to get the PCs to create successful
builds was to change each project Optimize Code setting to False, then build
the project; the installation works in release mode on a virgin machine.
Then go back and change Optimize Code to True; project now works in release
mode on virgin machines. Absolutly no code changes or other project settings
made. The PC now just works and creates successful builds for all machines.
I performed the same proceedure on my laptop and desktop PCs, both now work.
Unable to get a bad build on either machine now.
Is this a known tool bug? If so, how can I prevent this in the future? Same
code and same tool project options produced different results, which bothers
me.
A clue might be that the inner expetion text message was:
"File or assembly name Common, or one of its dependencies, was not found."
Common.dll is my mixed language DLL (managed and unmanaged C++). The file,
and its dependencies, were indeeded in the same directory.
The main exeception was: System.TypeInitializationException. My app has 4
projects: 2 C# DLLs, 1 C++ DLL, 1 C# EXE.
Thanks for any assistance.