Setup Project for Windows Service won't build under Server 2008 (Visual Studio 2008) - visual-studio

We've got new machines here for doing development on running Server 2008.
With Visual Studio 2008 we're having problems building a Setup Project which installs the Windows Service - Under Custom Actions then Uninstall, "InstallerClass property is only valid for assemblies".
This builds and installs fine on XP SP3.
Has anybody else had any similar problems?
Workstation OS: Server 2008
Software: Visual Studio 2008

Make sure you add the service in the custom actions otherwise the service will not be registered. Other than that, are you having any compilation errors?

I recommend against using the VS install project. Use Wix instead, it's easier than you think.

I did find this - http://msdn.microsoft.com/en-us/library/447a3y7x(VS.71).aspx
Ive made the changes to the Solution and now waiting for it to be tested on a Server 2008 machine - Im still on XP SP3.

I was getting this error when running commandline devenv.exe to build a .vdproj file (in Nant scripts). The problem was I was not also building the dependant project first, so once that was done it worked fine.
It had nothing to do with the configuration of the InstallerClass property after all.

Related

Blazor - Visual Studio generates different pathes to dotnet.exe in web.config

I have two machines. One is Windows 10, one Windows 11. On both I use the newest (up to date) version of Visual Studio 2022. On both I have the newest version of dotnet hosting bundle installed.
I am developing a Blazor only project in Visual Studio and run and debug it in IIS (not express).
On the Win10 machine Visual Studio generates the web.config with the following tag:
<aspNetCore processPath="C:\Program Files\dotnet\dotnet.exe" ...
On the Win11 machine on the other hand: <aspNetCore processPath="..\..\..\..\..\Program Files\dotnet\dotnet.exe" ...
Everything else is exact the same in both web.configs.
While everything works fine on the Win10 machine, on the Win11 I get an 500.30 error from IIS in browser. Windows event log here states that dotnet could not be initialized. When I manually change the path in Win11 web.config to the same, absolute, path like it gets generated on the Win10 machine it works.
Even though technically the relative path should be correct.
Why is it generated differently and how can I fix it for my Win11 machine?
Please try to deploy a simple ASP.NET Core MVC application. If it can run without 500 error, you may miss the IIS Rewrite Module.
If the simple ASP.NET Core MVC application cannot run normally, please check the application pool settings to see if it is No Managed Code.
If still not working, maybe we need further troubleshooting step by step.

Remote Debugging code running on a Windows XP machine without Visual Studio installed

I want to remote debug an executable that is running on a Windows XP machine. This machine does not have Visual Studio installed. I am running Visual Studio .NET from another machine on the network. (I'm easily able to remotely debug other XP machines which have Visual Studio .NET installed).
I located the remote debugging tool (msvsmon.exe in this case) copied the folder to a local directory on the machine I wish to debug and ran it. The cmd window indicated that I was running "Visual C++ Remote Debug Monitor (x86) Version 7.00.96"
I attempt to select the machine from VS in order to attach to the process and I received an error:
Unable to connect to the machine . The debugger is not
properly installed. Run setup to install or repair the debugger.
As I'm not able to find debugging tools online that are old enough, I'm not sure how to proceed.
While there is still time, you should get a copy of VS2010 Service Patch 2, and install it, the version of msvsmon.exe in VS2010 is the LAST release which supports XP remote debugging. In my work we develop for XP Embedded, and have a large installed base used in manufacturing globally. Our customers would scream bloody murder if we changed the runtime which would break/damage/shutdown manufacturing. So we are now forced to migrate to VS2019 and yet we build for XP clients. Our new products do run newer Windows Embedded versions, but the legacy products are still in demand, and are XP embedded based. There is no remote debug capability to my knowledge with VS2019, and our firm is not allowed to distribute VS2010 to our clients so they can single step debug. Very frustrating.

Issue installing SQL Server 2008 Express as a dependency via ClickOnce

I'm currently working on a project which has a Winforms component that is installed via ClickOnce. The original target OS was Vista and above and it continues to work fine for those platforms.
However, the customer has now requested that the application be tested against Windows XP (yes - I know it's about to have support dropped but what can I say).
When I run the installer against a fresh XP virtual machine ClickOnce duly installs the prequisites (Windows Installer 4.5 and SQL Server 2008 [with configured instance]) before installing the application itself.
Running the application appears to work as expected but when attempting to sync the local database with the remote one an exception is thrown.
"Could not load file or assembly 'Microsoft.SqlServer.Replication,
Version 10.0.0.0' or one of its dependencies"
Now, if I start again from a clean XP VM and Manually install Windows Installer and SQL Server Express 2008 before starting the ClickOnce package to install the main application the resulting installation works fine and without error!
I have tried numerous things including creating a ConfigurationFile.ini and using that for both manual and ClickOnce installations but the result is the same - the one with the manually installation of SQL Server will run without error but the ClickOnce installation will not.
I've pretty much run out of ideas now so hoping that someone can point me in the right direction.
Thanks in advance

Custom Action Install runs on Windows 7 but not on XP when update setup project to VS2010

I had a msi installer which has custom action install and uninstall runs perfectly on windows xp and 7. That project was on vs 2005. Then I update that to vs 2010. Now it works fine in windows 7
but when I try to install it on windows xp sp3, it is not working.
I'm getting "There is a problem with this windows installer package..." error. It seems my custom action install don't get start from the msi.
what could have gone wrong?
It's likely a dependency problem. It's hard to say without knowing what language your CA is written in (C++?) but check that you have the right dependencies either linked to your CA or installed on the target machine. Depends is your friend.
Error was I'm missing mfc100.dll in Win XP. When I installed Visual C++ redistributable package 2010 for Windows form it works fine.

Oracle.DataAccess.dll not in Visual Studio 2008 ".NET" reference list

I've got two Windows XP machines with both Visual Studio 2008 and Oracle Client 10.0.2.0.1 installed. One is a development machine and the other one a dedicated build machine. The machines were probably not set up the same way.
On my development machine, I've included Oracle.DataAccess.dll (version 10.2.0.1.100, not the asp.net v 2.x one) in a C# project. Note that the System.Data.OracleClient dll is insufficient (I don't properly remember why, I think it had something to do with bulk insertion/selection).
I was able to select that DLL from the Project->Add Reference dialog in the .NET tab.
Now on the build machine, I cannot build the project as it cannot find the .dll. The .dll is located in the same folder as on the development machine, (<installdir>\10.2.0\client_1\bin\Oracle.DataAccess.dll) in the same version.
The .dll is however not displayed in the .NET tab.
I tried (re)installing ODAC with ODP.Net for VS 2008 but it didn't change anything. When looking at the registry, I realized that my Development machine had a registry folder
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\AssemblyFolders\ODP.Net]
which points to the bin directory of my oracle installation. This entry does not exist on the build machine. Unfortunately, manually adding the key did not make Visual Studio find it (I've tried rebooting).
My main question is:
What do I have to do so the Build Machine automatically finds the Oracle.DataAccess.dll? (Note: manually adding the .dll each time the solution is changed would work, but that is not an option).
You can maybe help me out already by answering one of the following subquestions:
Which installer sets that registry entry?
Do I maybe have to reinstall the whole Oracle Client in a different configuration? (e.g. ADMIN)
Do I need more than just the Oracle Client, ODAC and .NET installed?
I managed to resolve the issue by completely uninstalling the Oracle Client on the build machine, then doing a fresh installation using the Administrator configuration rather than the Developer configuration.
Note that installing the Administrator configuration on top of the existing oracle installation did not work.

Resources