The error message "C1189 #error: "No Target Architecture"" typically indicates that the target architecture for your driver project has not been specified. To fix this error in Visual Studio, you need to ensure that the project settings are correctly configured to specify the target architecture.
Here are the steps to resolve this issue:
- Open your driver project in Visual Studio.
- Access Configuration Manager: Right-click on the solution in the Solution Explorer and select Configuration Manager.
- Set Active Solution Platform: In the Configuration Manager, ensure that the Active solution platform is set to either Win32 or x64, depending on your target architecture. If your desired architecture is not listed, you can select <New...> to create a new platform configuration.
- Check Project Properties: Right-click on your driver project in the Solution Explorer and select Properties. Under Configuration Properties -> Driver Settings -> General, ensure that the Target Platform is set correctly (e.g., Windows Drivers).
- Build the Project: After making these changes, try rebuilding your project by selecting Build Solution from the Build menu or pressing Ctrl+Shift+B.
By ensuring that the target architecture is specified, you should be able to resolve the C1189 error and proceed with your driver development.
References: