After adding new class file to App_Code, build action is Content instead of Compile - ide

In VS2008, I am adding new classes to a web project.
When I right-click on App-Code -> Add -> New Item -> Class ...
The build action for the newly created item is set to content instead of compile. This seems like it would be a problem with the template. I've found several others through google who have run into this issue, but nobody seemed to have found a more permanent solution, other than "change it from content to compile after creation."
My question: Does anyone know of a fix for this, official or otherwise?

App_Code is a special folder meant for folder based projects.
This is just a hunch, but it might be that you have a project file based project, instead of a simple folder based one.

Related

How to know which project template I selected initially?

I have created .net core application some days ago. Now I don't remember exactly which template I have selected for the project. What is the way to know the project template selected for any project.
Problem here is when I generate "Controller with Edit/View using Entity Framework" the default behavior is it should generate controller specific folder in "Views" folder but it is not generating that folder.
If I click on any method (public ActionResult View()) and try to generate view it is generating view in the controller folder only. It should generate this in controller specific folder in "Views" folder.
You can see RouteConfig.cs file is inside App_Start folder.
But it does not have anything that will help to solve your problem.
you can follow my last comment.
The same problem happened with me. I just cut this folder with the generated file and pest it inside the views folder even though it worked. you can also try this

Add external libraries to my project issue

I try to add external library to my current project, but my project can't pick up the library.
I have MyLib.java file in other directory.
/Users/cat/myfile/github/JavaLib/MyLib.java
I want to my current project (/home/project/HelloWorld/HellowWorld.java) to use my MyLib.java
I'm following the steps to add Library to Intellij(15CE)
Menu->Project Structure->Libraries
click (+) symbol->select Java -> select my path(/home/lib/)
Here is the screenshot
Now that you have added your JavaLib directory to the project you should be able to use the code inside JavaLib in your code now. Intellij should offer auto-complete when you start to type the name of a JavaLib class and automatically include the import for you in your code.
The disabled Apply button you circled isn't an issue. I get that in my view too. It just means nothing has changed that needs to be applied currently.

How to set up a multi-module project with equal hierarchy modules in IntelliJ?

I am wondering how to configure the following project layout in IntelliJ:
An Android application
A server back end feeding data to this application
Bean classes that are shared between back end and Android application
Initially, I wanted to create three modules on an equal hierarchy level. However, this does not seem to be possible with IntelliJ. I can only add new modules inside of the first module. I wonder if this is the way I am supposed to do it? Or is there a better way to do configure this project layout with IntelliJ? Do these hierarchies only represent folders?
I feel like I should make (3) a library module and add dependencies to (1) and (2). Since a module is defined as a discrete unit of functionality which you can compile, run, test and debug independently I feel like this is the right approach.
This is my first multi-module project in IntelliJ. Any explanation is appreciated!
When creating a new project you can use the Empty Project option on the first wizard step. When the project is created, add 3 modules in different folders under the Project Structure settings.
If you want to add them on a already initialized project, the trick from #CrazyCoder works, but you must not choose Empty Project, but instead Empty Module (in the Project Structure -> Modules dialog).
Then, choose the existing project.
Lastly, on the right side, the content root might be wrong. Set it to the root of your module.
Make sure the submodules are not on root level on the Project Structure -> Modules page. If they are, remove all expect the root module, delete the content root on the right, and add it again.

Checked use Core Data in new project

When I created my Xcode project i checked the checkbox "use Core Data" because I thought I was going to use that. Now however it turns out I never used Core Data and would like to disable it. My project is way to big to just simply create a new project and leave the checkbox unchecked.
Does anyone know what methodes and files I need to delete in order to have a project without Core Data? I think some project settings need to be changed as well.
Just create a new empty project and find out. Must of the methods will be in your App delegate. You also have to remove the Data model (.xcdatamodel) file from your project

import "cocos2d.h" works in some files, but not all

Here is what I did:
In Xcode 4.3.1
File -> New -> Project -> Single view application
Dragged the file cocos2d-ios.xcodeproj into navigator.
In build phases settings : Added : libcocos2d.a (becomes highlighted in red), as a linked library (required).
Added OpenGles.framework, Quartzcore, and libz.dylib
Changed build settings - Set "Always Search User Paths" to YES
Added cocos2d source directory to "User Header Search Paths"
Now, it seems I can type: import "cocos2d.h" , in the app delegate and root view controller that Xcode created. But if I create a new file, and I add the line "import "cocos2d.h"" to the top, Xcode complains that the file is not found. But it seems to build fine. Also, in this new file code sense does not work.
What should I do? Why can I import only in the files that Xcode created? Is there some setting I need to change so that in the files I create, I can import cocos2d ?
EDIT: It seems to build and run fine. I can call methods in the cocos2d api. code sense just doesn't seem to see cocos2d.h in the new files I create.
EDIT - it seems that code sense suggests cocos2d.h when i type : import "
But it does not suggest classes / methods from the cocos2d api.
Turns out I had only added the "user header search paths" to my target, but not in the project settings.
Adding it fixed the problem. I guess the reason it compiled fine was because I had added it to the target, but it didn't work in the text editor since I hadn't added it to the project.
This happened to me as well, even though I did add it to both project and target.
However, what worked for me was to select the RECURSIVE checkbox under "User Header Search Prefixes" (which was set to "/lib/**")
I had same issue.
My project -> Build Settings
Look for the entry for Search Paths
Always Search User Paths - YES
User Header Search paths - "myProjectName/libs" //I put box2d folder here
Hope this help someone.