Reputation: 5138
I created a Windows service project and later decided to change it's output type to class library so I could include the service class in another project which would create the .exe to be installed as a service. But now when I try to build the first project it fails with the error:
/platform:anycpu32bitpreferred is not a valid setting for option /target:library or /target:module
How can I fix this?
Upvotes: 13
Views: 5532
Reputation: 60503
Try to
unload project (right click in solution explorer)
edit <projectName>.csproj
(right click in solution explorer)
remove <Prefer32Bit>true</Prefer32Bit>
reload project.
Upvotes: 38