简体   繁体   中英

How to create 2 classes with the same name in two separate projects in one solution?

I've got one solution right now, and it contains 3 separate projects. One project is a game engine, which I have given its own namespace and am now using in my other two projects. The other two projects are simple games that I have made as prototypes.

I am now working on my second game, and I am trying to add a class to the project that already exists in the first game. The second game is in no way dependent on the first game except for the fact that they use the same engine. Visual Studio will not let me add another class, it simply says "Object 'Bullet' already exists". Is there a way for me to force visual studio to make it anyway?

There is no reason for these to be conflicting, as far as I can tell, because they are separate projects with separate classes.

ATL simple object wizard - "Object Xxx already exists" error

Not exactly my problem, but basically. Seems to be an issue with visual studio thinking that the object exists because it has it cached that I created it. Made a Bullet2 and then renamed it and it worked fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM