4

at vs2008 i could set App_Code folder, but at vs2010 i can not do it, that's why i put my dataset's and class' to App_Data folder. Either I do not know even App_Data folder is secure? Any suggestions?

Thanks

7 Answers 7

9

Remember, that Web Site Project can contain App_Code folder and Web Application Project can't! Because all project is for code.

Sign up to request clarification or add additional context in comments.

4 Comments

is the reason why code-intelligence does not work on class' created in App_Code ? Either how can i hide my dataset 's ? I wouldn't that my dataset degisgner could be read
@softwaremonster: Very glad that it helped! :) It would be very nice if you could also upvote my answer.
i may only mark your answer as correct answer, i have'not enough reputation to vote up :( thanks again !
@softwaremonster: now you're able I guess :) nice to help you!
4

If you want to add the App_Code folder, you have to manually add the folder. Add->Add New folder--> you have to give it the folder name "App_Code" when you do it, and vs2010 automatically will change its folder type.

good luck

Comments

2

If you want to use standalone class files (in "App_Code" dir) in VS 2010 project, be sure set the File Properties > Build Action for each *.cs or *.vb file to "Compile" in the Properties > Advanced dialog.

Also, use the same namespace as your project and these standalone classes will be readily available to the rest of your project.

Took me a bit to realize the default setting in my VS was "Content" instead of "Compile."

Comments

1

Have you tried right-clicking on the project in the Solution Explorer, selected 'Add...' and looked under ASP.NET folders?

From memory, even previous versions of VS don't automatically put the App_Code folder in your project by default.

Comments

0

If you just create a folder called App_Code it will recognise it as the App_Code you want, it is strange that in the add .net folder it doesnt appear.

This the route I took for it, and it all works fine.

Comments

0

Workaround:

If we are using App_Code in a web application project, we need to rename into any other folder name.

http://blogs.msdn.com/b/chiranth/archive/2014/02/19/visual-studio-2012-unexpected-behavior-crash-and-irrelevant-errors.aspx

Comments

-2

I hope this will help you - the .cs files should not be placed in a folder. Just put them in the project, alone, and not in a folder. Then your classes will be visible. This is a difference in VS 2010.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.