Can't i select Any CPU while compiling WinRT Components?
-
Dienstag, 17. April 2012 14:17
How can i enable "Any CPU" selection for my dll + winmd file so i can use it with my "Any CPU" c# solution?
It is not listed in the dropdown box.
- Verschoben Matt SmallMicrosoft Employee, Moderator Dienstag, 17. April 2012 18:45 Tools issue (From:Building Metro style apps with C# or VB )
- Bearbeitet ELRaymod Dienstag, 17. April 2012 19:01
Alle Antworten
-
Donnerstag, 19. April 2012 06:49Moderator
Hello ELRaymod,
I managed to successfully config the platform of the WinRT project to be "Any CPU" on my side: right-click the project and select Properties->Build->select the Platform to be "Any CPU" from the dropdown list.
However, for one thing you need to be aware is that even though the Visual Studio setting dictates “Any CPU” and the Windows version is 64-bit, the actual process is still 32-bit.
Thanks,
Vicky Song [MSFT]
MSDN Community Support | Feedback to us
-
Freitag, 8. Juni 2012 07:15
Hi Vicky,
I got the same problem in the release preview sample of custom driver assess (C#,C++).
I can't set "Any CPU" platform on the WinRT project. I can't add reference of the winmd to the Any CPU C# metro project.
Could you help me to find a way to fix this problrm?
Thanks.
-
Freitag, 8. Juni 2012 14:47
@ELRaymond
I assume you mean creating a *native* component and you want it to be AnyCPU. No, you cannot do this as there is no notion of that in native. If you are creating a WinRT component starting from C++ then it will be architecture-specific. And then your managed app consuming it would also have to be.
You can, however, create a managed WinRT component and have that be AnyCPU. Of course anyone using this from C++ would them be bringing in the CLR broker host process.
Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer
(if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others) -
Freitag, 8. Juni 2012 14:57
To be more specific: I am coding everything with C# and i have included SQLite.
-
Freitag, 8. Juni 2012 15:35Moderator
I believe SQLite is a native component and so will be architecture-specific. That will force your component containing it to also be architecture-specific.
AnyCPU only works if the component is purely managed code.
--Rob

